Discover how our advanced smoke detection solution enhances your ability to prevent and mitigate fire risks, creating safer environments for everyone
A
A
Hardware Overview
How does it work?
Smoke Click is based on the MAX30105, a high-sensitivity optical sensor for smoke detection applications from Analog Devices. The sensor is an integrated particle-sensing module with internal LEDs, photodetectors, optical elements, and low-noise electronics with ambient light rejection. To detect the smoke, the MAX30105 senses the light of LEDs that are rejected from the smoke particles by the photodetectors. The particle-sensing subsystem contains ambient light cancellation (ALC), a continuous-time sigma-delta 18-bit ADC, and a proprietary discrete time filter. The ALC has an internal track/hold circuit to cancel ambient light and increase dynamic range. The ADC output data rate can be programmed from 50sps to 3200sps. The MAX30105 integrates red, green, and IR LED drivers to modulate LED pulses for
particle-sensing measurements. The LED current can be programmed from 0 up to 50mA. The onboard temperature sensor is used for calibrating the temperature dependence of the particle-sensing subsystem. This temperature sensor has an inherent resolution of 0.0625°C. After the particle-sensing initiation, the IR LED is activated in proximity mode; when an object is detected, it goes automatically to the normal mode. The proximity mode can be re-entered. Smoke Click uses a standard 2-Wire I2C interface to communicate with the host MCU, supporting the clock data rates up to 400KHz. The sensor uses 1.8V for a power supply, which on this Click board™ is available over the SPX3819MS, a 500mA low-noise LDO voltage regulator from MaxLinear. For this sensor to work with higher logic levels,
Smoke Click features the PCA9306, a dual bidirectional I2C bus, and an SMBus voltage-level translator from Texas Instruments. One of the available interrupt statuses can be received over the INT pin and the SN74LVC1T45, a single-bit dual-supply bus transceiver with configurable voltage translation and 3-state outputs from Texas Instruments. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the PWR SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Features overview
Development board
Flip&Click PIC32MZ is a compact development board designed as a complete solution that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It comes with an onboard 32-bit PIC32MZ microcontroller, the PIC32MZ2048EFH100 from Microchip, four mikroBUS™ sockets for Click board™ connectivity, two USB connectors, LED indicators, buttons, debugger/programmer connectors, and two headers compatible with Arduino-UNO pinout. Thanks to innovative manufacturing technology,
it allows you to build gadgets with unique functionalities and features quickly. Each part of the Flip&Click PIC32MZ development kit contains the components necessary for the most efficient operation of the same board. In addition, there is the possibility of choosing the Flip&Click PIC32MZ programming method, using the chipKIT bootloader (Arduino-style development environment) or our USB HID bootloader using mikroC, mikroBasic, and mikroPascal for PIC32. This kit includes a clean and regulated power supply block through the USB Type-C (USB-C) connector. All communication
methods that mikroBUS™ itself supports are on this board, including the well-established mikroBUS™ socket, user-configurable buttons, and LED indicators. Flip&Click PIC32MZ development kit allows you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC32
MCU Memory (KB)
2048
Silicon Vendor
Microchip
Pin count
100
RAM (Bytes)
524288
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for Smoke Click driver.
Key functions:
smoke_set_registers
- Set registers values functionsmoke_enable_disable_interrupts
- Enable or disable interrupt functionsmoke_read_leds
- Function for reading enabled led values
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* \file
* \brief Smoke Click example
*
* # Description
* This click includes internal LEDs, photodetectors, optical elements, and low-noise electronics
* with ambient light rejection. The sensor can detect a wide variety of smoke particle sizes.
* It also has an on-chip temperature sensor for calibrating the temperature dependence of the
* particle sensing subsystem. The temperature sensor has an inherent resolution 0.0625°C.
*
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initalizes I2C driver, applies "set registers check green values" settings,
* "enable FIFO data ready interrupt" and makes an initial log.
*
* ## Application Task
* This example demonstrates the use of Smoke Click board. It reads reflected green values and
* temperature from an internal sensor and displays the results on USART terminal.
* It usualy takes two or three readings in order to get corect readings. Expect big values when you do.
*
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "smoke.h"
// ------------------------------------------------------------------ VARIABLES
static smoke_t smoke;
static log_t logger;
static float temperature;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
smoke_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
smoke_cfg_setup( &cfg );
SMOKE_MAP_MIKROBUS( cfg, MIKROBUS_1 );
smoke_init( &smoke, &cfg );
smoke_reset( &smoke );
smoke_default_cfg ( &smoke );
log_info( &logger, "---- Application Task ----" );
Delay_ms( 100 );
if ( smoke_read_leds( &smoke ) != SMOKE_OK )
{
log_info( &logger, "---- Init Error ----" );
for( ; ; );
}
}
void application_task ( void )
{
smoke_read_leds( &smoke );
log_printf( &logger, "Red : %llu\r\n", smoke.red_value );
log_printf( &logger, "IR : %llu\r\n", smoke.ir_value );
log_printf( &logger, "Green : %llu\r\n", smoke.green_value );
log_printf( &logger, "------------------------------\r\n" );
temperature = smoke_read_temp( &smoke );
log_printf( &logger, "Read Temperature[ degC ]: %.2f\r\n", temperature );
log_printf( &logger, "------------------------------\r\n" );
Delay_ms( 1000 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END