Go Down

Topic: SOLVED: Odd fluctuations in analog readings when using external power (Read 5 times) previous topic - next topic

nickvd

SOLVED!

First: apologies if this is in the wrong category, there are just too many to choose from that this question may fit in...

I am building a midi controller and got everything working perfectly on the breadboard with the duemilanove, the 16 pots (being read through two 4051's) were stable at any position, fluctuating within 3 points (my smoothing value).   I switched the duemilanove out for a breadboard arduino I made a few months ago and I tried powering it with (many different) wall warts (6.5v/200ma, 9v/150ma, 9v/800ma, 12v/1A).  No matter what I used, I could not get the pots to hold their values any more... they would fluctuate by upwards of 15-20 points and therefore are pretty much useless...

After much searching, I figured out that the adc is fairly sensitive to changes in the reference voltage, so I began testing the voltages with various options I have available and noticed that the 7805 in the bb arduino was outputting about 4.95v steady.  I switched it out with an LM2940 and it locked onto 4.99v and was steady...  Using the bb arduino, but the duemilanove (atmega removed) for power (5v and gnd hooked up) I get 5.07v (and the pots are stable).

I guess my question would be: is the adc really THAT sensitive, in that .08v can cause an almost 10 fold increase in the jitter of the values?

What can I do to solve the problem?

I know you will want me to post a schematic, but I don't have one yet, and since everything works perfectly using the duemilenova on its on, AND when only using the power it provides (but using the bb arduino for everything else), I cannot see an issue with that part... I have a feeling my lack of basic electronics knowledge is hurting me here...


Thanks everyone!

Coding Badly

Do you have a 0.1uF across +5 and GND as close to the processor's power pins as possible?  Do you have any fast-switching digital pins close to AVCC, AREF, or the Analog Input pins?  Did you try a capacitor on AREF?  Have you checked Grumpy_Mike's website for de-coupling advice?

nickvd

Do you have a 0.1uF across +5 and GND as close to the processor's power pins as possible?


I have 100uF across the input and a 10uF across the output of the lm2940. (I have also played with a couple different ones i have on hand and none made a difference.

Do you have any fast-switching digital pins close to AVCC, AREF, or the Analog Input pins?


Not really... Its on a breadboard with a diy bb arduino...  Picture attached.  (remember, when I power it from the 5v from the duemilenove it works perfectly... the only change is the addition of the jumper wires and the lack of the dc plug being inserted.

Did you try a capacitor on AREF?


AREF is not connected on the diy bb arduino (see previous response)

Have you checked Grumpy_Mike's website for de-coupling advice?


Yep, read every single page on his site... and nearly every post he as made since I joined :)


Grumpy_Mike

Quote
AREF is not connected on the diy bb arduino (see previous response)

That's the problem, all the rest is a distraction.  :)

nickvd

Ok, so why would it work when supplied with 5v from the duemilenove?  and should just be connected to vcc? or should it also be decoupled?

I'm just curious as to why seemingly the only difference is where the power is coming from, and that the difference is a mere .08v....

Please explain, I am very interested in knowing the why behind this issue...

Go Up