TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 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 (137082 times)
  2. FAT32 Library (70223 times)
  3. Network Ethernet Library (56095 times)
  4. USB Device Library (46418 times)
  5. Network WiFi Library (42034 times)
  6. FT800 Library (41378 times)
  7. GSM click (29109 times)
  8. mikroSDK (26558 times)
  9. PID Library (26487 times)
  10. microSD click (25486 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 7 click

Rating:

5

Author: MIKROE

Last Updated: 2020-09-14

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Gas

Downloaded: 1619 times

Not followed.

License: MIT license  

Air Quality 7 Click is a compact add-on board that combines state-of-the-art MOS sensor technology with intelligent detection algorithms to monitor VOCs and CO2 equivalent variations in confined spaces. This board features the MiCS-VZ-89TE, an integrated sensor module for indoor air quality monitoring from Amphenol.

No Abuse Reported
Api supported

Do you want to subscribe in order to receive notifications regarding "Air quality 7 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Air quality 7 click" changes.

Do you want to report abuse regarding "Air quality 7 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Air Quality 7 Click

Air Quality 7 Click

Native view of the Air Quality 7 Click board.

View full image
Air Quality 7 Click

Air Quality 7 Click

Front and back view of the Air Quality 7 Click board.

View full image

Library Description

This library allows user to check CO2 (Carbon Dioxide) and tVOC (Total Volatile Organic Compounds) level of the air quality. The recalibration of the device is also allowed by this library. For more details, please, check full documentation.

Key functions:

  • void airquality7_set_ppmco2( uint8_t *ppmco2_value ); - This function is used to send the ppmCO2 value given by an external analyzer to the Air quality 7 click in order to recalibrate its outputs.
  • airquality7_err_t airquality7_get_status( uint16_t *tvoc_ppb, uint16_t *co2_ppm, uint32_t *res_val_ohm, uint8_t *err_byte ); - This function is used to read the Air quality 7 click status coded on tVOC data byte [0 - 1000 ppb], CO2 data byte [400 - 2000 ppm], resistor value data 3 bytes [Ohm], error status byte and CRC byte.
  • airquality7_err_t airquality7_get_r0_calib( uint16_t *r0_kohm ); - This function is used to read the R0 (calibration) value in [kOhms] coded on 2 data bytes and CRC byte.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes all necessary peripherals and pins. Performs a delay time of a couple seconds because the Air quality 7 click needs some time to establish the measurements.
  • Application Initialization - Initializes I2C driver and reads revision of the module. If CRC check is OK allows the program to go on, and if it's not OK, needs to restart the program.
  • Application Task - Reads air quality status every 1500ms and shows the results on serial terminal.
void application_task( )
{
    airquality7_err_code = airquality7_get_status( &airquality7_tvoc_ppb, 
                                                   &airquality7_co2_ppm,
                                                   &airquality7_res_val_ohm, 
                                                   AIRQUALITY7_NULL );
                   
    if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
    {
        char log_txt[ 50 ];
        uint8_t cnt;
        
        log_txt[ 0 ] = 13;
        log_txt[ 1 ] = 0;
        mikrobus_logWrite( log_txt, _LOG_TEXT );

        for ( cnt = 0; cnt < 70; cnt++ )
        {
            mikrobus_logWrite( " ", _LOG_TEXT );
            Delay_ms( 5 );
        }

        mikrobus_logWrite( log_txt, _LOG_TEXT );

        WordToStr( airquality7_tvoc_ppb, log_txt );
        Ltrim( log_txt );
        mikrobus_logWrite( " tVOC [ppb] = ", _LOG_TEXT );
        mikrobus_logWrite( log_txt, _LOG_TEXT );
        mikrobus_logWrite( ";  ", _LOG_TEXT );

        WordToStr( airquality7_co2_ppm, log_txt );
        Ltrim( log_txt );
        mikrobus_logWrite( "CO2 [ppm] = ", _LOG_TEXT );
        mikrobus_logWrite( log_txt, _LOG_TEXT );
        mikrobus_logWrite( ";  ", _LOG_TEXT );

        LongWordToStr( airquality7_res_val_ohm, log_txt );
        Ltrim( log_txt );
        mikrobus_logWrite( "Resistor value [ohm] = ", _LOG_TEXT );
        mikrobus_logWrite( log_txt, _LOG_TEXT );
    }
    
    Delay_ms( 1500 );
}

Other mikroE Libraries used in the example:

  • Conversions
  • C_String
  • I2C
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

Tilt 2 click

5

Tilt 2 click is a tilt sensor switch, which breaks the circuit when tilted to an angle of 45° or when shaken. It is a single-pole-double-throw type of switch (SPDT), which can be operated with up to 24V. The current through the switch should not exceed 25mA.

[Learn More]

Expand 13 click

0

Expand 13 Click is a compact add-on board that contains a multi-port I/O expander. This board features the PI4IOE5V96248, a 48-bit general-purpose I/O expander providing remote I/O expansion for most MCU’s families from Diodes Incorporated. The PI4IOE5V96248 comes in a 6-channel configuration and allows easy addition of I/O through a standard I2C serial interface. It has a built-in level shifting feature that makes it highly flexible in power supply systems where communication between incompatible I/O voltages is required.

[Learn More]

BUCK 7 click

5

Buck 7 click is a high-efficiency buck (step-down) DC-DC converter, which can provide digitally adjusted step-down voltage on its output while delivering up to 3.5A of current.

[Learn More]