Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: Noisy ADC lines

Re: Noisy ADC lines

2004-05-11 by Craig Limber

David VanHorn wrote:

>>supply of bypass and filter capacitors. A 'scope on the power and ADC
>>lines doesn't show any noise that it can detect.
>
>AC couple, at about 1mV/Div. Your ADC is 10 bit, so that's 1mV per volt on AREF,
>per ADC count.

Sorry, I am something of a newb when it comes to analog signals and the
ADC.  Does your statement mean that my scope might not show up
something that could affect the accuracy of the ADC?

> >the same as that found on the chip's VCC lines. I have a .1uf disk cap
> >going from AREF to ground
> 
> Which ground?

I have one "ground" in my circuit.  The other terminal of the cap
attached to AREF is electrically connected to pins 11 and 31 on the
mega32 (both labled as GND), the negative terminal of the voltage
regulator and the negative connection on my battery. 

> >half a volt around the reading I expect to get.
> 
> Key point. IIRC you're supposed to toss the conversion immediately
> after a channel change.  I've done this by using an int to roll through
> the channels, changing the channel before starting the next conversion.

> I seem to remember there's a finite time that you have to wait after an
> ADMUX selection, for the mux output amplifier to settle, as well.

So, it sounds like it might be a good idea to set the mux, wait a 
period of time, start the conversion, toss the result, do another right
after and use that as my actual value.

All good suggestions to try out tonight.  Thanks for the speedy
responses.

Craig

Re: [AVR-Chat] Re: Noisy ADC lines

2004-05-11 by David VanHorn

At 12:20 PM 5/11/2004 -0600, Craig Limber wrote:


>David VanHorn wrote:
>
>>>supply of bypass and filter capacitors. A 'scope on the power and ADC
>>>lines doesn't show any noise that it can detect.
>>
>>AC couple, at about 1mV/Div. Your ADC is 10 bit, so that's 1mV per volt on AREF,
>>per ADC count.
>
>Sorry, I am something of a newb when it comes to analog signals and the
>ADC.  Does your statement mean that my scope might not show up
>something that could affect the accuracy of the ADC?

Yes.  The ADC is sampled rather than integrating, so any noise that's on the input during the sample is directly coupled to the ADC.  Also there are internal noise sources in the chip. 
Try putting a pair of 1k resistors as a VCC/2 divider into an input, and see how much noise you see.


>I have one "ground" in my circuit.  The other terminal of the cap
>attached to AREF is electrically connected to pins 11 and 31 on the
>mega32 (both labled as GND), the negative terminal of the voltage
>regulator and the negative connection on my battery. 

Could be better. You're meant to use separated grounds for your analog and digital electronics, and couple them at one point, a point where almost no current is flowing. 


>So, it sounds like it might be a good idea to set the mux, wait a 
>period of time, start the conversion, toss the result, do another right
>after and use that as my actual value.

That's the first order solution. As I said, I remember being able to do it rapidfire, but there was something special about the exact order that everything happened in.. I can dig it up if need be.

Re: [AVR-Chat] Re: Noisy ADC lines

2004-05-11 by James Wagner

The switching process, itself, can generate a smallish
signal that can go OUT to external circuitry. And, it can
cause an error similar to what you are seeing.

Try the delay after the mux switch that David mentioned but
also try a small cap (say 100pf) to ground at each active
ADC input.

Jim Wagner

On Tue, 11 May 2004 12:20:49 -0600
 Craig Limber <ffdude@shaw.ca> wrote:
> 
> 
> 
> 
> 
> David VanHorn wrote:
> 
> >>supply of bypass and filter capacitors. A 'scope
> on the power and ADC
> >>lines doesn't show any noise that it can detect.
> >
> >AC couple, at about 1mV/Div. Your ADC is 10 bit, so
> that's 1mV per volt on AREF,
> >per ADC count.
> 
> Sorry, I am something of a newb when it comes to analog
> signals and the
> ADC.  Does your statement mean that my scope might
> not show up
> something that could affect the accuracy of the ADC?
> 
> > >the same as that found on the chip's VCC lines.
> I have a .1uf disk cap
> > >going from AREF to ground
> > 
> > Which ground?
> 
> I have one "ground" in my circuit.  The
> other terminal of the cap
> attached to AREF is electrically connected to pins 11 and
> 31 on the
> mega32 (both labled as GND), the negative terminal of the
> voltage
> regulator and the negative connection on my battery. 
> 
> > >half a volt around the reading I expect to get.
> > 
> > Key point. IIRC you're supposed to toss the
> conversion immediately
> > after a channel change.  I've done this by
> using an int to roll through
> > the channels, changing the channel before starting
> the next conversion.
> 
> > I seem to remember there's a finite time that you
> have to wait after an
> > ADMUX selection, for the mux output amplifier to
> settle, as well.
> 
> So, it sounds like it might be a good idea to set the
> mux, wait a 
> period of time, start the conversion, toss the result, do
> another right
> after and use that as my actual value.
> 
> All good suggestions to try out tonight.  Thanks for
> the speedy
> responses.
> 
> Craig
> 


Preview Mac OS X "Tiger" v10.4 at WWDC 2004.
http://developer.apple.com/wwdc/applelinks.html
---------------------------------------------------------------
---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------
---------------------------------------------------------------

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.