How does it work?
Environment 2 Click as its foundation uses the SHT40 and SGP40, a high-accuracy best-in-class SHT relative humidity, and a temperature sensor combined with MOx based gas sensor from Sensirion. The SHT40 offers reduced power consumption, improved accuracy specifications, and a fully calibrated digital I2C Fast Mode Plus interface for the fastest data transfer. It covers extended operating humidity and temperature ranges from 0 to 100%RH and from -40°C to 125°C with accuracies of ±1.8%RH and ±0.2°C. On the other side, an additional gas sensor of this combo solution, the SGP40, provides a humidity-compensated VOC-based indoor air quality signal in addition to a temperature-controlled micro hot-plate.
The SHT40 shows the best performance when operated within the recommended average temperature and humidity range of 5-60°C and 20-80%RH. Long-term exposure to conditions outside recommended normal range, especially at high relative humidity, may temporarily offset the RH signal. After returning to the recommended average temperature and humidity range, the sensor will recover to within specifications by itself.
The output signal of the SGP40 is processed by Sensirion’s VOC Algorithm, which automatically adapts to the environment the sensor is exposed to translate the raw signal into a VOC Index. Sensing element and VOC Algorithm feature unmatched robustness against contaminating gases present in real-world applications enabling exceptional long-term stability and low drift, high reproducibility, and reliability.
Environment 2 Click communicates with MCU using the standard I2C 2-Wire interface. Since both sensors for operation requires a 3.3V logic voltage level only, this Click board™ also features the PCA9306 voltage-level translator from Texas Instruments. The I2C interface bus lines are routed to the dual bidirectional voltage-level translator, allowing this Click board™ to work with both 3.3V and 5V MCUs properly.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VIO SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to properly use the I2C communication lines. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Environmental
Applications
Can be used for indoor air quality and various temperature and humidity-related applications.
On-board modules
SHT40 and SGP40 – high-accuracy best-in-class SHT relative humidity, and a temperature sensor combined with MOx based gas sensor from Sensirion
Key Features
Low power consumption, high accuracy, covers extended operating humidity and temperature ranges, long-term stability and lifetime, and more.
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Environment 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VIO SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Environment 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
SHT40 Temperature Accuracy | – | ±0.2 | – | °C |
SHT40 Relative Humidity Accuracy | – | ±1.8 | – | %RH |
SHT40 Operating Humidity Range | 0 | – | 100 | %RH |
SGP40 Measurement Range | 0 | – | 1000 | ppm |
SGP40 Operating Humidity Range | 0 | – | 90 | %RH |
Operating Temperature Range | -10 | +25 | +50 | °C |
Software Support
We provide a library for the Environment 2 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 Environment 2 Click driver.
Key functions:
environment2_cfg_setup
– Config Object Initialization function.environment2_init
– Initialization function.environment2_default_cfg
– Click Default Configuration function.
Examples description
This library contains API for Environment 2 Click driver. The library contains drivers for measuring air quality, temperature and relative humidity.
The application is composed of three sections :
void application_init ( void ) { log_cfg_t log_cfg; /**< Logger config object. */ environment2_cfg_t environment2_cfg; /**< Click config object. */ // Logger initialization. LOG_MAP_USB_UART( log_cfg ); log_cfg.level = LOG_LEVEL_DEBUG; log_cfg.baud = 115200; log_init( &logger, &log_cfg ); log_printf( &logger, "rn Application Initrn" ); // Click initialization. environment2_cfg_setup( &environment2_cfg ); ENVIRONMENT2_MAP_MIKROBUS( environment2_cfg, MIKROBUS_1 ); err_t init_flag = environment2_init( &environment2, &environment2_cfg ); if ( init_flag == I2C_MASTER_ERROR ) { log_error( &logger, " Application Init Error. " ); log_printf( &logger, " Please, run program again... " ); for ( ; ; ); } log_printf( &logger, " Application Task rn" ); log_printf( &logger, "-----------------------rn" ); log_printf( &logger, " Environment 2 Click rn" ); log_printf( &logger, "-----------------------rn" ); if ( environment2_sgp40_measure_test( &environment2 ) == ENVIRONMENT2_SGP40_TEST_PASSED ) { log_printf( &logger, " All tests passedrn" ); log_printf( &logger, " Successfullyrn" ); } else { log_printf( &logger, " One or more tests havern" ); log_printf( &logger, " Failedrn" ); } log_printf( &logger, "-----------------------rn" ); Delay_ms( 100 ); environment2_sgp40_heater_off( &environment2 ); Delay_ms( 100 ); }
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.Environment2
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This 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.
For more information about mikroSDK, visit the official page.