Creative Commons images are CC BY 2.0

### \$ 1.50

shopping cart

 quantity In stock 250+ in stock 1.50 1+ units 1.43 25+ units 1.35 100+ units
Need larger quantities?
Check out our Volume Sales program

Description: This is the same temperature sensor that is included in our SparkFun Inventor’s Kit. The TMP36 is a low voltage, precision centigrade temperature sensor. It provides a voltage output that is linearly proportional to the Celsius temperature. It also doesn’t 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. We like it because it’s so easy to use: Just give the device a ground and 2.7 to 5.5 VDC and read the voltage on the Vout pin. The output voltage can be converted to temperature easily using the scale factor of 10 mV/°C.

Features:

• Voltage Input: 2.7 V to 5.5 VDC
• 10 mV/°C scale factor
• ±2°C accuracy over temperature
• ±0.5°C linearity
• Operating Range: −40°C to +125°C

Documents:

## Recommended Products

• Do these come in packs of 2? B/c I ordered 2 of these & got two packs of two. Not complaining :)

• I don’t see the voltage => ºC equation at hand. So, to save others the trouble:

The datasheet says 1ºC/10mV, and 750mV @ 25ºC. With V as our independant and ºC as our dependant variable, we can set up a point-slope form: ºC - 25ºC = 1ºC/10mV * (mV - 750mV). Solving and converting to V, I think this gives the formula:

ºC = 100 * V - 50.

This checks out with the graph on the datasheet, with 0.3v for -20ºC and 1.2v for 70ºC (158ºF).

I haven’t tested it yet, but this looks great for working with an Xbee: they should run on the same supply voltage, and expected temperatures should fit within the Xbee’s ADC range (max. 1.2v).

• To clarify further, the analog pin reading must first be converted to a voltage for this to work.

Supposing you have the middle pin of the TMP36 hooked up to pin A3, you can use this code:

``````#include <stdlib.h>
char tempString[10] ;
int tempPin = 3;
void setup(){
Serial.begin(9600);
}

void loop(){
float tempVolt = float(tempRead) / 310.3;
float tempCelsius = (100 * tempVolt) - 50;
dtostrf(tempCelsius, 8, 2, tempString);
/* dtostrf (from library <stdlib.h>) takes in a float (tempCelsius, in this case) and stores a stringified version of that float in a pre-established character array (in this case, tempString.) This is necessary because if you try to print a float, you get an error. */
Serial.print("Current temperature in Celsius: ");
Serial.println(tempString);
}
``````
• Why is there a division by 310.3? I don’t understand that part of the code.

• I believe the division by 310.3 assumes that you are running on 3.3V. The analogRead function reports a value between 0-1023. So the conversion divides the analogRead value by 310.3 to convert from bit to voltage. (1024 bits / 3.3V = 310.3 bits/volt). I think the equation is a bit inaccurate though, notice I said 1024/3.3. If the input is full scale then the pin reports 1023, so 3.3 * 310.3 should be 1023 but its not. Instead of dividing by 310.3, you should divide by 310.

• Nice piece of work and it seems to explain the graph in the datashete well. However, the formula did not work for me. I ended up guessing the scale factor as 30mV/C from the 750mV at 25C. The guess is working well despite my sensor being TMP36. Further, the reason this formula did not work for me is because it is based on the assumption that the scale factor is 10mV/C.

• I used this sensor with the sparkfun inventor’s kit. I used the example circuit #7. It was giving me inconsistent (temperature jumps of 10 degress F) and low readings. If I touched any of the wires in the system the temperature reading jumped. I replaced the ground to sensor wire with a 330 Ohm resistor, this made the reading consistent and accurate.

• A word of warning! This sensor works great, but the leads are rather frail. while working on one for a school project a lead completely disconnected. Make sure you keep this unit fairly stable and don’t bend the leads excessively.

I will be getting one for myself, and plan to hot glue the leads to secure them in place.

• ANOTHER WORD OF WARNING! If you put this sensor in backwards, as in the positive is connected to ground and vice versa, the sensor will heat up to 481.5 degrees F! I am a newbie, so it may just be that I don’t know electronics very well, but if you are like me, take precaution when handling circuits.

• I’ve done that… “before”… It’s a nice little heater!!

• Yeah. I did the same thing. Thankfully, I disconnected it quickly enough; mine still works.

The key is the datasheet is giving you a BOTTOM VIEW. I missed that part, and wrongfully assumed top view.

• D*mn..just realized that. I thought it was TOP VIEW :(

• I learned that the hard way!

• same here, big blister on my finger

• Thanks for the warning…dont realized this until I read your comment

• For the life of me, I couldn’t figure out why my TMP36 was logging 283, 290, 256. I mean, it’s hot today, but I don’t think it’s that hot…..After longer than I should admit, I realized I was using this https://www.sparkfun.com/products/521. So word the wise, don’t mix your thermistors with transistors.

• Good sensor. Here, a calcul in order to have the temperature in °C : tempC = ((temp * 0.004882)-0.50)*100

tempC is the temperature. temp is the value of the input. The variables are “double”.

The accuary is around 1°C.

• Thanks for the formula..saved me alot

• When I hooked this up and converted the analog value from an arduino to mv (value * 4.887585532746823) and divided by 10 as shown, I got the temperature in F not C. Sure enough, if I put the answer in the F to C conversion formula, I ended up with the correct temp. in C. The units in the description are wrong, that’s all.

• It’s always great to see how clueless most people are about significant digits. 16 of them, really? You do realize that the third is already inaccurate, do you? All that comes after that is useless.

• The sensor has an off set value of 100mV. -40C = 100mV; 25C = 750mV; 125C = 1750mV. Scroll down to my other comment explaining how to map on the arduino.

• Could I grab your code? I am stumped on how to do the mv -> Celcius -> Farenheit conversion.

• Using this as a base: http://ardx.org/src/circ/CIRC10-code.txt applying degF = (degC * 1.8) + 32, change line 30 to this: temperature = (((temperature - .5) * 100) * 1.8) + 32;

• I’ve got one of these on my arduino inventors kit board in my refrigerator. The arduino is also hooked up to a relay control board and I have the arduino programmed to act as a thermostat and control the compressor. When ever the relay is turned on the temperature reading jumps up about 3.5F

I’ve got the arduino plugged into a 110v wall wart for power, so there ought to be plenty of current to prevent brown outs, but something is still skewing the reading pretty wildly.

• I’m having this exact issue now. Where you able to solve it?

• Try grounding the arduino and the relay board to a central ground point rather than bringing relay ground back on board the arduino. I’ve had analog readings skewed by changing currents in the ground path. Also try filtering the analog Vcc separately from the digital Vcc.

• I did notice that the ground path that i connect the relay board to does seem to fluctuation (~20mv) when i turn on the relays, so what i did was plug the relay control board ground into one ground pin on the Arduino and connect my protoboard ground rail to another ground pin. This seemed to solve the ground voltage fluctuations (i measured it using DMM wrt the ground pin on the voltage reg). I’m also running the TMP36 off the 3v3 rail which only has a 1mv fluctuation wrt to ground when the relay’s turn on. Despite all this i still see ~20mv jump in the output reading (on DMM) on the TMP36 when i turn on the relays (which draw ~180ma of current from +5v).

Anyone have any ideas?

• …. BACK EMF PROTECTION DIODES!!!

• No, sorry, but back EMF has nothing to do with this. EMF is only produced in a continuously varying magnetic field, such as in a motor. A relay only produces emf at the moment the coils open, or closes. The relay in question only opens, or closes, once or twice over the course of an hour and also on it’s own breakout board with it’d own coil driver circuit.

No, the culprit here is that the relay driver draws to much current from the regulated supply on board the arduino and it’s causing the 5v rail to drop enough skew the results. Once I had the relay board take it supply voltage directly from the walwart, and not through the arduino the problem went away.

• your noob-ness, underestimated, i have.

• I’m sorry you have problems with basic electronics concepts, but there is no need to be rude. You might want to think about picking up an oscilloscope, and some books.

• ….. i was aknowledging the fact that you diagnosed your problem correctly, and at the same time admiting my mistake of quickly assuming you were not compensating for such a basic mistake (common for new guys when dealing with relays).

at the moment of my post… i was in a star wars mindset and thus attempted to “speak” like Yoda (clearly unsuccesfully), which is probably the reason for this misscommunication…

should it have been my intention to insult or disrespect i would not have attempted to help in the first place… in any case… i appologize

in case you are wondering, i already have an oscilloscope (a fancy one too!) since 2007 …FTW.

• I think you meant overestimated. Sorry, I know this was more than 5 months ago.

• I thought it was pretty good! :)

• Two questions, first is response time, does anyone else find it’s very slow to respond to temp changes, for example moving it from my bedroom to my fridge, it takes over half and hour to settle down to the fridges temperature.

Second is my formula right for using this with an xbee? 1.2v read range in 10bit on the ADC gives me 1.2/1023(The ADC Reading) to get a voltage. Then that Voltage -0.5 100 to get a reading in C?

I’m finding it’s over stating the temp by nearly 10 degrees, the voltage calculation seems correct to what I read off it with a multimeter, so maybe my voltage to temp calculation is wrong?

• Hi! I’m using and Arduino Uno board for the first time and am new to the arduino language. I was wondering if someone could explain to me how to connect this temperature sensor to the arduino board and how to program the arduino board so that it will read the temperature and display it. Thanks so much!

• For anyone interested in using the TMP36 sensor in an embedded project with a PSoC 4 BLE device from Cypress, check out the code here: https://bitbucket.org/WhitePhoenix92/psoc4-tempsensor

Thanks to @Mark Fickett for the formula and @NeuralNova for some Arduino implementation.

• does anyone know where I can see a video that teaches uses it?

• I think the part in the SparkFun Eagle library might be wrong. According to the data sheet, pin 3 is ground and pin 1 is Vcc, but the SparkFun library has them connected the opposite way.

• so heres how i workd this out. i took this page https://learn.adafruit.com/tmp36-temperature-sensor and end up with this: ((Vout - 500) / 10) = centigrade. assuming 1024 res and 5 volt, i end up with this: mv / centigrade/ bit 1500 100 307 1400 90 184 1300 80 163 1200 70 246 1100 60 123 1000 50 205 900 40 184 800 30 164 700 20 143 600 10 123

• It is very frustrating that such a basic sensor is out of stock. Especially when there are not alternatives in the store.

• I ordered 3 of these and they were all crap. The first one worked for a few weeks before crapping out. The other two didn’t work at all.

• That’s bizarre, I have never had a problem. You can send an email to Sparkfun Support and I’m sure they’d be happy to replace it for you.

• Hello.

For my fist post, please, excuse my poor english…

I was running the 7th sketch of the SIK with this sensor an I got really strange results. Inside my house, in winter but with heating on, I got around 12°C. I don’t have other temp sensor to check but I’m sure it was not so cold inside ! Actually, I use my lovely RedBoard on my Mac Pro Retina. The computer was on ceiling power cord. After unplugging it, the temp sensor gave me around 20°C witch is much more realistic..

Any ideas ? Problem with the high current of Mac USB ?

• I know this post is a little old but for future reference and for other users you shouldn’t run a finished program on computer USB power. It is always a good idea to use an external power supply or some batteries to get real results with a finished project. USB is good for programming your board but after this if you are planning to test it for accuracy use a known voltage source. USB voltage can fluctuate based on a number of variables such as current draw etc..

• I have used. Centigrade = (X -100)/2 …..

and it worked I matched the temperature with the thermostat exactly the same. i traced back the value i initially had 160 from sensor, thermo 27C

=(X*5) -500 /10

=5( X - 100) / 10

=(X -100)/2

i would like to know other’s thought on this

• For you Arduino folks, here is how I got mine to work in regards to mapping the input voltage at a 5V referance: TempReadingCelcious = map(TempReading, 20, 358, -40, 125); Keep in mind that at a 5V referance you get steps 0 - 1023 at 4.8828mV steps (don’t use 4.9mV from the Arduino website for actual calculations… you get offset results very quickly). With 10mV steps of the sensor you will run into +-1 degree fluctuation and +-2degree Fahrenheit fluctuation.

To fix this issue do the following: use analogReference(EXTERNAL) (Make sure you refer to this site so you do not damage your board: http://arduino.cc/en/Reference/AnalogReference ) and limit the reference voltage externally to about 2 volts by connecting the 3.3V out to the AREF pin through a 20k resistor (2 x 10k in series will do the trick). The reason you get about 2 volts (2.030769V +- resistor tolerance) as Reference is due to the internal 32k pull down resistor acting as a voltage divider. The formula is provided on the Arduino site for other voltage calculations.

To calculate the new mapping we will do the following: 1. New 0 - 1023 resolution = 2030.769mV / 1024 steps = 1.98317mV per step; 2. Calculate your maximum and minimum mapping values. TM36 -40C = 100mV; 25C = 750mV; 125C = 1750mV; 100mV / 1.98317mV = 50.4243 so lets call it 50; 1750mV / 1.98317mV = 882.4256 so lets call it 882; 3. Plug in the new mapping values in the Arduino map line: TempReadingCelcious = map(TempReading, 50, 882, -40, 125);

I hope this helps everyone that wants to use these for an Arduino project. I get consistent readings at full C steps by taking the average of 5 readings before mapping. I don’t own a thermometer so I used my AC thermostat as reference and both my Arduino and thermostat were reading the same temperature. In theory this should let you get down to 0.2C steps accurately but I haven’t tried this yet.

You will get 3 digit readings: 244 which equals 24.4C. Fahrenheit goes in 0.4F steps using this.

• Description says “no external calibration required” yet I get about 10 deg C difference when using my UNO, and my Nano. Any ideas why? …. once I hooked it up to a wallwart it seems to have sorted itself out….I assume it has something to do with power over the USB…odd.

• This is a nice sensor to learn about A/D manipulation with uC’s. Don’t know if anyone else has experienced this, but when used remotely even less than 3ft, the noise susceptibility makes Vout will jump around by a few mV. I placed a 680 Ohm resistor in series with the output per the datasheet suggestions, and it helped somewhat but did not get rid of enough noise. Tried capacitors between Vin and Gnd, no change. Tried sampling 5 times then averaging the result - not good enough. Did not try shielded cable.. instead I got the DS18B20 and never looked back. (Not sure if the noisy signal of the TMP36 is a result solely of the Arduino or of the remote cable length. By noisy, I mean typically +/- 1 deg F bounce - too much for a temperature controller for a sensitive application.)

• Need HELP!!! Please!!! I am using a TMP36 sensor in my truck with an embedded Atmega328 chip and lcd display. Everything worked fine when I breadboard the circuit with an Arduino Uno. Once I made a prototype board and hooked it up to my truck, powered by a USB car charger, the temp readings fluctuate anywhere from -55F to over 90F. I do have a 220uF capacitor across pos. and neg. rails on the prototype board. Thanks

• Ok so tech pride aside; is the sensor good or no good with an Arduino and some modest relays off the 5v regulator on the Arduino?

• just gought it

• I got one of these in my starter kit. I setup it up exactly like the sik guide said but am getting constant negative values, -50. Anyone else have this issue? I’m assuming its a bad sensor?

• Did you calibrate the diode?

• yo, the above description is wrong.. you don’t simply divide voltage by 10mv/C… you solve for the temperature as Mark Ficket pointed out about below… happy temp. monitoring…

ºC = 100 * V – 50.

• I need help. I’m fairly knew to this but I need a circuit I can build that will sense the heat from a laser module. I have a 12VDC Micro Fan that covers the heat sink along with a 2 watt micro laser driver with a 2 watt laser blue diode, as you can see heat is a issue. I want a circuit that will sense a temp of about 90deg and activate the micro fan. Keep in mind my laser unit is the size of a small iPod so i need as much saved space as possible. thank you.

• appropriately how long could the wires connecting this sensor to an arduino be before the SNR is too low?

• Reading 320-340 in an 80deg F house. I’m assuming my conversions are correct making 331 3 deg F. This is obviously wrong. Does it appear to be a fault of my own or is my TMP36 faulty?

sensor = 331 degC = -16 degF = 3

• Buyer beware: They sent me 2 TM335, instead of the TMP 36. Couldn’t figure out why I was getting strange readings. Had to go talk with the EEs who figured it out, and that I now need pull up resistors, different code. Not happy.

• Any idea on an ETA for these?

• confusion: if this device produces an analog output, wouldn’t it be linearly proportional to temperature measured on any scale (celsius, fahrenheit, kelvin, etc.)? or does it actually produce a step pattern of voltages that precisely correspond to celsius degree divisions?

• Well the output is linear, so I don’t see any reason why it would be an issue. I wouldn’t want to deal with converting to and from the different temperature scales because of the way microcontrollers handle floating point arithmetic.

• I’m not sure why you’re concerned about using floating point arithmetic.

Precision shouldn’t be an issue when converting to another temperature scale, since it’s only good to +/- 1 deg. C at best anyway.

And there’s no need to use multiplication. If you want to convert to Fahrenheit, add 32 degrees to 0 deg. C, and add or subtract 1.8 deg. F for every change of 1 deg. C.

Or use a lookup table to convert values over your likely range of Celcius temperatures.

• “…add or subtract 1.8 deg. F for every change of 1 deg. C.”

Where I come from, we call that multiplication.

• I’d recomend throwing the sample code from the SIK. this is about the easiest to use temp sensor, it’s designed to work at 3.3V, already calibrated, works out of the box. and on mine i'v reversed the polarity for a extended time and it’ll still work fine after.

## Customer Reviews

### 4.3 out of 5

Based on 16 ratings:

Currently viewing all customer reviews.

5 of 5 found this helpful:

#### A fine sensor... If you power it right

The sensor seems to do exactly what it says- spits out voltage corresponding to the temp. I bought this to monitor the water temp in my computer, and after some fiddling it works fine.

Be warned, though, of various caveats involved with using these analog devices. For instance the internal voltage references in the attiny may be quite a bit off, throwing your readings off.

Its also quite sensitive to noise and the .1uf capacitor near the leads specified by the datasheet is absolutely necessary- without it the readings may be nonsense if your leads are more than a few inches. Most arduino tutorials for this omit it!

You may be better off with the digital sensor if you don’t want to have fiddle.

1 of 1 found this helpful:

#### Nice simple temperature sensor

This sensor is simply a temperature sensor. There are other combination temp/humidity sensors around as well. This unit is super easy to wire up and requires no other components (no resistors etc.). One thing to note is that this sensor does not have a housing so it is a bit more sensitive than others (which may be a good thing) but you have to be careful where you place it and keep it away from hot components. You will also have to write code to average the readings you get from it. Pros: Small, cheap, sensitive, no additional parts Cons: No cons really, possibly too sensitive, no humidity

https://flic.kr/p/rEEU1S

1 of 1 found this helpful:

#### Pretty accurate

It is within only a few degrees with the algorithm I use. Here is my code, in case you have issues with it:

int outputpin=0; int count; int temp;

void setup() { count = 0; Serial.begin(9600); }

void loop() { int rawvoltage= analogRead(outputpin); float volts = rawvoltage/205.0; float celsiustemp= 100.0 * volts - 50; float fahrenheittemp = celsiustemp * 9.0/5.0 + 32.0; Serial.print(fahrenheittemp); Serial.println(“Fahrenheit”); Serial.print(celsiustemp); Serial.println(“Celsius”); Serial.println(volts); temp = count + 1; Serial.println(temp); Serial.println(“———-”); count = temp; delay(3000);

}

WORTH IT!!

1 of 1 found this helpful:

#### small and cheap component but very powerful

I realized a lot of arduino projects using the TMP36 sensor: - my freezer control - hot plate temp control for my 3d printer - digital clock with external temp display

very cheap but precise and robust. It can be directly glued to the surface to be measured.

1 of 1 found this helpful:

#### Also got a TMP37

Scratching head over calculating the temp and remembered someone else here saying they read 0.4v at cool room temps - that’s we I get in the 60F garage (15C). It’s marked TMP36 tho.

4 of 4 found this helpful:

#### These are great but...

I’ve used these before and have several application up and running that use them. They’re great. When I started building boards with the latest batch I ordered from SF I was surprised to be seeing values not at all in line with what I usually see. I checked polarity and it’s correct. I checked the marking on the chip package and it seems correct (as best I can tell it says TMP36G7). So I dug into the data sheets. I appear to have gotten TMP37 devices even though the markings are TMP36. I’m seeing voltages around 400mV at ambient temps around 15 degrees Celsius. What?! This is true on all of the chips I ordered. If this is, in fact, the case, the TMP37 is only rated for a range of 5C to 100C rather than -40C to 125C like the TMP36. Fortunately, I can still use these because they’re for indoor applications but it would be a bummer if I had needed the published range of the TMP36.

3 of 3 found this helpful:

#### Three wires, senses temperature, what more could you ask for?

I recently moved from MN to Cambridge, MA and the new place has a hydronic heating system (which doesn’t have to work nearly as hard in MA as my old furnace in MN. Because Oh MAN, it’s going to get to +5F tonight in MA, Let’s all freak out! That’s a nice summer day in MN!)

I didn’t know how these deals worked, so I got an Arduino MEGA2560, an Ethernet shield and some of these TMP036 units and hooked the whole mess to the internet.

The InternetOfTemperatures (IOT)!

I used data.sparkfun.com to stash all my values and google charts to plot them and now I can keep track of what’s going on. http://bobodyne.com/boiler

I need to add some more sensors, and some opto couplers to sense when each zone “calls for heat” and then I’ll know everything I need to be completely confused all winter.

Oh, watch out! The pinout of the TMP036 is not the same as the pinout of the TMP03 and when clicking randomly on alldatasheets, you might (but I certainly wouldn’t) use the wrong data sheet and hook up 4 of the 6 sensors wrong at first.

1 of 2 found this helpful:

#### Simple.Worked.No problems.

1. Wired it in to the BBB (3.3v, AGND, AIN0).
2. Enabled the BBB ADC: echo cape-bone-iio > /sys/devices/bone_capemgr.*/slots
3. Read the value from AIN0, did some math and got the correct temp.

#### Amazing! Especially considering the price!

I use these all over the place. The are incredibly easy to install and have proven to be accurate relative to the RHT sensor. Their small footprint opens up lots of possibilities for installation. I just bought another 10 to put in the drawer for when I need them, which seems to be quite often. Two-thumbs up.

#### Does what it needs to do

Its a very nice TMP sensor with decent accuracy. great for keeping an eye on the temperature around the project its in. Just be sure to put it in with the right orientation else it will get very very hot.

My only gripe is that its very prone to pick up heat from the PCB its on. For me the readings quickly became unusable due the sensor picking up heat from a linear regulator several inches away. Ofcourse for some this could be seen as a feature if you want to keep an eye on the temperature near a hotspot on your circuitboard.

#### Simple and easy to use

I don’t think sensors can get much easier to use than this. Feed it 3.3V, and read out a voltage that changes proportionally to temperature. Small form factor makes it easy to place wherever you need to measure a temperature.

Easy to use, the code was easy to find and use. A nice toy to play with.

#### Exactly as described

Easy to use, good operating range of temperatures, and intuitive. Only 4 stars because its accuracy isn’t great (+/- 2 deg C). But that’s in the description anyway. I’d recommend this to anyone who needs temperature data but doesn’t need spot-on readings.

#### Didn't fail after reversing +5V and GND polarity

I didn’t pay close attention to the pin configuration from the data sheet and I applied +5Vdc to Pin 3 and GND to Pin 1. I was getting strange readings and the sensor got really hot. I found out how hot when I burnt my finger and melted some breadboard holes.

When I realized my mistake and wired it correctly, it gave me accurate readings. I’m impressed that this part didn’t give out straight away. I suspect that the Arduino, powered by USB from my PC, limited the current it sourced to the part. I’m glad I didn’t find out what would have happened if I had connected it to a 5V power supply.

#### Analog Temp.

Although I now am very much so a big fan of digital. These are great for understanding use of equations and slope. Beware if you are using 5V to power this from USB the reference is likely to be off as USB drops below 5V. Is a very handy tool. Gave most of mine to friends to help them start their candy box.

#### Perfect

Did exactly what it was supposed to and did it well. Used for a wireless temperature sensor.