TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (405 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (133 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (141394 times)
  2. FAT32 Library (74221 times)
  3. Network Ethernet Library (58787 times)
  4. USB Device Library (48855 times)
  5. Network WiFi Library (44599 times)
  6. FT800 Library (44154 times)
  7. GSM click (30889 times)
  8. mikroSDK (29752 times)
  9. PID Library (27373 times)
  10. microSD click (27312 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Air Quality 12 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-12-31

Package Version: 2.1.0.1

mikroSDK Library: 2.0.0.0

Category: Gas

Downloaded: 67 times

Not followed.

License: MIT license  

Air Quality 12 Click is a compact add-on board for monitoring indoor air quality. This board features the RRH46410, a digital gas sensor module from Renesas, which integrates advanced sensing technology for precise detection of total volatile organic compounds (TVOC), indoor air quality (IAQ), and estimated carbon dioxide levels (eCO2). This module features a MEMS gas sensing element with a metal oxide (MOx) chemiresistor, a CMOS signal conditioning IC, and an onboard MCU, offering a complete, self-contained solution with low power consumption and support for both UART and I2C communication.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Air Quality 12 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Air Quality 12 Click" changes.

Do you want to report abuse regarding "Air Quality 12 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Air Quality 12 Click

Air Quality 12 Click is a compact add-on board for monitoring indoor air quality. This board features the RRH46410, a digital gas sensor module from Renesas, which integrates advanced sensing technology for precise detection of total volatile organic compounds (TVOC), indoor air quality (IAQ), and estimated carbon dioxide levels (eCO2). This module features a MEMS gas sensing element with a metal oxide (MOx) chemiresistor, a CMOS signal conditioning IC, and an onboard MCU, offering a complete, self-contained solution with low power consumption and support for both UART and I2C communication.

airquality12_click.png

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Aug 2024.
  • Type : I2C/UART type

Software Support

We provide a library for the Air Quality 12 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 Air Quality 12 Click driver.

Standard key functions :

  • airquality12_cfg_setup Config Object Initialization function.

    void airquality12_cfg_setup ( airquality12_cfg_t *cfg );
  • airquality12_init Initialization function.

    err_t airquality12_init ( airquality12_t *ctx, airquality12_cfg_t *cfg );
  • airquality12_default_cfg Click Default Configuration function.

    err_t airquality12_default_cfg ( airquality12_t *ctx );

Example key functions :

  • airquality12_get_sensor_info This function reads the device product ID, firmware version, and tracking number.

    err_t airquality12_get_sensor_info ( airquality12_t *ctx, airquality12_info_t *info );
  • airquality12_get_int_pin This function returns the INT pin logic state.

    uint8_t airquality12_get_int_pin ( airquality12_t *ctx );
  • airquality12_get_measurement This function reads the sensor measurement results.

    err_t airquality12_get_measurement ( airquality12_t *ctx, airquality12_results_t *results );

Example Description

This example demonstrates the use of Air Quality 12 Click board by reading the IAQ 2nd Gen measurements and displays the results on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver and configures the Click board to the default configuration. Then it reads the sensor product ID, firmware version, and the 48-bit tracking number.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    airquality12_cfg_t airquality12_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.
    airquality12_cfg_setup( &airquality12_cfg );
    AIRQUALITY12_MAP_MIKROBUS( airquality12_cfg, MIKROBUS_1 );
    if ( AIRQUALITY12_OK != airquality12_init( &airquality12, &airquality12_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( AIRQUALITY12_ERROR == airquality12_default_cfg ( &airquality12 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    airquality12_info_t info;
    if ( AIRQUALITY12_OK == airquality12_get_sensor_info ( &airquality12, &info ) )
    {
        log_printf( &logger, " ---- Sensor info ----\r\n" );
        log_printf( &logger, " Product ID: 0x%.4X\r\n", info.product_id );
        log_printf( &logger, " FW version: %u.%u.%u\r\n", ( uint16_t ) info.fw_ver_major, 
                                                          ( uint16_t ) info.fw_ver_minor, 
                                                          ( uint16_t ) info.fw_ver_patch );
        log_printf( &logger, " Tracking number: 0x%.2X%.2X%.2X%.2X%.2X%.2X\r\n", 
                    ( uint16_t ) info.tracking_num[ 5 ], ( uint16_t ) info.tracking_num[ 4 ], 
                    ( uint16_t ) info.tracking_num[ 3 ], ( uint16_t ) info.tracking_num[ 2 ], 
                    ( uint16_t ) info.tracking_num[ 1 ], ( uint16_t ) info.tracking_num[ 0 ] );
        log_printf( &logger, " ---------------------\r\n" );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Checks the data ready interrupt pin and then reads the IAQ 2nd Gen measurements and displays the results on the USB UART. The GP1 LED turns ON during the data reading. The data sample rate is set to 3 seconds for the IAQ 2nd Gen operating mode, and the first 100 samples upon startup should be ignored since the sensor is in the warm-up phase.

void application_task ( void )
{
    airquality12_results_t results = { 0 };

    if ( airquality12_get_int_pin ( &airquality12 ) )
    {
        airquality12_set_gp1_pin ( &airquality12, 1 );
        if ( AIRQUALITY12_OK == airquality12_get_measurement ( &airquality12, &results ) )
        {
            log_printf ( &logger, " Sample number: %u\r\n", ( uint16_t ) results.sample_num );
            log_printf ( &logger, " IAQ: %.1f\r\n", results.iaq );
            log_printf ( &logger, " TVOC: %.2f mg/m^3\r\n", results.tvoc );
            log_printf ( &logger, " ETOH: %.2f ppm\r\n", results.etoh );
            log_printf ( &logger, " ECO2: %u ppm\r\n", results.eco2 );
            log_printf ( &logger, " rel_IAQ: %u\r\n\n", results.rel_iaq );
        }
        airquality12_set_gp1_pin ( &airquality12, 0 );
    }
}

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.AirQuality12

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.


ALSO FROM THIS AUTHOR

Pressure 13 click

5

Pressure 13 Click is a compact add-on board that contains an integrated pressure sensor for manifold air pressure measurement applications. This board features the KP229E2701, a miniaturized analog manifold air pressure sensor based on a capacitive principle from Infineon.

[Learn More]

I2C 1-Wire click

5

This example shows ID numbers from Unique ID Click and several Thermo Sensors (DS1820), connected on each channel. If there is no device detected on the channel, warning note is shown on TFT.

[Learn More]

Load Cell 3 Click

0

Load Cell 3 Click is a compact add-on board that represents a weigh scale solution. This board features the PGA302, a low-drift, low-noise, programmable signal-conditioner device designed for various resistive bridge-sensing applications from Texas Instruments. It creates 2.5V of bridge excitation and a current output source with programmable current output up to 1mA. Two identical analog front-end (AFE) channels followed by a 16-bit Sigma-Delta ADC are available at the input, where each AFE channel has a dedicated programmable gain amplifier with gain up to 200V/V. It also comes with an on-chip temperature sensor and integrated EEPROM memory for device configuration, calibration, and user data.

[Learn More]