Stay ahead in safeguarding health and well-being by measuring CO2 levels using our state-of-the-art solution.
A
A
Hardware Overview
How does it work?
CO2 3 Click is based on the XENSIV™ PASCO2V01BUMA1, the smallest CO2 sensor module from Infineon Technologies that uses photoacoustic spectroscopy technology to measure indoor air quality. The module consists of a gas measuring cell with an infrared (IR) emitter, a high-SNR microphone as the acoustic detector, and an XMC™ microcontroller for data processing, delivering exceptional accuracy, boasting a rate of ±30ppm ±3% of reading. Its diffuser port allows for efficient gas exchange while maintaining dust protection, and its acoustic isolation ensures highly accurate CO2 sensing information. Because of its superior features, this board makes an excellent choice for building automation, smart home appliances, and air quality monitoring, including air purifiers, thermostats, and HVAC systems. Its precise measurements can help optimize indoor air quality, improving human health, productivity, and comfort. As mentioned, the PASCO2V01BUMA1 overcomes the size, performance, and assembly challenges of existing CO2 sensor solutions by using photoacoustic spectroscopy (PAS). It uses pulses of light from an infrared source that pass through an optical filter explicitly tuned to the CO2 absorption wavelength. The CO2 molecules inside the measurement chamber absorb the filtered light, causing the molecules to shake and generate a pressure wave with each pulse, known as the photoacoustic effect. The sound is then detected by an acoustic detector optimized for low-frequency operation,
and the microcontroller converts the output into a CO2 concentration reading. This results in a highly accurate and reliable measurement of CO2 levels in real-time. All significant components of the XENSIV™ PASCO2V01BUMA1 CO2 module are developed in-house according to Infineon's high-quality standards, ensuring the highest quality and performance. The dedicated MCU runs advanced compensation algorithms to deliver direct and reliable ppm readouts of actual CO2 levels. The available configuration options, such as ABOC, pressure compensation, signal alarm, sample rate, and early measurement notification, make this board one of the most versatile plug-and-play CO2 solutions on the market. This Click board™ comes with a configurable host interface that allows communication with MCU using the selected interface. The PASCO2V01BUMA1 can communicate with MCU using the UART interface with commonly used UART RX and TX pins as its default communication protocol operating at 115200bps to transmit and exchange data with the host MCU or using the optional I2C interface. The I2C interface is compatible with the Fast-Mode, allowing a maximum frequency of 400kHz. Selection is made by positioning SMD jumpers marked COMM SEL to the appropriate position. All jumpers must be on the same side, or the Click board™ may become unresponsive. As a third option for communication with the MCU, users have a PWM interface controlled via the PWS pin of the mikroBUS™ socket. The PWS pin is first
asserted after the Power-On boot sequence (not after soft reset), and the level of the pin is checked. If a low level is detected, an internal interrupt routine configures the device into Continuous mode and starts a measurement sequence. At the end of each measurement sequence, the level of this pin is polled. If it is high, the device is configured back to Idle mode. The PWO pin, routed to the AN pin of the mikroBUS™ socket by default, offers the possibility to read out the CO2 concentration by delivering a PWM signal whose timing information contains the CO2 concentration value. At the end of each measurement sequence, the device updates the PWM timing with the measured CO2 concentration. This board also possesses an additional interrupt alert signal, routed on the INT pin of the mikroBUS™ socket, to provide a notification of CO2 measurements that violate programmed thresholds. This Click board™ can only be operated with a 3.3V logic voltage level. Since the sensor module for proper operation requires a voltage level of 12V, this Click board™ also features the TLV61046A, a voltage boost converter to generate a stable 12V supply. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Features overview
Development board
Curiosity PIC32 MZ EF development board is a fully integrated 32-bit development platform featuring the high-performance PIC32MZ EF Series (PIC32MZ2048EFM) that has a 2MB Flash, 512KB RAM, integrated FPU, Crypto accelerator, and excellent connectivity options. It includes an integrated programmer and debugger, requiring no additional hardware. Users can expand
functionality through MIKROE mikroBUS™ Click™ adapter boards, add Ethernet connectivity with the Microchip PHY daughter board, add WiFi connectivity capability using the Microchip expansions boards, and add audio input and output capability with Microchip audio daughter boards. These boards are fully integrated into PIC32’s powerful software framework, MPLAB Harmony,
which provides a flexible and modular interface to application development a rich set of inter-operable software stacks (TCP-IP, USB), and easy-to-use features. The Curiosity PIC32 MZ EF development board offers expansion capabilities making it an excellent choice for a rapid prototyping board in Connectivity, IOT, and general-purpose applications.
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 CO2 3 Click driver.
Key functions:
co23_get_co2_ppm
- CO2 3 get CO2 concentration function.co23_set_meas_cfg
- CO2 3 set measurement configuration function.co23_set_pressure_ref
- CO2 3 set reference pressure function.
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 main.c
* @brief CO2 3 Click example
*
* # Description
* This library contains API for CO2 3 Click driver.
* This driver provides the functions for sensor configuration
* and reading the CO2 gas concentration in the air.
*
* The demo application is composed of two sections :
*
* ## Application Init
* The initialization of I2C or UART module, log UART, and additional pins.
* After the driver init, the app executes a default configuration.
*
* ## Application Task
* This example demonstrates the use of the CO2 3 Click board™.
* The device starts a single measurement sequence,
* measures and display air CO2 gas concentration (ppm).
* Results are being sent to the UART Terminal, where you can track their changes.
*
* @author Nenad Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "co23.h"
static co23_t co23;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
co23_cfg_t co23_cfg; /**< Click config object. */
/**
* 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.
co23_cfg_setup( &co23_cfg );
CO23_MAP_MIKROBUS( co23_cfg, MIKROBUS_1 );
if ( I2C_MASTER_ERROR == co23_init( &co23, &co23_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
Delay_ms( 100 );
if ( CO23_ERROR == co23_default_cfg ( &co23 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
Delay_ms( 100 );
log_info( &logger, " Application Task " );
log_printf( &logger, "-----------------------\r\n" );
Delay_ms( 100 );
}
void application_task ( void )
{
co23_meas_cfg_t meas_cfg;
meas_cfg.op_mode = CO23_OP_MODE_SINGLE;
co23_set_meas_cfg( &co23, meas_cfg );
Delay_ms( 1000 );
uint16_t co2_ppm = 0;
co23_get_co2_ppm( &co23, &co2_ppm );
log_printf( &logger, " CO2: %d ppm\r\n", co2_ppm );
log_printf( &logger, "-----------------------\r\n" );
Delay_ms( 100 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END