Go Down

Topic: TMP36 Graphing to GNUPlot (Read 497 times) previous topic - next topic

corrytonapple

Hi all,
I have an arduino Uno, hooked up to a breadboard from the sparkfun starter kit.  All these parts are about one year old. I have attached pictures of the circuit, to the best of my ability.  Ignore the button on the breadboard, that was for testing other things that aren't hooked up anymore.

Anyway, I have the following code:
http://arduino.cc/forum/index.php/topic,3571.msg27603.html#msg27603

My issue is, the TMP36 is very inaccurate.  The data ranges from 115F down to 0F, with no limits on the randomness or crazyness.  I have it hooked up via USB and to a 9V 1A power supply, for sufficient juice.  Here are some sample coordinates its placing (the second number is the temp):
Code: [Select]
['1.00', '97']
['2.00', '70']
['3.00', '58']
['4.00', '42']
['5.00', '25']
['6.00', '0']

Can anybody help?
THANKS
--Corrytonapple----
Typed while running Debian on Recycled Electrons

pylon

You're reading from A4 in the code but you connected the sensor to A5.

corrytonapple

The code that is on the arduino has the correct port, I should have mentioned that.
--Corrytonapple----
Typed while running Debian on Recycled Electrons

Chagrin

All of your connections appear to be correct. I would suggest attaching a multimeter to the TMP36 to make sure it's giving stable readings. Also verify that the analog pin is OK by replacing the TMP36 with a potentiometer.

FWIW RRDTool is a better option for long-term/historical data charting and recording. IMHO.

robtillaart

for those curious - http://oss.oetiker.ch/rrdtool/index.en.html -
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

corrytonapple

I've done a few things that you recommended.  I used a multimeter and put the prongs on ground and the middle output pin.  It measures 0.35v or so.  I then hooked up the wires that come out from the breadboard, and attached my multimeter to the ground and output lines.  The output was not hooked up into the Arduino.  The ground was hooked up to the multimeter but was grounded at the Arduino. I got 1.2v at room temperature, 1.0v pressing a finger to it, and 1.6-1.9v with an ice cube on it.
When I hooked the circuit up normally but poked the multimeter prongs in, I got 0.12-0.17v volts, varying up and down every few seconds.
The 10k trimpot produced a steady number, varying from 0-1024 as the documentation says it should, as I turned it.  I could leave it in any one position, and the output was solid.
What am I doing wrong?
Thanks
--Corrytonapple----
Typed while running Debian on Recycled Electrons

giantsfan3

This doesn't directly answer the question but just in general, the DS18B20 is commonly posted as a very reliable and easy to use temperature sensor, and it has been so in my experience too. You might consider experimenting with it.

robtillaart

Quote
What am I doing wrong?

maybe you smoked the internals? Did you change connections because it got hot by itself?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up