How does it work?
Thermo 18 Click as its foundation uses the WSEN-TIDS (2521020222501), a silicon-based, high-resolution digital temperature sensor from Würth Elektronik. This temperature sensor is characterized by high accuracy; temperature range of -40°C to +125°C provides ±0.5°C accuracy, while a range of -10°C to +60°C it goes down to ±0.25°C. WSEN-TIDS sensor is factory-calibrated and can be used without time-consuming re-measurements. It features a 16-bit output signal that can be read out via an I2C serial interface with output data rates up to a maximum of 200Hz.
This Click board™ can be configured in the three following operational modes: Power-down mode, Single conversion mode, and Continuous mode. In Power-down mode, the digital chain that samples the temperature data is turned off, and the current consumption is at its minimum. Before going into this mode, the temperature data registers retain the last sampled temperature value. However, serial communication with the host controller via the I2C bus is still possible, allowing the user to configure the device by accessing the control registers and temperature threshold registers.
The Single conversion mode can activate when the sensor is still in a Power-down mode allowing a single temperature measurement to be performed according to the request of the host controller, while the continuous mode constantly samples new temperature measurements and writes the data to the temperature data registers. Once the device is configured in one of the operating modes, temperature values are sampled and stored in the temperature data registers, available for the user to read.
Thermo 18 Click communicates with MCU using the standard I2C 2-Wire interface with a frequency of 400kHz in Fast Mode and up to 1MHz in Fast Mode Plus. Also, the WSEN-TIDS features an interrupt signal routed on the INT pin of the mikroBUS™ socket, which indicates when a new set of measured temperature data are available, simplifying data synchronization in the digital system that uses the device. Besides, it also allows the choice of the least significant bit of its I2C slave address by positioning the SMD jumper labeled as ADDR SEL to an appropriate position marked as 0 and 1.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before use with 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 industrial control, environmental monitoring, domestic appliances, HVAC systems, or other temperature measurement applications
On-board modules
WSEN-TIDS – silicon-based, high-resolution digital temperature sensor from Würth Elektronik
Key Features
Low power consumption, high accuracy, high resolution, output data rate up to 200Hz, programmable temperature threshold, 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 Thermo 18 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 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
Thermo 18 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Absolute Accuracy | – | 3.3 | – | V |
Absolute Accuracy | – | ±0.25 | – | °C |
Resolution | – | 16 | – | bit |
Output Data Rate | 25 | – | 200 | Hz |
Operating Temperature Range | -40 | +25 | +125 | °C |
Software Support
We provide a library for the Thermo 18 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 Thermo 18 Click driver.
Key functions:
thermo18_read_temperature
– Reads and calculates temperature value.thermo18_set_temperature_threshold
– Sets temperature threshold.thermo18_reset
– Resets device.
Example description
The example application showcases ability of device to read temperature and detect and assert interrupt on undertemperature or overtemperature thresholds.
void application_task ( void ) { uint8_t status; thermo18_generic_read( &thermo18, THERMO18_REG_STATUS, &status ); //Check if data is ready if ( THERMO18_STATUS_DATA_READY == ( status & THERMO18_STATUS_DATA_BUSY ) ) { //Temperature reading float temp = 0.0; thermo18_read_temperature( &thermo18, &temp ); log_printf( &logger, " > Temperature[degC]: %.2frn", temp ); //Check threshold if ( 0 != status ) { if ( THERMO18_STATUS_OVERTEMPERATURE == status ) { log_info( &logger, " Overtemperature Threshold detected." ); } else if ( THERMO18_STATUS_UNDERTEMPERATURE == status ) { log_info( &logger, " Undertemperature Threshold detected." ); } } //Re-Enable One shot reading thermo18_generic_write( &thermo18, THERMO18_REG_CTRL, THERMO18_CONTROL_ONESHOT_ENABLED ); } Delay_ms( 300 ); }
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.Thermo18
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.