Go Down

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

Grumpy_Mike

While you are reading the voltage on a meter you have no idea of the amount of ripple voltage siting on the top of it. So the source of the voltage can have an effect by being more noisy (having more ripple). Adding capacitors will make it smoother and it is the noise into your analogue circuitry and reference voltage that is giving you the variations you see. It also helps if the analogue side of the Atmega is decoupled from the digital side. In most circuits (mine included) these are simply connected together, but the data sheet recommends some LC circuits to isolate the two power rails.

nickvd

Yeah I do have some sort of idea of the importance of decoupling, I am more interested in why not having aref connected is causing problems.. from what i read the adc defaults to vcc for its reference voltage, and since the pots are also hooked up to the same vcc, they should track with ahy ripple.... shouldn't they?

MarkT


Yeah I do have some sort of idea of the importance of decoupling, I am more interested in why not having aref connected is causing problems.. from what i read the adc defaults to vcc for its reference voltage, and since the pots are also hooked up to the same vcc, they should track with ahy ripple.... shouldn't they?


Aref is the reference directly into the ADC circuitry - it needs to be held at a proper reference voltage.  When its configured to be 5V it will be internally driven to the AVcc rail ON THE CHIP via a transistor.  The transistor will have significant resistance and the power rail on the chip will be noisy (not the least because its connected to the digital Vcc on most boards!).  Off the chip the noise on the supply rail is shorted out at the supply decoupling capacitors, but due to stray inductance and resistance this won't stop switching noise (which is really cross-talk) on the chip's rails.  Even 10mV of noise will degrade the ADC performance, whereas the digital logic will survive hundreds of times more noise without complaining.

Adding the capacitor on Aref shorts out the noise (its acting as a low-pass filter together with the transistor).  If it were economic to provide the decoupling on-chip it would be done, but there isn't room for large-value capacitance on the silicon.  Besides the value of decoupling cap is a trade-off between performance and expense.  For instance if you aren't using the ADC you don't need the cap.


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

nickvd

Still a little confused, but I am getting there...  So even if I need the internal reference of vcc, I should still have a cap from aref to gnd..  Is there a reason why it works fine off the duemilenove?  Is it just that it provides a little more than 5v therefore any ripple would still keep it above 5v?

MarkT


Still a little confused, but I am getting there...  So even if I need the internal reference of vcc, I should still have a cap from aref to gnd..  Is there a reason why it works fine off the duemilenove?  Is it just that it provides a little more than 5v therefore any ripple would still keep it above 5v?


The duemilenove has a capacitor on Aref.  It probably has better decoupling on the rails too and a better groundplane.
[ I won't respond to messages, use the forum please ]

Go Up