Pages: [1]   Go Down
Author Topic: Analog input channels are incorrectly reading input voltages  (Read 493 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using an Arduin Mega and I am trying to read the voltages across a variable resistors, but the the analog input pins are not accurately reading the voltages.  The voltaged being read by the Arduino are also changing depending on which pins are being used.  Is there a way to set the Arduino such the pins being used won't matter?  Is it possible there is interference between the channels?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had success with a photocell by inserting a 10k resistor between the analog input and GND (the analog input pin connects both to the photocell and the resistor lead).
I also had found some information at http://www.ladyada.net/learn/sensors/cds.html which shows this process in a good tutorial.  Hope this may help.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26969
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you leaving some settling time between reads? The analog inputs have to charge up an internal sample & hold cap that theA/D converts. If your analog source has very low current drive capability it could take a while to settle. Like 10's of microseconds.  Read the A/D section of the atmega data sheet for more details.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Online Online
Shannon Member
****
Karma: 206
Posts: 12076
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Need to see the circuit to know what the problem is.  Note that the ADC only works accurately with 'low' impedance sources (which I think means 10k or lower, something like that).
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: