Categories

Arduino and TMP36 example

The TMP35, TMP36, and TMP37 are low voltage, precision centigrade temperature sensors. They provide a voltage output that is linearly proportional to the Celsius (Centigrade) temperature.
The TMP35/TMP36/TMP37 do not require any external calibration to provide typical accuracies of ±1°C at +25°C and ±2°C over the –40°C to +125°C temperature range

The low output impedance of the TMP35/TMP36/TMP37 and its linear output and precise calibration simplify interfacing to temperature control circuitry and A/D converters. All three devices are intended for single-supply operation from 2.7 V to 5.5 V maximum.

tmp36 pinout

tmp36 pinout

 

Features:

  • Low Voltage Operation (+2.7 V to+5.5 V)
  • Calibrated Directly in °C
  • 10 mV/8°C Scale Factor (20 mV/8°C on TMP37)
  • ±2°C Accuracy OverTemperature
  • ±0.5°C Linearity
  • Specified -40 °C to +125 °C, Operation to +150 °C
  • Less than 50 µA Quiescent Current
  • Shutdown Current 0.5 µA max

 

Schematics

The TMP36 is very easy to connect to your Arduino, here is a schematic and breadboard layout

arduino and tmp36_schem

 

arduino and tmp36_bb

 

Code

int sensorPin = 0;
 
void setup()
{
  Serial.begin(9600);
}
 
void loop()
{
 
 int reading = analogRead(sensorPin);  
 // measure the 5v with a meter for an accurate value
 //In particular if your Arduino is USB powered
 float voltage = reading * 4.68; 
 voltage /= 1024.0; 
 
 // now print out the temperature
 float temperatureC = (voltage - 0.5) * 100;
 Serial.print(temperatureC); 
 Serial.println(" degrees C");
 
 delay(1000);
}

 

Testing

Open the serial monitor

22.67 degrees C
23.12 degrees C
24.50 degrees C
25.87 degrees C
26.78 degrees C
26.32 degrees C
26.32 degrees C
25.87 degrees C
25.41 degrees C

 

Link
5pcs/lot TMP36 TMP36GT9Z Low Voltage Precision Celsius temperature sensor

Share

Leave a Reply