Temperature Sensor Tutorial!

Picture of Temperature Sensor Tutorial!

What is a temperature sensor?

An analog temperature sensor is pretty easy to explain, it's a chip that tells you what the ambient temperature is!

These sensors use a solid-state technique to determine the temperature. That is to say, they don't use mercury (like old thermometers), bimetallic strips (like in some home thermometers or stoves), nor do they use thermistors (temperature sensitive resistors). Instead, they use the fact as temperature increases, the voltage across a diode increases at a known rate. (Technically, this is actually the voltage drop between the base and emitter - the Vbe - of a transistor. By precisely amplifying the voltage change, it is easy to generate an analog signal that is directly proportional to temperature. There have been some improvements on the technique but, essentially that is how temperature is measured.

Because these sensors have no moving parts, they are precise, never wear out, don't need calibration, work under many environmental conditions, and are consistent between sensors and readings. Moreover they are very inexpensive and quite easy to use.

Some basic stats

These stats are for the temperature in the Adafruit shop, the Analog Devices TMP36 (-40 to 150C). Its very similar to the LM35/TMP35 (Celsius output) and LM34/TMP34 (Fahrenheit output). The reason we went with the '36 instead of the '35 or '34 is that this sensor has a very wide range and doesn't require a negative voltage to read sub-zero temperatures. Otherwise, the functionality is basically the same.

  • Size: TO-92 package (about 0.2" x 0.2" x 0.2") with three leads
  • Price: $2.00 at the Adafruit shop
  • Temperature range: -40 degrees C to 150 degrees C / -40 degrees F to 302 degrees F
  • Output range: 0.1V (-40 degrees C) to 2.0V (150 degrees C) but accuracy decreases after 125 degrees C
  • Power supply: 2.7V to 5.5V only, 0.05 mA current draw
  • Datasheet

Remove these adsRemove these ads by Signing Up
nyffeler9 months ago
Since many years I'm using the LM35 in "metal case" for a lot experiments in the physical chemistry practical course of the ETH Zurich. The metal case has the advantage of a shorter time constant compared to TO-92 (~3s vs. >8s), but it is much more expensive. Recently I replaced the LTC2408 ADC interfaced via the lpt port by the ADS1248 and an Arduino for data transfer to the host.
snoop911 nyffeler6 months ago

Do you happen to have any code for retrieving data from the ads1248? despite the input, the adc the adc result doesn't follow.

ashmnit2 years ago
I know some detail about thermocouples which tried to outline in the site
But i came to know about such IC first time.Can it be used to display temperature directly.
TerryKing3 years ago
I would think about going to the Digital sensor DS18B20. A how-To for Arduino is here:

6.18V power supply
0.84 volts
33.88 degress C
92.98 degress F

6.22V power supply
0.84 volts
33.76 degress C
92.76 degress F

Heres the problem, .. its more like 70-72 degrees in here and im using USB power which my volt meter measures at 5.10v, the sensor @ the sensor is measuring .583v help me out here.
mbainrot3 years ago
From memory there is a way to change vref so you can do the 3.3v scale on a 5v arduino.

Be careful as from memory you can damage the 'druino if you feed it 5v when the ADC is expecting 3.3v
dgallimore4 years ago
This is great! I've never found such a simple explanation as to how to use an Arduino before. Could you tell me though, what's the maximum length that the wires can be between the Arduino and sensor? Thank you for a great 'ible!
This was a great idea and has taught me a lot about this platform. had a suggestion thought, how bout if you can find a way to put the read out on a pc and a built in lcd screen, that way you can take this anywhere and it ll let ya tell you the temp where ever you are. the applications in ghost hunting would be tremendous.
Plasmana5 years ago
Wow, they are so much you can do with the Arduino, I must get my self one...
Yeah, I may get myself one...
Thats cool
Laugh out loud...
Meh, 'lol' is easier to type. :-)
I'm getting myself an arduino(and now that i am typing it more often i now know how to spell it right! :P), The lowest price i found anywhere on the internet(blagonet, blagoshpere lol what did i say lol? lol) at $27.9869 American dollars! But it is the Older one, From 07 the latest one from 09 is the one i want for like 3 dollars more at 29.99 American Dollars. On ebay i found one for 19.99, but of course, its a fake, coming from hong kong and having more than 10000 of yeah...
Get the Duemilanove. It's worth the extra $3. >.> It automatically switches to the power source your using, so you don't have that annoying jumper, and with the ATMega328p it has twice as much storage space for sketches and twice as much ram and EEProm compared to the Diecimillia.

Heres a good place to get one:

If you havn't already gotten one.
I'm getting a duemilanove from some place for about 27 dollars, look for my topic about it
Just be sure to build a robot that takes over the world and it has to look like this:
lol, I would need an arduino nano XD
llanyort5 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 ?
Artificial Intelligence: Thanks for your help. The link you provided to the wiki was very helpful. It seems that type K thermocouples are the most practical for hobbyist use. For those interested, you can purchase a type K for $6 at the below link: I'm sure there are plenty of other sources as well; (If your oven came with a meat probe, you have a thermocouple)
Is anyone aware of similar temperature switches that would work at high temperatures such as those in a BBQ grill (200-600 degrees F)?
I know they make thermistors and thermocouples which would work in that range.
Thanks much for the help
For measuring such high temperatures, you may want an other type of temperature sensor called a thermocouple.
ReCreate5 years ago
It's shaped like a transistor?
Great Instructable. $2 seemed high for the TMP 36...I found them on Digikey for a bit less, $1.35 Prices drop as you go higher in quantity.
jj375 years ago
Great instructable 4 stars and thanks I always had a bit of difficulty with accuracy.
ReCreate5 years ago
I never knew about these before! Very interesting!