Resolved by Dunning-Kruger!

## Tmp36gt9 Temperature Sensor

Hello.

So I have a few TMP36GT9 analog temperature sensors that I want to use.

I have hooked them up directly to a analog port (3.3voltage) and get readings from it. When I read the values it fluctuates between 44 and 57. I have read that a pull up/down resistor will stabilize the readings, but I am not sure what value resistor I should try?

This sensor accepts input voltage between 2,7 and 5,5v and should output 750mV @ 25c and is linear between -40 to +125c

So my second question is how do I find the correct unit multiplier to show the temperature in Celsius?

All help is much appreciated!

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

#1

Does the sensor state what the mV or V value would be at 0C or 100C or any other temperature other than 25C? If it gives you another temp stat then you can use the two analog values to extrapolate the temperature between those two measurements... For instance... if the mV reading was 0mV at 0C (highly unlikely but just as an example) and 750mV at 25C then 12.5C would be 325mV.... You can try a 10K and see what it gets you....

#2

From the graph in the datasheet it looks to be 1.7v @ 125c

Datasheet

Will try with a 10k resistor as soon as I find my resistor box

#3

OK the data sheet says 10mV per 1 degree of C and 25C is 250mV so the math is dead easy.... 10mV = 1C , 20 mV = 2C, 30mV = 3C.... etc...

#4

Hmmm... Looks like I was looking at the wrong sensor... So indeed 750mV =25C and 125C at 1750mV.... It states 10mV per deg of C.... -40 looks like around 100mV... so the range is 165C and 1650mV...

#5

Have to get ready for work.... Maybe someone else can help you with the math to convert the analog reading to a Celsius reading.... Should be straight forward to do but I don't have the time right now....

#6

Thank you so much for the help Richard R! This seems pretty straight forward yes. I am at work myself so I wont get to do any progress until tomorrow anyways.

#7

Okey. I got it working. I used a 10K as a pull down and that stabelised it quite a bit. The readings is still jumpy but I suspect it will improve further when I actually solder the wires.

The strange thing is that it reports an ambient temp of 5-8c while the actual ambient at the moment is 22c. But if I hold the sensor in my hand and check the voltage output, temperature rise it fits the graph in the datasheet perfectly. Could it be the sensor? bad connections maybe?

The code I used might be a bit bulky for what it does, but it works. If this can be simplified I would love to learn how

``````:t1