Pages: [1]   Go Down
Author Topic: TMP36 Graphing to GNUPlot  (Read 450 times)
0 Members and 1 Guest are viewing this topic.
Corryton, TN, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino Rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
['1.00', '97']
['2.00', '70']
['3.00', '58']
['4.00', '42']
['5.00', '25']
['6.00', '0']
Can anybody help?
THANKS


* Photo Dec 11, 21 17 30.jpg (1575.29 KB, 2592x1936 - viewed 13 times.)

* Photo Dec 11, 21 17 49.jpg (1667.99 KB, 2592x1936 - viewed 11 times.)
Logged

--Corrytonapple----
Typed while running Debian on Recycled Electrons

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5150
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Corryton, TN, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino Rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The code that is on the arduino has the correct port, I should have mentioned that.
Logged

--Corrytonapple----
Typed while running Debian on Recycled Electrons

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2517
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13738
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Rob Tillaart

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

Corryton, TN, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino Rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

--Corrytonapple----
Typed while running Debian on Recycled Electrons

Portland, OR
Offline Offline
Sr. Member
****
Karma: 7
Posts: 260
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13738
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What am I doing wrong?
maybe you smoked the internals? Did you change connections because it got hot by itself?
Logged

Rob Tillaart

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

Pages: [1]   Go Up
Jump to: