[sdiy] op amp directly connected to ADC

Didrik Madheden nitro2k01 at gmail.com
Mon Jul 29 20:52:37 CEST 2019


1) Have you measured it? If there are really spikes in the supply or where
ever, you should be able to replicate them and scope them on a test bench.
If you can't replicate the problem even in an artificial worst case
scenario, perhaps with reduced decoupling capacitance, you probably don't
need to worry.

2) Have you checked the datasheet? For example, Atmega328p (randomly chosen
AVR device) the ADC is modeled in figure 24-8 as being an RC load with
resistance ranging from 1-100 kOhm in series with a 14 pF cap to Vcc/2.
Other manufacturers will have specifications in their datasheets as well,
I'm sure. But from that you should be able to calculate whether you're
violating any parameters.

Both these points can be summarized as, when arguing for a point, don't
handwave it. Get real data.

I of course don't know what the circuit does. If it's measuring microamps
from a sensitive probe, maybe this is something you need to worry about.
But in that case I'd first suspect common mode noise from the supply rail
due to dynamic power load in the microcontroller...

There is one case where I'd absolutely recommend the resistor. If the opamp
has a supply (and thus could create an output voltage) outside the supply
of the microcontroller, this could damage the ADC input. Even if this never
SHOULD happen due to how the opamp is set up, the belts and braces approach
would be to add the resistor for current limiting. Typically, the
microcontroller will have static/latchup protection diodes to ground and
Vcc to absorb any excursions outside the allowed range. For example, if the
opamp had +/- 5 V supply, and and the ESD diodes can safely discharge 20 mA
continuously, the required resistance would be 5/0.02=250 ohms or more to
handle a -5 V condition while staying within the rating of the device.

/Didrik

On Mon, 29 Jul 2019, 19:43 Chris McDowell, <declareupdate at gmail.com> wrote:

> I have often seen the output of op amps connected directly to ADC pins on
> an MCU. Mutable modules all do this, and they perform well and are
> respected. I've recently been experiencing (then reading about) why this
> may not always be a good idea, and I wonder 1: what is the best practice
> here (I believe the answer is an RC after the opamp…) and 2: when can we
> get away without that RC?
>
> I'm really asking because I've never had -practical- problems with this.
> My employer at my day job, though, has decided that because of the noise
> induced by the op amp sourcing the fast gulps of current to charge the
> sampling capacitor in the ADC, that we will always put an R between op amp
> output and ADC input. This bugs me, as it then often necessitates the C to
> keep our sampling freq up, and two extra parts adds up quick on cramped and
> cheap designs. I guess another good question is: am I wrong about this? hah
> ¯\_(ツ)_/¯
>
>
> *Chris McDowell*
>
>
>
>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20190729/633461cc/attachment.htm>


More information about the Synth-diy mailing list