Temp&Hum 13 Click Board
Temp&Hum 13 Click Board
The Temp&Hum 13 Click Board™ is a Click Board™ which is perfectly suited for measuring the relative humidity (RH) and temperature. The Click Board™ is equipped with the HTU21DF, an accurate and reliable sensor IC, packed in a miniature 3x3mm DFN package.
This sensor is fully calibrated and features fast response time, low power consumption, full interchangeability with no calibration required, instantaneous desaturation after long periods in saturation phase and many more. This Click Board™ can be used for the development of the many different relative humidity and temperature measuring applications, including weather stations, reliable monitoring systems, asset tracking, HVAC/R based applications, and more.
The Temp&Hum 13 Click Board™ can measure the humidity in the range from 0 to 100 %RH and temperature in the range from -40 °C to +125 °C, with the typical accuracy of ±2 %RH and ±0.3 ℃. It consumes small amounts of power while in operation, delivering processed and calibrated measurement values over the I2C interface. Thanks to its high reliability and long-term stability, Temp&Hum 13 Click Board™ is perfectly suited for various applications, including battery operated weather stations, reliable monitoring systems, asset tracking, HVAC/R based applications, and more. Due to its low-power consumption, this Click Board™ is a good solution for development of IoT-based and battery powered applications.
How Does The Temp&Hum 13 Click Board™ Work?
The sensor IC used on the Temp&Hum 13 Click Board™ is the HTU21DF, a digital relative humidity sensor with temperature output from TE connectivity. This sensor is factory calibrated to ±2% relative humidity and ±0.3°C temperature accuracy. It has an integrated heating element that is used for functionality diagnosis as well. This heating element can be simply activated by setting a bit in the appropriate register. In the case when the heater is powered on, the typical power consumption is about 5.5mW.
Internally, two sensors are connected to the two separated ADC sections with variable resolution of 12 -14 bits for the temperature and 8-12 bits for relative humiditiy measurement. The OTP memory holds the calibration coefficients that are applied to the measured value and the results are stored on the output registers, in the MSB/LSB format. These values are then used in formulas found in the HTU21DF datasheet so that the final temperature or relative humidity data can be calculated. It is also possible to correct the offsets with custom values.
The Temp&Hum 13 Click Board™ uses the I2C protocol to communicate with the host MCU. Its I2C bus pins are routed to the mikroBUS I2C pins and are pulled to a HIGH logic level by the onboard resistors. The final I2C address of this IC is factory determined. There are two different operation modes to communicate with the HTU21D sensor: Hold Master mode and No Hold Master mode. In the first case, the SCK line is blocked (controlled by HTU21D(F) sensor) during measurement process while in the second case the SCK line remain open for other communication while the sensor is processing the measurement.
The HTU21DF IC itself is a very low-power consumption device and it can work in two modes: sleep and active (measurement) mode. The device enters the sleep the mode as soon as possible, to save power. This makes the HTU21DF suitable to be used in battery-powered applications. In these applications, the HTU21DF spends most of the time in sleep mode, with the typical current consumption of 20 nA. While in the active mode, the typical current consumption is 450µA.
The provided Click Board™ library contains simple and easy to use functions, which simplify configuring and reading of the measurement data. These functions are demonstrated in the included example application and can be used as a reference for custom projects. These functions can be used in mikroC, mikroBasic and mikroPascal compilers for all MCU architectures, supported by MikroElektronika.
The Temp&Hum 13 Click Board™ is designed to be operated only with 3.3V logic level. A proper logic voltage level conversion should be performed before the Click Board™ is used with MCUs with logic levels of 5V. It is ready to be used as soon as it is inserted into a mikroBUS socket of the development system.
SPECIFICATIONS
Type | Temperature & humidity |
Applications | An ideal solution for development of various applications, including battery operated weather stations, reliable monitoring systems, asset tracking, HVAC/R based applications, and more. |
On-board modules | HTU21DF, a relative humidity and temperature sensor with I²C Interface, by TE connectivity. |
Key Features | High accuracy, good linearity, proven reliability, long-term stability, excellent repeatability, a low-power consumption, no calibration required, instantaneous desaturation after long periods in saturation phase, etc. |
Interface | I2C |
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 13 Click Board™ corresponds to the pinout on the mikroBUS socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | NC | ||
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
TEMP&HUM 13 Click Board™ ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Temperature Accuracy | - | +/-0.3 | - | °C |
Humidity Accuracy | - | +/-2 | - | % RH |
Operating temperature | -40 | - | 125 | °C |
Relative Humidity Operating Range | 0 | - | 100 | % RH |
I2C clock frequency | 10 | - | 400 | kHz |
Software Support
Software Support
We provide a library for the Temp&Hum 13 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library contains functions for getting temperature and humidity. Library contains functions for getting and setting user register. Library contains functions for changing resolution and soft reset. Library contains functions for enabling/disabling heater and OTP.
Key Functions
float temphum13_getTemperature(void)
- This function issues hold temperature measurement command, calculates CRC for temperature value, compares two CRC values and calculates temperature value.float temphum13_getHumidity(void)
- This function issues hold humidity measurement, calculates CRC for humidity value, compares two CRC values and calculates humidity value.void temphum13_setUserRegister( uint8_t register_content )
- sets user register content.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C and LOG modules.
- Application Initialization - Initializes I2C driver and issues soft reset command
- Application Task - Measures temperature and humidity values, checks if they are valid and logs them if they are
void applicationTask( ) { temperature = temphum13_getTemperature( ); humidity = temphum13_getHumidity( ); if (temperature != 65536.0) { FloatToStr( temperature, text ); FloatCut( ); mikrobus_logWrite( "> Temperature : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( celsius, _LOG_LINE ); } if (humidity != 65536.0) { FloatToStr( humidity, text ); FloatCut( ); mikrobus_logWrite( "> Humidity : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( " %RH", _LOG_LINE ); } mikrobus_logWrite( " ", _LOG_LINE ); Delay_ms(500); }
Additional Functions :
- FloatCut() - Rounds float number to two decimals
The full application code, and ready to use projects can be found on our LibStock page.
Other Mikroe Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The Temp&Hum 13 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.
Software Support
Software Support
We provide a library for the Temp&Hum 13 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Library contains functions for getting temperature and humidity. Library contains functions for getting and setting user register. Library contains functions for changing resolution and soft reset. Library contains functions for enabling/disabling heater and OTP.
Key Functions
float temphum13_getTemperature(void)
- This function issues hold temperature measurement command, calculates CRC for temperature value, compares two CRC values and calculates temperature value.float temphum13_getHumidity(void)
- This function issues hold humidity measurement, calculates CRC for humidity value, compares two CRC values and calculates humidity value.void temphum13_setUserRegister( uint8_t register_content )
- sets user register content.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C and LOG modules.
- Application Initialization - Initializes I2C driver and issues soft reset command
- Application Task - Measures temperature and humidity values, checks if they are valid and logs them if they are
void applicationTask( ) { temperature = temphum13_getTemperature( ); humidity = temphum13_getHumidity( ); if (temperature != 65536.0) { FloatToStr( temperature, text ); FloatCut( ); mikrobus_logWrite( "> Temperature : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( celsius, _LOG_LINE ); } if (humidity != 65536.0) { FloatToStr( humidity, text ); FloatCut( ); mikrobus_logWrite( "> Humidity : ", _LOG_TEXT ); mikrobus_logWrite( text, _LOG_TEXT ); mikrobus_logWrite( " %RH", _LOG_LINE ); } mikrobus_logWrite( " ", _LOG_LINE ); Delay_ms(500); }
Additional Functions :
- FloatCut() - Rounds float number to two decimals
The full application code, and ready to use projects can be found on our LibStock page.
Other Mikroe Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The Temp&Hum 13 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.
Temp&Hum 13 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.