Pages: [1]   Go Down
Author Topic: AnalogRead unstable with ColorLCD  (Read 796 times)
0 Members and 1 Guest are viewing this topic.
France
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I just installed ColorLCD from Sparkfun on my Arduino Mega. It works Fine.
But when I put a 10 kOhm potentiometer in an analog input (with two border pins connected to ground and 5V), the value is VERY unstable (+30 / -30).
And Even if I'm connecting the analog input to the ground (with no potentiometer), the value is varying between 0 and 30 (on 1023), with some kind of cycles.
If I disconnect the LCD, the analog values become stable again.

So I think maybe there are some kinds of capacitors (the varying has... constent cycles) in the LCD which are perturbating the inside of Arduino ??
Someone did have the same problem ?
Can I add some regulation in the analog input of Arduino ? (like capacitors)

Thank you in advance, and sorry for my poor english.
Logged

Build a groove box with Arduino Due :
http://groovuino.blogspot.com/

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33371
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So I think maybe there are some kinds of capacitors (the varying has... constent cycles) in the LCD which are perturbating the inside of Arduino ??
No I would not think so.
It is the very lack of capacitors that is causing you the problem.

First make sure your power supply can delver the expected current. Then add a 10 to 100uF capacitor across power and ground of the LCD.
Logged

France
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, you're right, I'm powering with my computer and USB cable, maybe it's not enough. I will try to power with external power supply and add capacitors.

Thanks
Logged

Build a groove box with Arduino Due :
http://groovuino.blogspot.com/

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

gaith,
I noticed that when using digital- and/or analog Outputs and Analog inputs, using the same Gnd-pin the Analog input values are lifted about 30, like you mentioned. Even grounded analog inputs show so.
When using a separate Gnd-pin for analog-inputs the problem is gone. When measuring the voltage between the two Gnd-pins you'll see a value raising to >100mV, depending of the number of digital outputs.
It seems it has to do with the differential measurement at the analog input cicuits.

Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is classic issue - any ground wire that carries an appreciable current (such as powering LCD backlights) will have a voltage
across it (in fact the bulk of this voltage can be due to the contact resistance of the header pins).

You want any measurement signal to use a separate, non-current-carrying, ground wire as its reference - then you are not
adding/subtracting any IR-voltages to your signal. (V = IR).  [ well more accurately you are keeping the current really small
so the error is less ]
Logged

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

Pages: [1]   Go Up
Jump to: