Air Quality 4 Click Board
Air Quality 4 Click Board
The Air Quality 4 Click Board™ is an advanced air quality sensing device that combines multiple metal-oxide sensing elements on a chip to provide detailed information on the air quality parameters. This Click Board™ can output TVOC value readings as well as the CO2 equivalent concentration readings in an indoor environment.
Besides these compensated attributes, the Air Quality 4 Click Board™ can also output raw values of H2 and Ethanol in the air, which can be used to calculate gas concentrations, relative to a reference concentration.
Software Support
We provide a library for the Air Quality 4 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library Description
Initializes and defines I2C bus driver and driver functions which perform measurements of H2, TVOC, CO2 and EthOH (Ethanol) concentration in the air. Check the documentation for more details.
Key functions
void air_quality4_measureQuality(uint8_t *readAir)
- The function writes 6 bytes CO2 data (2 bytes) and TVOC data (2 bytes) with CRC data for each of them to a buffer, pointed by the function parameter.
void air_quality4_getCO2AndTVOC(uint16_t *value)
- The function writes 2 bytes CO2 data and 2 bytes TVOC data without CRC data to a buffer, pointed by the function parameter.
void air_quality4_measureSignal(uint8_t *readAir)
- The function writes 6 bytes H2 data (2 bytes) and EthOH - Ethanol data (2 bytes) with CRC data for each of them to a buffer, pointed by the function parameter.
void air_quality4_getH2AndEthOH(uint16_t *value)
- The function writes 2 bytes of H2 data and 2 bytes of EthOH data without CRC data to a buffer, pointed by the function parameter.
Example Description
- System Initialization - Initializes peripherals and pins. Application Initialization - Initializes click driver and gets ID data.
- Application Task - Performs measurements of air concentration for H2, EthOH(Ethanol), CO2 and TVOC data. Results of the measurement are output to the UART.
void applicationTask() { air_quality4_getH2AndEthOH(&data_buffer[0]); IntToStr(data_buffer[0], text); mikrobus_logWrite("H2 value is: ", _LOG_TEXT); mikrobus_logWrite(text, _LOG_LINE); IntToStr(data_buffer[1], text); mikrobus_logWrite("EthOH value is: ", _LOG_TEXT); mikrobus_logWrite(text, _LOG_LINE); air_quality4_setBaseline(); air_quality4_getCO2AndTVOC(&data_buffer[0]); IntToStr(data_buffer[0], text); mikrobus_logWrite("CO2 value is: ", _LOG_TEXT); mikrobus_logWrite(text, _LOG_LINE); IntToStr(data_buffer[1], text); mikrobus_logWrite("TVOC value is: ", _LOG_TEXT); mikrobus_logWrite(text, _LOG_LINE); Delay_ms(1000); }
The full application code, and ready to use projects can be found on our LibStock page.
Additional Notes and Information
Depending on the development board you are using, you may need a 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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The Air Quality 4 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.
Air Quality 4 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.