Step 1: How to use a temperature sensor

Picture of How to use a temperature sensor

How to measure temperature!

Using the TMP36 is easy, simply connect the left pin to power (2.7-5.5V) and the right pin to ground. Then the middle pin will have an analog voltage that is directly proportional (linear) to the temperature. The analog voltage is independent of the power supply.

To convert the voltage to temperature, simply use the basic formula:

Temp in Celsius = [(Vout in mV) - 500] / 10

So for example, if the voltage out is 1V that means that the temperature is ((1000 mV - 500) / 10) = 50 degrees Celsius

If you're using a LM35 or similar, use line 'a' in the image above and the formula: Temp in Celsius = (Vout in mV) / 10

Testing your temperature sensor

Testing these sensors is pretty easy but you'll need a battery pack or power supply.

Connect a 2.7-5.5V power supply (2-4 AA batteries work fantastic) so that ground is connected to pin 3 (right pin), and power is connected to pin 1 (left pin)

Then connect your multimeter in DC voltage mode to ground and the remaining pin 2 (middle). If you've got a TMP36 and its about room temperature (25 degrees C), the voltage should be about 0.75V. Note that if you're using a LM35, the voltage will be 0.25V
(See image below)

You can change the voltage range by pressing the plastic case of the sensor with your fingers, you will see the temperature/voltage rise.
(See image below)

Or you can touch the sensor with an ice cube, preferably in a plastic bag so it doesn't get water on your circuit, and see the temperature/voltage drop.
(See image below)

Connecting to your temperature sensor

These sensors have little chips in them and while they're not that delicate, they do need to be handled properly. Be careful of static electricity when handling them and make sure the power supply is connected up correctly and is between 2.7 and 5.5V DC - so don't try to use a 9V battery!

breadboarded to-92 -

They come in a "TO-92" package which means the chip is housed in a plastic semi-cylinder with three legs. The legs can be bent easily to allow the sensor to be plugged into a breadboard. You can also solder to the pins to connect long wires. If you need to waterproof the sensor, you can see the next step for an Instructable for how to make an excellent case.
llanyort6 years ago
how many seconds do i need to wait between polling the sensor ? i would like to poll the sensor every .5 - 1 second. is this feasible ?