How does it work?
Temp-Log 7 Click is based on the TMP1826, a digital output temperature sensor from Texas Instruments designed for thermal management and protection applications. The TMP1826 features an integrated 2-kbit user EEPROM that allows the host to store application data in increments of 64 bits. With a user-programmable 256-bit page size write protection to avoid accidental overwrite, the EEPROM can be used as non-volatile, read-only memory. The TMP1826 also features an integrated CRC that may be used for ensuring data integrity during communication. It consists of an internal thermal BJT (NIST traceable factory-programmed non-erasable), a high-resolution analog-to-digital converter (ADC), and a data processing circuit in one package. The voltage is digitized and converted to a 16-bit temperature result in degrees Celsius, giving a digital output with outstanding accuracy of up to ±0.1°C (typical)/±0.3°C (maximum) and temperature resolution of 7.8125m°C, typical over a temperature range of –20°C to +85°C.
This Click board™ communicates with MCU using the 1-Wire interface that, by definition, requires only one data line (and ground) for communication with MCU. The 1-Wire communication line is routed to the SMD jumper labeled GP SEL, which allows routing of the 1-Wire communication either to the GP0 pin or the GP1 pin of the mikroBUS™ socket. These pins are labeled, respectively, the same as the SMD jumper positions, making the selection of the desired pin simple and straightforward. The TMP1826 can operate as a 1-Wire half-duplex bus in supply or bus-powered mode. Selection is made by positioning the SMD jumper marked VDD SEL to the appropriate position labeled VCC or GND. With the jumper set on the VCC position, the TMP1826 is powered by the same supply as this Click board™ or bus powered with the jumper set on the GND position where the device is supplied parasitically from the 1-Wire bus.
Also, the TMP1826 can be configured to operate in various one-shot temperature-conversion modes, such as basic one-shot, auto, and stacked conversion modes. Each conversion mode has a single temperature sample, but the host can enable 8 sample averages in the device for improved accuracy. Depending on the user application case, the TMP1826 also provides user and application configurable address modes. These modes exist alongside the standard device address and are useful for applications requiring faster access and device position identification. One of the ways of setting the address is through the R9 resistor, which, depending on the value of the resistor, provides the possibility of using one of 16 addresses.
The TMP1826 also includes advanced features like a programmable alarm function and three digital I/O pins on an unpopulated header, configurable for general purposes or to identify the device’s position on a shared bus. An alarm (interrupt) signal, routed to the ALR pin of the mikroBUS™ socket, is alarming when a specific temperature event occurs that depends on the value of the temperature reading relative to programmable limits.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the 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,Temperature Logging
Applications
Can be used for the thermal management of industrial, consumer, and environmental applications
On-board modules
TMP1826 – 1-Wire compatible digital output temperature sensor from Texas Instruments
Key Features
High accuracy, broad temperature range, 16-bit temperature resolution, flexible user programmable address modes, 2kbit EEPROM, NIST traceable factory-programmed non erasable 64-bit identification number for device addressing, alert, user configurable I/Os, and more
Interface
1-Wire
Feature
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-Log 7 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 | GP SEL | Left | Communication Pin Selection GP0/GP1: Left position GP0, Right position GP1 |
JP2 | VDD SEL | Left | Power Supply Mode Selection VCC/GND: Left position VCC, Right position GND |
JP3 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
J1 | IO | Unpopulated | User-Configurable I/O Pins Header |
R9 | R9 | Populated | Device Address Selection Resistor |
Temp-Log 7 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Operating Temperature Range | -20 | – | 85 | °C |
Temperature Accuracy | – | ±0.1 | ±0.3 | °C |
Temperature Resolution | – | 16 | – | bit |
– | 7.8125 | – | m°C |
Software Support
We provide a library for the Temp-Log 7 Click as well as a demo application (example), developed using Mikroe compilers. The demo can run on all the main Mikroe development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Temp-Log 7 Click driver.
Key functions
-
templog7_read_temperature
This function starts the one shot measurement and reads the temperature value in Celsius. -
templog7_write_eeprom
This function writes a desired number of data bytes to the EEPROM memory. -
templog7_read_eeprom
This function reads a desired number of data bytes from the EEPROM memory.
Example Description
This example demonstrates the use of Temp-Log 7 click board by reading the temperature in Celsius, then writing the specified data to the memory and reading it back.
void application_task ( void )
{
uint8_t eeprom_data[ 64 ] = { 0 };
uint8_t gpio_state = 0;
float temperature = 0;
if ( TEMPLOG7_OK == templog7_read_temperature ( &templog7, &temperature ) )
{
log_printf( &logger, "rn Temperature: %.2f Crn", temperature );
}
if ( TEMPLOG7_OK == templog7_read_gpio ( &templog7, &gpio_state ) )
{
log_printf( &logger, " GPIO state: 0x%.2Xrn", ( uint16_t ) gpio_state );
}
if ( TEMPLOG7_OK == templog7_write_eeprom ( &templog7, STARTING_ADDRESS, DEMO_TEXT_MESSAGE,
sizeof ( DEMO_TEXT_MESSAGE ) ) )
{
log_printf ( &logger, " EEPROM write: %srn", ( uint8_t * ) DEMO_TEXT_MESSAGE );
}
if ( TEMPLOG7_OK == templog7_read_eeprom ( &templog7, STARTING_ADDRESS, eeprom_data,
sizeof ( DEMO_TEXT_MESSAGE ) ) )
{
log_printf ( &logger, " EEPROM read: %srn", eeprom_data );
}
if ( !templog7_get_alert_pin ( &templog7 ) )
{
log_info( &logger, " ALERT detected " );
}
Delay_ms ( 1000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.TempLog7
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 Mikroe compilers.
mikroSDK
This Click board™ is supported with mikroSDK – Mikroe Software Development Kit, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.