TMP100 Temperature Sensor (SKU:TOY0045)

From DFRobot Electronic Product Wiki and Tutorial: Arduino and Robot Wiki-DFRobot.com
TMP100 Temperature Sensor Module

Introduction

This temperature sensor used TMP100 chip is ideal for extended temperature measurement in a variety of communication,consumer, environmental,and instrumentation applications,etc...
You can change the address or working voltage of the device depend on the environment.5V or 3.3V regular voltage input change by one tiny switch.I2C digital output communication ,easy to get temperature datas of different address,the resolution can be changed also.
This sensor isable to be powered by 5V or 3.3V which make it compatile with both Gadgeteer, Arduino DUE 3.3V system and standard Arduino UNO/Mega 5V system.

Applications

  • Power-supply Temperature Monitoring
  • Computer Peripheral Thermal Protection
  • Thermostat Controls project,etc...

Specification

  • Input Voltage:2.7-5.5V
  • Working current:45uA(0.1uA standby)
  • Resolution:9-12 Bits
  • Address:B1001000-B1001111
  • Opterating frequence:100KHZ/400KHZ/3.4MHZ
  • Accuracy:±2℃@-25℃~85℃,±3℃@-55℃~125℃
  • Interface:I2C Digital Output x1
    • .NET gadgeteer connector (IDC10)Socket x2
  • Size:32 x 27mm

Documents

Diagram

TOY0045 diagram

More details

  • ON/OFF Switch:ON for Enable the module & OFF for Disable the module
  • 5V/3V3 Switch:5V or 3V3 power selection,make it compatile with both Gadgeteer, Arduino DUE 3.3V system and standard Arduino UNO/Mega 5V system.

TMP100 Rsgister Introduction

Address Pins and Slave Addresses

Steps:

  1. Change the address in the code(it should be matched with the board)
  2. Change the short current cap on the board according to the table
  3. Power the whole system again once change the address
Address Pins and Slave Addresses

Pointer Register introduction

Pointer Register Type

Resolution of the TMP100

Resolution of the TMP100

Configuration Register Format

Configuration Register Format

For the TMP100,Shutdown Mode is enabled when the SD bit is 1. The device will shutdown once the current conversion is completed. For SD equal to 0, the device will maintain continuous conversion. The power-up/reset value of the Configuration Register is all bits equal to 0. The OS/ALERT bit will read as 1 after power-up/reset.

Byte of Temperature Register

Byte of Temperature Register

Sample Code

/*
 Sample code for the TMP100 Temperature sensor
 website:www.DFRobot.com
 
 Connection:
 
 VCC-5V
 GND-GND
 SDA-Analog pin 4
 SCL-Analog pin 5
*/

#include <Wire.h>
int tmpAddress = B1001011; //Slave Addresses set
int ResolutionBits = 10;   //Resolution set
void setup()
{
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
  SetResolution();
}

void loop()
{
  getTemperature();
  delay(200);
}

float getTemperature()
{
  Wire.requestFrom(tmpAddress,2);
  byte MSB = Wire.read();
  byte LSB = Wire.read();
  int TemperatureSum = ((MSB << 8) | LSB) >> 4; 
  float celsius = TemperatureSum*0.0625;
  Serial.print("Celsius: ");
  Serial.println(celsius);
}

void SetResolution(){
  if (ResolutionBits < 9 || ResolutionBits > 12) exit;
  Wire.beginTransmission(tmpAddress);
  Wire.write(B00000001); //addresses the configuration register
  Wire.write((ResolutionBits-9) << 5); //writes the resolution bits
  Wire.endTransmission(); 
  Wire.beginTransmission(tmpAddress); //resets to reading the temperature
  Wire.write((byte)0x00);
  Wire.endTransmission();
}


Nextredirectltr.pngGo Shopping TMP100 Temperature Sensor (SKU:TOY0045)