Thermo 7 click is a Click board™ equipped with the sensor IC, which can digitize temperature measurements between -55°C and +125°C so that the temperature measurement data can be processed by the host MCU. Thermo 7 click provides an accuracy of ±1°C in the range from -10°C to +85°C. The sensor used on this Click board™ has a great combination of features that make it a perfect choice for any temperature measurement application: low power consumption, selectable sampling resolution, programmable interrupt engine, compact sensor size, alert output pin, and more. The sensor itself requires almost no external components, which simplifies the design, reducing the cost and cutting the time to market.
The Click boardâ„¢ is specially designed so it retains the specified characteristics of the sensor IC. Equipped with this sophisticated, accurate and simple to use sensor IC, it can be used for measuring and monitoring the temperature in a whole range of applications, such as the PC case and other internal components temperature monitoring, office equipment and entertainment systems thermal monitoring, general purpose thermal measurement, and similar digital thermal measurement applications, that require a precise thermal measurement and an overtemperature alert.
How does it work?
The active temperature sensing component on Thermo 7 click is the MCP9800, a high accuracy temperature sensor IC with the 2-Wire interface, from Microchip. The Click boardâ„¢ itself has a reasonably small number of components because most of the measurement circuitry is already integrated on the MCP9800 sensor. The I2C / SMBus compatible serial interface lines, along with the ALERT 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 ALERT pin is routed to the INT pin of the mikroBUSâ„¢.
The sensor IC uses the I2C/SMBus compatible communication interface. There are four registers, used to set the temperature limit, temperature hysteresis for the interrupt events, configuration register used to store all the working parameters, and the read-only register which holds the sampled temperature data. More information about all the registers can be found in the MCP9800 datasheet. However, provided library contains functions that simplify the use of the Thermo 7 click. The included application example demonstrates their functionality and it can be used as a reference for custom design.
An analog signal from the thermal sensor is sampled by the sigma-delta ADC converter, with the selectable resolution of 9, 10, 11 and 12 bits. The sampling resolution affects the temperature step sizes, as well as the time required to complete the conversion. The step sizes vary between the 0.5°C with 30ms of conversion time for 9bit sampling, and 0.0625°C with 240ms of conversion time for 12bit resolution. The selectable resolution allows a compromise to be made between the resolution and the conversion time, depending on the application requirements.
The ALERT pin is used to trigger an interrupt event on the host MCU. This pin has a programmable polarity: it can be set to be asserted either to a HIGH logic level or to a LOW logic level. Since the Click boardâ„¢ features a pull-up resistor, it is advised to set the polarity so that the asserted state drives the pin to a LOW logic level. A special mechanism is employed to reduce false ALERT triggering. This mechanism includes queueing of the cycles in which the temperature limit is exceeded. As already described, the ALERT pin is routed to the INT pin of the mikroBUSâ„¢.
The ALERT pin can be set to work in two different modes: Comparator mode and Interrupt mode.
When working in the Comparator mode, this pin will be triggered whenever a temperature limit is exceeded. The ALERT pin stays asserted until the temperature drops below the hysteresis level. Both values are set in the respective temperature registers (limit and hysteresis). This mode is useful for thermostat-like applications: it can be used to power down a system in case of overheating or turn off the cooling fan if the temperature is low enough.
If set to work in the Interrupt mode, the ALERT pin will stay asserted after exceeding the temperature limit, until any internal register is read. When the temperature drops below the hysteresis level, the ALERT pin will be asserted again, waiting for the internal registers to be read once again. This mode is used to trigger an interrupt on the host MCU, which is supposed to read the sensor when the interrupt event is generated.
The device can be set to work in several different power modes. It can be set to continuously sample the temperature measurements, it can be set to work in the one-shot mode, and it can be set to stay in the shutdown mode. The shutdown mode consumes the least power, keeping all the internal sections but the communication section, unpowered. The one-shot mode allows the device to stay in the shutdown mode, run a single conversion cycle on demand, and the revert back to the shutdown mode. This allows for a lower power consumption.
The design of the Click boardâ„¢ itself is such that the thermal radiation from other components, which might affect the environmental temperature readings of the sensor, is reduced. The onboard SMD jumper labeled as VCC SEL allows voltage selection for interfacing with both 3.3V and 5V MCUs.
Specifications
Type |
Temperature / Humidity |
Applications |
It can be used for the PC case temperature monitoring, office equipment, and entertainment systems thermal monitoring, general purpose thermal measurement, etc. |
On-board modules |
MCP9800, a high accuracy temperature sensor IC with the 2-Wire interface, from Microchip |
Key Features |
Low power consumption, selectable sampling resolution, programmable interrupt engine, compact sensor size, alert output pin, low components count, PCB design which retains sensor specifications, etc. |
Interface |
I2C |
Input Voltage |
3.3V or 5V |
Click board size |
M (42.9 x 25.4 mm) |
Pinout diagram
This table shows how the pinout on Thermo 7 click 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 |
INT |
Interrupt output |
|
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 |
+3V3 |
7 |
3.3V |
5V |
10 |
+5V |
Power Supply |
Ground |
GND |
8 |
GND |
GND |
9 |
GND |
Ground |
Thermo 7 click maximum ratings
Description | Min | Typ | Max | Unit |
---|
Temperature Range (accuracy ±3°C) |
-55 |
- |
+125 |
°C |
Temperature Range (accuracy ±1°C) |
-10 |
- |
85 |
°C |
Communication speed |
0 |
- |
400 |
kHz |
Conversion time (min 9bit, max 12bit) |
30 |
- |
600 |
ms |
Onboard settings and indicators
Label | Name | Default | Description |
---|
JP1 |
- |
Left |
Power Supply Voltage Selection: Left position 3V3, right position 5V |
LD1 |
PWR |
|
PWR indication LED |
Software support
We provide a library for Thermo 7 click on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
Library Description
The library initializes and defines I2C bus drivers and driver functions that offer a choice for writing data in registers and reading data from registers. The library offers the possibility of setting the upper and lower temperature limits, and the main thing is reading the ambient temperature.ADC resolution can be set to 9bit, 10bit, 11bit or 12bit, with an accuracy of 0.5 C, 0.25 C, 0.125 C or 0.0625 C. The user can adjust the state and behavior of interrupt pins in the set modes. Modes that can be set are Interrupt mode and Comparator mode..
Key functions:
float thermo7_readAmbientTemperature()
- Function reads ambient temperature
void thermo7_setConfiguration(uint8_t configuration)
- Function for configuration chip and measurement
void thermo7_setResolution(uint8_t resolution)
- Function sets ADC resolution measurement
Examples Description
The application is composed of three sections:
- System Initialization - Initializes I2C module and sets INT pin as INPUT.
- Application Initialization - Initializes driver init and configuration chip and measurement resolutions.
- Application Task - (code snippet) - Reads ambient temperature and logs to USBUART every 1 second.
void applicationTask()
{
AmbientTemperature = thermo7_readAmbientTemperature();
FloatToStr( AmbientTemperature, tempText );
mikrobus_logWrite( " Ambient temperature : ", _LOG_TEXT );
mikrobus_logWrite( tempText, _LOG_TEXT );
mikrobus_logWrite( " °C", _LOG_LINE );
Delay_ms( 1000 );
}
The full application code, and ready to use projects can be found on our Libstock page.
Other mikroE Libraries used in the example:
Additional notes and information
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.