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
Fusion for TIVA v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports a wide range of microcontrollers, such as different 32-bit ARM® Cortex®-M based MCUs from Texas Instruments, regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer over a WiFi network. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, Fusion for TIVA v8 provides a fluid and immersive working experience, allowing access
anywhere and under any circumstances at any time. Each part of the Fusion for TIVA v8 development board contains the components necessary for the most efficient operation of the same board. An advanced integrated CODEGRIP programmer/debugger module offers many valuable programming/debugging options, including support for JTAG, SWD, and SWO Trace (Single Wire Output)), and seamless integration with the Mikroe software environment. Besides, it also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.
Communication options such as USB-UART, USB HOST/DEVICE, CAN (on the MCU card, if supported), and Ethernet is also included. In addition, it also has the well-established mikroBUS™ standard, a standardized socket for the MCU card (SiBRAIN standard), and two display options for the TFT board line of products and character-based LCD. Fusion for TIVA v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development 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
Type
8th Generation
Architecture
ARM Cortex-M4
MCU Memory (KB)
1024
Silicon Vendor
Texas Instruments
Pin count
128
RAM (Bytes)
262144
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
This Click board can be interfaced and monitored in two ways:
Application Output
- Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
UART Terminal
- Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
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