How does it work?
Environment 4 Click is based on the SHT41A-AD1B, a 4th-generation high-accuracy SHT relative humidity and temperature sensor, combined with the SGP41 MOx-based gas sensor from Sensirion. Based on Sensirion’s proven CMOSens® Technology and long-standing experience in humidity sensing, the SHT41A-AD1B ensures the highest precision. It covers extended operating humidity and temperature ranges from 0 to 100%RH and from -40°C to 125°C with accuracies of ±2%RH and ±0.3°C. The SHT41A-AD1B also specializes in automotive applications, fulfilling reliability requirements such as 85°C/85%RH accelerated life tests and AEC Q100 qualification.
The SHT41A-AD1B 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. The complementary part of this combo solution is the SGP41, Sensirion’s new MOx-based gas sensor, that provides one VOC and one NOx-based indoor air quality signal.
As mentioned, the SGP41 provides two raw digital signals that are sensitive to most VOCs typically found in indoor environments, plus oxidizing gases such as NOx or O3. This featuremeans that this board can be used to constantly monitor the VOC and NOx situation, including potentially harmful events which humans cannot perceive. The raw signals are proportional to the logarithm of the resistance of the sensing material and are processed by Sensirion’s mighty Gas Index Algorithm. This can be used to automatically trigger the removal of indoor air gas pollutants by air treatment devices without requiring a manual user intervention.
Environment 4 Click communicates with MCU using the standard I2C 2-Wire interface. Since both sensors require only a 3.3V logic voltage level for operation , 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 appropriately with both 3.3V and 5V MCUs.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, for both 3.3V and 5V capable MCUs can use the communication lines correctly. 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 measuring relative humidity and temperature in air purifiers or demand-controlled ventilation systems
On-board modules
SHT41A-AD1B – 4th-generation high-accuracy SHT relative humidity, and a temperature sensor from Sensirion
SGP41 – 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, I2C interface, and more
Interface
I2C
Feature
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 4 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 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Environment 4 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
SHT41A Temperature Accuracy | – | ±0.3 | – | °C |
SHT41A Relative Humidity Accuracy | – | ±2 | – | %RH |
SGP41 Measurement Range (TVOC) | 0 | – | 1000 | ppm |
Software Support
We provide a library for the Environment 4 Click as well as a demo application (example), developed using Mikroe compilers. The demo can run on all the main Mikroe development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Environment 4 Click driver.
Key functions
-
environment4_sht_read_meas_hp
This function reads the temperature and humidity measurements with high precision from SHT41A device. -
environment4_sgp_exe_conditioning
This function executes conditioning command for SGP41 device by using I2C serial interface. -
environment4_sgp_meas_raw_signals
This function measures raw signals for SGP41 device by using I2C serial interface.
Example Description
This example demonstrates the use of Environment 4 Click board™ by reading the temperature and humidity data and calculating VOC and NOx indexes.
void application_task ( void )
{
float temperature, humidity;
uint16_t comp_rh, comp_t, sraw_voc, sraw_nox;
int32_t voc_index, nox_index;
static uint8_t conditioning_num = 10;
Delay_ms ( 1000 );
if ( ENVIRONMENT4_OK == environment4_sht_read_meas_hp ( &environment4, &temperature, &humidity ) )
{
log_printf ( &logger, "rn Temperature: %.2f degCrn", temperature );
log_printf ( &logger, " Humidity: %.2f %%RHrn", humidity );
comp_rh = ( uint16_t ) ( humidity * ENVIRONMENT4_SHT_DATA_RESOLUTION /
( ENVIRONMENT4_SHT_ABS_MAX_HUM - ENVIRONMENT4_SHT_ABS_MIN_HUM ) );
comp_t = ( uint16_t ) ( ( temperature - ENVIRONMENT4_SHT_ABS_MIN_TEMP ) * ENVIRONMENT4_SHT_DATA_RESOLUTION /
( ENVIRONMENT4_SHT_ABS_MAX_TEMP - ENVIRONMENT4_SHT_ABS_MIN_TEMP ) );
if ( conditioning_num )
{
if ( ENVIRONMENT4_OK == environment4_sgp_exe_conditioning ( &environment4, comp_rh, comp_t, &sraw_voc ) )
{
conditioning_num--;
}
}
else
{
if ( ENVIRONMENT4_OK == environment4_sgp_meas_raw_signals ( &environment4, comp_rh, comp_t, &sraw_voc, &sraw_nox ) )
{
GasIndexAlgorithm_process( &voc_params, ( int32_t ) sraw_voc, &voc_index );
GasIndexAlgorithm_process( &nox_params, ( int32_t ) sraw_nox, &nox_index );
log_printf ( &logger, " VOC Index: %ldrn", voc_index );
log_printf ( &logger, " NOx Index: %ldrn", nox_index );
}
}
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Environment4
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. A UART terminal is available in all Mikroe compilers.
mikroSDK
This Click board™ is supported with mikroSDK – Mikroe 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.