How does it work?
CO2 Click as its foundation uses the STC31, a gas concentration sensor for high range, accurate CO2 measurements designed for high-volume applications from Sensirion. The STC31 is based on a revolutionized thermal conductivity measurement principle, which results in superior repeatability and long-term stability. By relying on the thermal conductivity technology, the sensor offers an ultra-low power consumption, making the STC31 the perfect choice for applications where reliability is key.
The accuracy of the STC31 is 0.5 vol%, and ±3% of the measured value, while the sensor response time is faster than 1 second. The outstanding performance of these sensors is based on Sensirion’s patented CMOSens® Technology, which combines the sensor element, signal processing, and digital calibration on a small CMOS chip. The well-proven CMOSens® Technology represents the ideal choice for demanding and cost-sensitive OEM applications.
CO2 Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting Standard Mode operation with a clock frequency up to 100kHz, Fast Mode up to 400kHz, and Fast Mode Plus up to 1MHz. Besides, it also allows the choice of the three least significant bits of its I2C slave address by positioning the SMD jumper labeled as ADDR SEL to an appropriate position providing the user with a choice of 4 I2C Slave addresses.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. However, the 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.
Specifications
Type
Gas
Applications
Can be used for health, environmental, industrial, residential monitoring of high CO2 concentrations and applications where reliability is crucial
On-board modules
STC31 – gas concentration sensor for high range, accurate CO2 measurements designed for high-volume applications from Sensirion
Key Features
Low power consumption, high reliability and long-term stability, best signal-to-noise ratio, industry-proven technology with a track record of more than 15 years, high process capability, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on CO2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | ADDR SEL | Lower | I2C Address Selection: Left position 0x2C, Right position 0x2A, Upper position 0x2B, Lower position 0x29 |
CO2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Selectable Measurement Range (N2 / Air) | 0 | – | 25/100 | vol% |
Accuracy | – | ±0.5 | – | % |
Resolution | – | 16 | – | bit |
Operating Temperature Range | -20 | +25 | +85 | °C |
Software Support
We provide a library for the CO2 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for CO2 Click driver.
Key functions
-
co2_get_id
Read device and serial ID’s. -
co2_set_reference
Set device refrence values for gas calculation. -
co2_read_gas
Read CO2 concentration and temperature value.
Example Description
This example showcases ability of Click board™. It reads ID’s configures device for operation work and reads CO2 gas concentration in air and temperature of IC every second.
void application_task ( void )
{
float gas_data = 0;
float temp_data = 0;
if ( CO2_OK == co2_read_gas( &co2, &gas_data, &temp_data ) )
{
log_printf( &logger, " > CO2[%%]: %.2frn", gas_data );
log_printf( &logger, " > Temperature[degC]: %.2frn", temp_data );
Delay_ms( 1000 );
}
Delay_ms( 1 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.CO2
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.