Help with tmp 36 temperature sensor please

dr_robert

New Member
Hi there,

I am testing a tmp 36. The middle pin of the sensor is connected to the adc pin of an 08m2 and I am writing the value to b0. I'm reading the b0 value in the terminal via the axe027 (thanks forum members for the advice there). What value am I seeing in the terminal? For instance I get a value of 56 or 39 this morning when it was colder...is that the value in milivolts? Of so, do I then do a conversion using the ratio 75 mv = 25 deg c so 56 is 18 deg c or thereabouts? Does it matter what my input voltage is? The data sheet says it can run from2.7 v to 5.5v and I'm running off a 3 aa battery pack. Any advice gratefully received!


Thanks

Rob
 

dr_robert

New Member
A quick look at the data sheet http://www.analog.com/static/imported-files/data_sheets/TMP35_36_37.pdf suggests that it doesn't matter what the supply voltage is - the output is 20mV per degree C

Showing your code would be a good idea. You are probably reading the raw ADC value in b0, which you have to do a few simple sums on in order to get the mV equivalent and hence the temperature

Why the TMP36 out of interest? They might be precision devices, but they are low sensitivity (1 degree C = 25mV) so if your hoping for degree accuracy, you have a tough job. DS18B20 is the ubiquitous/normal device to use with PICAXE - see the READTEMP commands in Manual 2
Thanks for such quick responses. I am reading the raw adc value into b0, so looks like I'll need to convert tht to mv, I'm ok with the calculation to then convert mv to degrees.

Why that part? I believed the hype :). The description said it was easy to use, required no calibration and you just divided the v out by 10 to get temp...I should have guessed it wouldn't be quite tht easy.

So if I am using 4.5 v in then to convert adc to volts am I taking the adc value times the v in divided by 255? Or 4.5 * 56 / 255 = .66 so temp = .66/.75*25 = 22 deg

Would I be better using the fixed internal voltage of 1.2...or would I be better getting the part you suggest :)

Rob
 

JimPerry

Senior Member
The input to the ADC is not related to the 4.5V as the MP36 is internally regulated/calibrated to give the 20mV per degree output.


You can check the ADC conversion with a 10k pot between +4.5V and 0V - wiper connected to the Picaxe and a voltmeter to measure the precise input voltages - then compare to ADC output.
 

john2051

New Member
Hi Rob,
It looks like you just divide the output voltage by ten to get deg C

eg 250mV / 10 = 25degC

I hope they're this easy, because I got given quite a few.

Good luck regards john
 
Top