Skip to content

TMP100_Temperature_Sensor_(SKU_TOY0045)

Angelo edited this page Sep 21, 2016 · 3 revisions

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();
}

image:nextredirectltr.pngGo shopping tmp100 temperature sensor (sku:toy0045) category: Product Manual category: DFR Series category: Module

category: Diagram category: DFRobot

Clone this wiki locally