TMP102 Digital Temperature Sensor Module (HCMODU0100)
The TMP102 device is a digital temperature sensor ideal for NTC/PTC thermistor replacement where high accuracy is required. The device offers an accuracy
of ±0.5°C without requiring calibration or external component signal conditioning. Device temperature sensors are highly linear and do not require complex calculations or lookup tables to derive the temperature. The on-chip 12-bit ADC offers resolutions down to 0.0625°C. The module (HCMODU0100) provides header pins for power (3.3V), and to its digital I2C interface including bus pullup resistors. PLEASE NOTE: This module does not include an on-board regulator. Do not power it above 3.6V otherwise you will cause permanent damage. Features:
• Accuracy Without Calibration:
– 2.0°C (max) from –25°C to 85°C
– 3.0°C (max) from –40°C to 125°C
• Low Quiescent Current:
– 10-μA Active (max)
– 1-μA Shutdown (max)
• Supply Range: 1.4 to 3.6 V
• Resolution: 12 Bits
• Digital Output: I2C interface CompatibilityRaspberry Pi users:
For Raspberry Pi uses we have tested this module with the free Cayenne cloud based IoT software platform. Simply connect the module to your Raspberry Pi as shown below and use the Cayenne software platform to get remote temperature readings without writing a single line of code.
You can create a free account simply by clicking our referral link below:Arduino users:
To use this module with your Arduino please see the following connection diagram and sketch:
/* FILE: TMP102_Example.cpp
AUTHOR: Andrew Davies
Library created by Hobby Components Ltd (HOBBYCOMPONENTS.COM)
26/05/16 version 0.1: Original version
This example sketch has been written to work with the TMP102 temperature sensor,
and in particular the TMP102 digital temperature sensor module (HCMODU0100).
The sketch will read the current temperature from the module and display it via
the serial port. To connect the TMP102 to your Arduino connect it as follows:
You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.
This software may not be used directly for the purpose of selling products that
directly compete with Hobby Components Ltd's own range of products.
THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
/* Include the wire library */
/* The TMP102 can have one of 4 I2C address: 0x48 (ADD0 Pin -> GND),
0x48 (ADD0 Pin -> 3.3V), 0x4A 0x48 (ADD0 Pin -> SDA),
0x4B 0x48 (ADD0 Pin -> SCL). For HCMODU0100 module default is 0x48 */
int I2CAdd = 0x48;
/* Initialise the wire and serial port libraries */
/* Get the current temperature and output it to the serial port */
/* Wait a second before doing it again */
/* Gets the current temperature via the I2C interface */
/* Set the sensors address pointer to the 16bit temp register */
/* Result is in the most significant 12 bits so shift it down.
Data = I2CReadInt() >> 4;
/* Result is now in 12 bit two's compliment so convert it to 16bit
* two's compliment */
if(Data & 0x0800)
Data += 0xF000;
/* Result is now in 0.0625oC increments so adjust it for oC */
return Data * 0.0625;
/* Read two bytes from the sensors I2C interface and return it as a 16bit integer */
unsigned int I2CReadInt()
unsigned int Data;
Data = Wire.read() << 8;
Data += Wire.read();
/* Writes to the sensors address pointer register */
void I2CWritePointer(byte Register)
Disclaimer: The Cayenne platform is an external free service and is not provided by, or connected to, Hobby Components Ltd. It is therefore not being sold as part of the product advertised on this page. As such we do not provide any guarantees or warranties with regards to this service. Issues or questions related to the Cayenne platform should be directed to Cayenne and not Hobby Components Ltd.
Libraries, example code, and diagrams are provided as an additional free courtesy by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.
Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.