Chipkit Uno and a TMP36 sensor 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.

 

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 Chipkit, here is a  breadboard layout

 

Code

[codesyntax lang=”cpp”]

int sensorPin = 0;
 
void setup()
{
 Serial.begin(9600);
}
 
void loop()
{

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

[/codesyntax]

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

Related posts

DsPIC30F4011 Development Board OLED example

DsPIC30F4011 Development Board push button example

DsPIC30F4011 Development Board flashing LED example

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Read More