Air Quality 5 Click Board
Air Quality 5 Click Board
The Air Quality 5 Click Board™ is a triple MOS sensor on a single Click Board™, which can detect gas pollution for a number of different gases. The onboard sensor is specially designed to detect the pollution from automobile exhausts, as well as the gas pollution from the industrial or agricultural industry.
The Air Quality 5 Click Board™ uses the MiCS-6814, a compact MOS sensor with three fully independent sensing elements in one package: RED sensor, OX sensor, and NH3 sensor. Each of these sensors reacts with the specific type of gases, providing gas readings that including carbon monoxide (CO), nitrogen dioxide (NO2), ethanol (C2H5OH), hydrogen (H2), ammonia (NH3), methane (CH4), propane (C3H8), and isobutane (C4H10). Measurement conversion is handled by the onboard 12-bit ADC converter and it is available via the I2C interface.
Software Support
We provide a demo application for the Air Quality 5 Click Board™ on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library initializes and defines the I2C bus driver and drivers that offer a choice for writing data in registers and reading data from registers. The library includes functions for full initialization of the chip, reading 3 sensors (CO, NH3 and NO2 data). The user can check the state of the RDY pin indicating if that data is ready for reading.
Key Functions
void airq5_setConfiguration(uint16_t config)
- The functions for configuration.uint16_t airq5_readSensorData(uint16_t channel_data)
- The functions for reading the sensor data.
Example Description
The application is composed of three sections:
- System Initialization - Initializes the I2C module and sets the INT pin as INPUT.
- Application Initialization - Initializes driver init and configuration chip.
- Application Task - (code snippet) - Reads the values of CO, NH3 and NO2 sensor and logs data on USB-UART every 500ms.
void applicationTask() { NO2_sensorData = airq5_readSensorData(_AIRQ5_DATA_CHANNEL_NO2); NH3_sensorData = airq5_readSensorData(_AIRQ5_DATA_CHANNEL_NH3); CO_sensorData = airq5_readSensorData(_AIRQ5_DATA_CHANNEL_CO); IntToStr(NO2_sensorData, dataText); mikrobus_logWrite(" NO2 data: ", _LOG_TEXT); mikrobus_logWrite(dataText, _LOG_LINE); IntToStr(NH3_sensorData, dataText); mikrobus_logWrite(" NH3 data: ", _LOG_TEXT); mikrobus_logWrite(dataText, _LOG_LINE); IntToStr(CO_sensorData, dataText); mikrobus_logWrite(" CO data: ", _LOG_TEXT); mikrobus_logWrite(dataText, _LOG_LINE); mikrobus_logWrite(" -------- ", _LOG_LINE); Delay_ms( 500 ); }
The full application code, and ready to use projects can be found on our Libstock page.
Other MikroElektronika libraries used in the example:
- Conversions
- I2C
- UART
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 5 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 5 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.