Our comprehensive air quality monitoring solution empowers individuals, businesses, and communities with accurate data to make informed decisions for healthier surroundings.
A
A
Hardware Overview
How does it work?
Air Quality 7 Click is based on the MiCS-VZ-89TE, an integrated sensor module from Amphenol for indoor air quality monitoring. The MiCS-VZ-89TE combines the most modern MOS sensor technology with intelligent detection algorithms to control VOCs and CO2 fluctuations in buildings. Among other appealing features like 3.3V supply, I2C communication, and calibration-free high sensitivity, this module has a small size factor. The sensor must not be exposed to high concentrations of organic solvents, ammonia, silicone vapor, or cigarette smoke to avoid poisoning the sensitive layer. It should be protected against water and dust projections, and its Vendor strongly recommends using ESD protection equipment to handle the sensor. This Click board™ is easy to program and read data because it does not require an overly demanding configuration. The first step is the initialization of
all the necessary peripherals and pins. The additional delay time of a couple of seconds during system initialization is needed because this Click board™ needs some time to establish the measurements. The second initialization is the I2C driver and communication test by reading the revision information of the module. If the CRC check is OK, it allows the program to go on; if it's not, a user needs to restart the program. The user can read the air quality status if every step is valid. This can also be seen in an example code that contains easy-to-use functions that may be used as a reference for further development. Air quality 7 Click communicates with MCU using the standard I2C 2-Wire interface that supports Standard-Mode operation with bit rates up to 100 kbit/s. The MiCS-VZ-89TE slave address contains seven fixed bits. The slave address byte is the first byte received following the START condition from
the host device. The first part of the address byte consists of a 4-bit device code, which is set to 1110 for the IAQS, followed by three address bits (A2, A1, A0), which are programmed at 0. The dual signal output routed on the OUT pin of the mikroBUS™ socket, which brings the results of the measurements, can be read through a multiplexed PWM output or an I2C bus. This Click board™ is designed to be operated only with a 3.3V logic voltage level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic voltage levels. More information about the MiCS-VZ-89TE can be found in the attached datasheet. However, the Click board™ comes equipped with a library that contains easy-to-use functions and a usage example that may be used as a reference for further development.
Features overview
Development board
EasyPIC v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports many high pin count 8-bit PIC microcontrollers from Microchip, regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, EasyPIC v8 provides a fluid and immersive working experience, allowing access anywhere and under any
circumstances at any time. Each part of the EasyPIC v8 development board contains the components necessary for the most efficient operation of the same board. In addition to the advanced integrated CODEGRIP programmer/debugger module, which offers many valuable programming/debugging options and seamless integration with the Mikroe software environment, the board also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.
Communication options such as USB-UART, USB DEVICE, and CAN are also included, including the well-established mikroBUS™ standard, two display options (graphical and character-based LCD), and several different DIP sockets. These sockets cover a wide range of 8-bit PIC MCUs, from the smallest PIC MCU devices with only eight up to forty pins. EasyPIC v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC
MCU Memory (KB)
64
Silicon Vendor
Microchip
Pin count
40
RAM (Bytes)
3968
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
This Click board can be interfaced and monitored in two ways:
Application Output
- Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
UART Terminal
- Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Software Support
Library Description
This library contains API for Air Quality 7 Click driver.
Key functions:
airquality7_get_status
- Get Status functionairquality7_get_revision
- Get Revision functionairquality7_get_r0_calib
- Get R0 Calibration function.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* \file
* \brief AirQuality7 Click example
*
* # Description
* This demo application measures air quality.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes I2C driver and reads revision date of the module.
* If CRC check is OK allows the program to go on, otherwise, it displays a message that
* the program needs to be restarted.
*
* ## Application Task
* Reads air quality status every 1500ms and shows the results on the USB UART.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "airquality7.h"
// ------------------------------------------------------------------ VARIABLES
static airquality7_t airquality7;
static log_t logger;
uint16_t airquality7_tvoc_ppb;
uint16_t airquality7_co2_ppm;
uint32_t airquality7_res_val_ohm;
airquality7_err_t airquality7_err_code;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
airquality7_cfg_t cfg;
uint8_t airquality7_rev_year = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_month = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_day = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_ascii_code = AIRQUALITY7_DUMMY;
/**
* 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.
airquality7_cfg_setup( &cfg );
AIRQUALITY7_MAP_MIKROBUS( cfg, MIKROBUS_1 );
airquality7_init( &airquality7, &cfg );
airquality7_tvoc_ppb = AIRQUALITY7_DUMMY;
airquality7_co2_ppm = AIRQUALITY7_DUMMY;
airquality7_res_val_ohm = AIRQUALITY7_DUMMY;
airquality7_err_code = airquality7_get_revision( &airquality7,
&airquality7_rev_year,
&airquality7_rev_month,
&airquality7_rev_day,
&airquality7_rev_ascii_code );
if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
{
log_printf( &logger, " Revision date: %.2u.%.2u.%.2u\r\n", ( uint16_t ) airquality7_rev_day,
( uint16_t ) airquality7_rev_month,
( uint16_t ) airquality7_rev_year );
log_printf( &logger, " ASCII code for a charter: %u \r\n", ( uint16_t ) airquality7_rev_ascii_code );
}
else
{
log_printf( &logger, "CRC ERROR READING REVISION. \r\n" );
Delay_ms ( 1000 );
for ( ; ; )
{
log_printf( &logger, "PLEASE, RESTART YOUR SYSTEM...\r\n" );
Delay_ms ( 1000 );
log_printf( &logger, " \r\n \r\n " );
Delay_ms ( 1000 );
}
}
log_printf( &logger, "----------------------------------------- \r\n" );
Delay_ms ( 500 );
}
void application_task ( void )
{
airquality7_err_code = airquality7_get_status( &airquality7,
&airquality7_tvoc_ppb,
&airquality7_co2_ppm,
&airquality7_res_val_ohm,
AIRQUALITY7_NULL );
if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
{
uint8_t cnt;
log_printf( &logger, " tVOC [ppb] = %u \r\n", airquality7_tvoc_ppb );
log_printf( &logger, " CO2 [ppm] = %u \r\n", airquality7_co2_ppm );
log_printf( &logger, " Resistor value [ohm] = %lu \r\n", airquality7_res_val_ohm );
log_printf( &logger, "----------------------------------------- \r\n" );
}
Delay_ms ( 1000 );
Delay_ms ( 500 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
/*!
* \file
* \brief AirQuality7 Click example
*
* # Description
* This demo application measures air quality.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes I2C driver and reads revision date of the module.
* If CRC check is OK allows the program to go on, otherwise, it displays a message that
* the program needs to be restarted.
*
* ## Application Task
* Reads air quality status every 1500ms and shows the results on the USB UART.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "airquality7.h"
// ------------------------------------------------------------------ VARIABLES
static airquality7_t airquality7;
static log_t logger;
uint16_t airquality7_tvoc_ppb;
uint16_t airquality7_co2_ppm;
uint32_t airquality7_res_val_ohm;
airquality7_err_t airquality7_err_code;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
airquality7_cfg_t cfg;
uint8_t airquality7_rev_year = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_month = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_day = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_ascii_code = AIRQUALITY7_DUMMY;
/**
* 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.
airquality7_cfg_setup( &cfg );
AIRQUALITY7_MAP_MIKROBUS( cfg, MIKROBUS_1 );
airquality7_init( &airquality7, &cfg );
airquality7_tvoc_ppb = AIRQUALITY7_DUMMY;
airquality7_co2_ppm = AIRQUALITY7_DUMMY;
airquality7_res_val_ohm = AIRQUALITY7_DUMMY;
airquality7_err_code = airquality7_get_revision( &airquality7,
&airquality7_rev_year,
&airquality7_rev_month,
&airquality7_rev_day,
&airquality7_rev_ascii_code );
if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
{
log_printf( &logger, " Revision date: %.2u.%.2u.%.2u\r\n", ( uint16_t ) airquality7_rev_day,
( uint16_t ) airquality7_rev_month,
( uint16_t ) airquality7_rev_year );
log_printf( &logger, " ASCII code for a charter: %u \r\n", ( uint16_t ) airquality7_rev_ascii_code );
}
else
{
log_printf( &logger, "CRC ERROR READING REVISION. \r\n" );
Delay_ms ( 1000 );
for ( ; ; )
{
log_printf( &logger, "PLEASE, RESTART YOUR SYSTEM...\r\n" );
Delay_ms ( 1000 );
log_printf( &logger, " \r\n \r\n " );
Delay_ms ( 1000 );
}
}
log_printf( &logger, "----------------------------------------- \r\n" );
Delay_ms ( 500 );
}
void application_task ( void )
{
airquality7_err_code = airquality7_get_status( &airquality7,
&airquality7_tvoc_ppb,
&airquality7_co2_ppm,
&airquality7_res_val_ohm,
AIRQUALITY7_NULL );
if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
{
uint8_t cnt;
log_printf( &logger, " tVOC [ppb] = %u \r\n", airquality7_tvoc_ppb );
log_printf( &logger, " CO2 [ppm] = %u \r\n", airquality7_co2_ppm );
log_printf( &logger, " Resistor value [ohm] = %lu \r\n", airquality7_res_val_ohm );
log_printf( &logger, "----------------------------------------- \r\n" );
}
Delay_ms ( 1000 );
Delay_ms ( 500 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
/*!
* \file
* \brief AirQuality7 Click example
*
* # Description
* This demo application measures air quality.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes I2C driver and reads revision date of the module.
* If CRC check is OK allows the program to go on, otherwise, it displays a message that
* the program needs to be restarted.
*
* ## Application Task
* Reads air quality status every 1500ms and shows the results on the USB UART.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "airquality7.h"
// ------------------------------------------------------------------ VARIABLES
static airquality7_t airquality7;
static log_t logger;
uint16_t airquality7_tvoc_ppb;
uint16_t airquality7_co2_ppm;
uint32_t airquality7_res_val_ohm;
airquality7_err_t airquality7_err_code;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
airquality7_cfg_t cfg;
uint8_t airquality7_rev_year = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_month = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_day = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_ascii_code = AIRQUALITY7_DUMMY;
/**
* 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.
airquality7_cfg_setup( &cfg );
AIRQUALITY7_MAP_MIKROBUS( cfg, MIKROBUS_1 );
airquality7_init( &airquality7, &cfg );
airquality7_tvoc_ppb = AIRQUALITY7_DUMMY;
airquality7_co2_ppm = AIRQUALITY7_DUMMY;
airquality7_res_val_ohm = AIRQUALITY7_DUMMY;
airquality7_err_code = airquality7_get_revision( &airquality7,
&airquality7_rev_year,
&airquality7_rev_month,
&airquality7_rev_day,
&airquality7_rev_ascii_code );
if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
{
log_printf( &logger, " Revision date: %.2u.%.2u.%.2u\r\n", ( uint16_t ) airquality7_rev_day,
( uint16_t ) airquality7_rev_month,
( uint16_t ) airquality7_rev_year );
log_printf( &logger, " ASCII code for a charter: %u \r\n", ( uint16_t ) airquality7_rev_ascii_code );
}
else
{
log_printf( &logger, "CRC ERROR READING REVISION. \r\n" );
Delay_ms ( 1000 );
for ( ; ; )
{
log_printf( &logger, "PLEASE, RESTART YOUR SYSTEM...\r\n" );
Delay_ms ( 1000 );
log_printf( &logger, " \r\n \r\n " );
Delay_ms ( 1000 );
}
}
log_printf( &logger, "----------------------------------------- \r\n" );
Delay_ms ( 500 );
}
void application_task ( void )
{
airquality7_err_code = airquality7_get_status( &airquality7,
&airquality7_tvoc_ppb,
&airquality7_co2_ppm,
&airquality7_res_val_ohm,
AIRQUALITY7_NULL );
if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
{
uint8_t cnt;
log_printf( &logger, " tVOC [ppb] = %u \r\n", airquality7_tvoc_ppb );
log_printf( &logger, " CO2 [ppm] = %u \r\n", airquality7_co2_ppm );
log_printf( &logger, " Resistor value [ohm] = %lu \r\n", airquality7_res_val_ohm );
log_printf( &logger, "----------------------------------------- \r\n" );
}
Delay_ms ( 1000 );
Delay_ms ( 500 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
/*!
* \file
* \brief AirQuality7 Click example
*
* # Description
* This demo application measures air quality.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes I2C driver and reads revision date of the module.
* If CRC check is OK allows the program to go on, otherwise, it displays a message that
* the program needs to be restarted.
*
* ## Application Task
* Reads air quality status every 1500ms and shows the results on the USB UART.
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "airquality7.h"
// ------------------------------------------------------------------ VARIABLES
static airquality7_t airquality7;
static log_t logger;
uint16_t airquality7_tvoc_ppb;
uint16_t airquality7_co2_ppm;
uint32_t airquality7_res_val_ohm;
airquality7_err_t airquality7_err_code;
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
airquality7_cfg_t cfg;
uint8_t airquality7_rev_year = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_month = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_day = AIRQUALITY7_DUMMY;
uint8_t airquality7_rev_ascii_code = AIRQUALITY7_DUMMY;
/**
* 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.
airquality7_cfg_setup( &cfg );
AIRQUALITY7_MAP_MIKROBUS( cfg, MIKROBUS_1 );
airquality7_init( &airquality7, &cfg );
airquality7_tvoc_ppb = AIRQUALITY7_DUMMY;
airquality7_co2_ppm = AIRQUALITY7_DUMMY;
airquality7_res_val_ohm = AIRQUALITY7_DUMMY;
airquality7_err_code = airquality7_get_revision( &airquality7,
&airquality7_rev_year,
&airquality7_rev_month,
&airquality7_rev_day,
&airquality7_rev_ascii_code );
if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
{
log_printf( &logger, " Revision date: %.2u.%.2u.%.2u\r\n", ( uint16_t ) airquality7_rev_day,
( uint16_t ) airquality7_rev_month,
( uint16_t ) airquality7_rev_year );
log_printf( &logger, " ASCII code for a charter: %u \r\n", ( uint16_t ) airquality7_rev_ascii_code );
}
else
{
log_printf( &logger, "CRC ERROR READING REVISION. \r\n" );
Delay_ms ( 1000 );
for ( ; ; )
{
log_printf( &logger, "PLEASE, RESTART YOUR SYSTEM...\r\n" );
Delay_ms ( 1000 );
log_printf( &logger, " \r\n \r\n " );
Delay_ms ( 1000 );
}
}
log_printf( &logger, "----------------------------------------- \r\n" );
Delay_ms ( 500 );
}
void application_task ( void )
{
airquality7_err_code = airquality7_get_status( &airquality7,
&airquality7_tvoc_ppb,
&airquality7_co2_ppm,
&airquality7_res_val_ohm,
AIRQUALITY7_NULL );
if ( airquality7_err_code == AIRQUALITY7_ERR_OK )
{
uint8_t cnt;
log_printf( &logger, " tVOC [ppb] = %u \r\n", airquality7_tvoc_ppb );
log_printf( &logger, " CO2 [ppm] = %u \r\n", airquality7_co2_ppm );
log_printf( &logger, " Resistor value [ohm] = %lu \r\n", airquality7_res_val_ohm );
log_printf( &logger, "----------------------------------------- \r\n" );
}
Delay_ms ( 1000 );
Delay_ms ( 500 );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END