How does it work?
Temp&Hum 19 Click as its foundation uses the BPS240, relative humidity, and temperature sensor from Bourns. The BPS240 is based on innovative MEMS technology, which provides highly accurate condition readings. The humidity can be measured within a range of 0 to 100 %RH, while the temperature sensor is designed for a range of -30 to +100 °C. The enhanced features include a faster response time of less than one second with digital output and higher accuracy, with a typical RH accuracy of 2% in the measuring range of 20 up to 80 %RH at ambient temperature, and ±0.3 °C for its operating temperature range with low power consumption.
Temp&Hum 19 Click communicates with MCU using the standard I2C 2-Wire interface to read data supporting Standard Mode operation with a clock frequency up to 100kHz, providing 10-bit data to the host controller. The output data is processed and compensated by the BPS240 sensor itself, requiring only basic conversion formulas to be applied within the firmware of the host controller. These conversion formulas are given in the BPS240 datasheet and directly provide readings in °C and %RH.
This Click board™ also possesses enabling function, the Enable pin labeled as EN and routed to the PWM pin of the mikroBUS™ socket, which activates and powers up the BPS240 (used for power ON/OFF purposes), and thus enables optimizes power consumption.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. 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
Temperature & humidity
Applications
Can be used for various temperature and humidity-related applications and a vast number of applications ranging from HVAC systems, climate monitoring up to diagnostic and analysis equipment, and many more
On-board modules
BPS240 – relative humidity, and temperature sensor from Bourns
Key Features
Low power consumption, fully-calibrated and temperature-compensated, high precision and accuracy, I2C interface, reliable in harsh environments, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Temp&Hum 19 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 |
Temp&Hum 19 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Humidity Measurement Range | 0 | – | 100 | %RH |
Humidity Accuracy | – | ±2 | – | %RH |
Resolution | – | 10 | – | bits |
Temperature Accuracy | – | ±0.3 | – | °C |
Operating Temperature Range | -30 | +25 | +100 | °C |
Software Support
We provide a library for the Temp&Hum 19 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 Temp&Hum 19 Click driver.
Key functions
-
temphum19_restart_chip
This function restarts the chip by toggling the EN pin state. -
temphum19_set_mode_reg
This function programs the mode register with a desired mode value, and stores it to the ctx->detection_mode variable. -
temphum19_read_data
This function reads temperature and humidity raw data and converts them to Celsius and Percents respectfully.
Example Description
This example demonstrates the use of Temp & Hum 19 Click board™ by reading the temperature and humidity data.
void application_task ( void )
{
float temperature, humidity;
if ( TEMPHUM19_OK == temphum19_read_data ( &temphum19, &temperature, &humidity ) )
{
log_printf ( &logger, " Temperature: %.1f Crn", temperature );
log_printf ( &logger, " Humidity: %.2f %%rnn", humidity );
Delay_ms ( 1000 );
}
}
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.TempHum19
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 MikroElektronika compilers.
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.