How does it work?
The active temperature sensing component on Thermo 14 Click is the STTS22H, a high accuracy temperature sensor IC with the 2-Wire interface, from STMicroelectronics. The sensor operating mode is user-configurable and allows selecting between different ODRs (down to 1 Hz) or the one-shot mode for battery saving. In one-shot mode, the sensor current consumption falls to 1.75 µA.
The Click board™ itself has a reasonably small number of components because most of the measurement circuitry is already integrated on the STTS22H sensor. The I2C / SMBus 3.0 compatible serial interface lines, along with the INT pin, which also works in the open drain configuration, are pulled up by the onboard resistors. The 2-Wire lines are routed to the respective I2C lines of the mikroBUS™ (SCK and SDA), while the INT pin is routed to the INT pin of the mikroBUS™.
The STTS22H INT pin is asserted (low) whenever the temperature is equal to or exceeds the high limit or is below the low limit. Once asserted, the output will remain asserted until the STTS22H receives an SMBus Alert Response Address (ARA) from the host and acknowledges with its slave address.
The I2C address can be selected with the ADDR SEL onboard SMD jumper. The I2C address can be changed by this jumper, allowing for more than one of these click boards to be used on a system, each with the different I2C address.
This 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.
Specifications
Type
Temperature & humidity
Applications
can be used for a rapid development and testing of various applications based on wereable devices, smart home automation, smartphones, HVAC, refrigerators, white goods, thermostats…
On-board modules
Thermo 14 Click uses the STTS22H IC, a high accuracy temperature sensor, from STMicroelectronics.
Key Features
Low temperature drift, low power consumption, programmable alert engine, compact sensor size, critical temperature warnings
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 14 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 | Communication interface selection: left position 0, right position 1 |
Software Support
We provide a library for the Thermo 14 Click 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
The library covers all the necessary functions that enables the usage of the Thermno 14 Click board. It holds functions that allow full control of the device to the user. User can calibrate the device, read temperature or read raw values if necessary.
Key functions:
float thermo14_get_temperature ( );
– Function is used to get the temperature.float thermo14_raw_to_celsius ( int16_t temp_raw );
– Function is used to perform necessary calculacion in order to get temperature freom raw data.int16_t thermo14_temp_raw_get ( );
– Function is used to get the raw value.
Examples description
The application is composed of three sections :
- System Initialization – Initializes GPIO, SPI and LOG structures.
- Application Initialization – Initalizes SPI driver, sets up the device and makes an initial log.
- Application Task – (code snippet) This example shows capabilities of Thermo 14 click by measuring temperature every 3 seconds and displaying temperature in degrres Celsius via USART terminal.
void application_task ( ) { temp_val = thermo14_get_temperature( ); mikrobus_logWrite( " Temperature: ", _LOG_TEXT ); log_display( temp_val ); mikrobus_logWrite( deg_cel, _LOG_LINE ); mikrobus_logWrite( "----------------------", _LOG_LINE ); Delay_ms( 3000 ); }
Additional Functions :
- void log_display( float value ) – Function displays readings as floating point value with two decimal places
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 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.