How does it work?
Temp&Hum Click is based on the HTS221, high-accuracy 16-bit relative humidity and temperature sensor from STMicroelectronics. The HTS221 includes a sensing element and a mixed signal ASIC offering reduced power consumption, accuracy, and a digital I2C interface for the fastest data transfer. The sensing element consists of a polymer dielectric planar capacitor structure capable of detecting relative humidity variations and is manufactured using a dedicated ST process. It covers extended operating humidity, and temperature ranges from 0 to 100%RH and from 0°C to 60°C with accuracies of ±5%RH and ±1°C.
The HTS221 communicates with MCU using the standard I2C 2-wire interface with additional data ready signal routed on the INT pin of the mikroBUS™ socket labeled as DR. The sensor performs best when operated within the recommended average temperature and humidity range of 15-40°C and 20-80% RH. Long-term exposure to conditions outside the 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 complete measurement chain consists of a low-noise capacitive amplifier, which converts the capacitive imbalance of the humidity sensor into an analog voltage signal. After that, an analog-to-digital converter generates the 16-bit digital data information.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used as a reference for further development.
Specifications
Type
Temperature & humidity
Applications
Can be used for various consumer applications such as air conditioning, ventilation and heating, smart home and industrial automation, and more
On-board modules
HTS221 – relative humidity and temperature sensor from STMicroelectronics
Key Features
Low power consumption, high sensitivity, high accuracy, embedded 16-bit ADC, I2C interface with data ready signal, factory calibrated, wide operating range, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Temp&Hum 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 |
Temp&Hum Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Operating Humidity Range | 0 | – | 100 | %RH |
Operating Temperature Range | 0 | +25 | +60 | °C |
Resolution | – | 16 | – | bit |
Humidity Sensitivity | – | 0.004 | – | %rH/LSB |
Humidity Accuracy | – | ±5 | – | %RH |
Temperature Sensitivity | – | 0.016 | – | °C/LSB |
Temperature Accuracy | – | ±1 | – | °C |
Software Support
We provide a library for the Temp Hum 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 Temp Hum Click driver.
Key functions
-
Function gets temperature value in degrees Celsius [ C ]
two target 8-bit register address of HTS221 sensor on Temp&Hum Click
-
Function get temperature value in degrees Celsius [ C ]
-
Function get humidity value in percentage [ % ]
Example Description
This application measures temperature and humidity, with temperature in range of 0 – 60 deg.
void application_task ( void )
{
// Task implementation.
float temperature;
float humidity;
temperature = temphum_get_temperature( &temphum );
humidity = temphum_get_humidity( &temphum );
log_printf( &logger, " Temperature : %.2f Crn", temperature );
log_printf( &logger, " Humidity : %.2f %%rn", humidity );
log_printf( &logger, "--------------------------rn" );
Delay_ms( 3000 );
}
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.TempHum
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 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.