Buffered ADC input

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
I'm shifting from the ADC built in to the AtMega 2560 to an external ADC (the MCP3008 is what I'm working with right now), and am struggling with getting good inputs. I think the problem is that I need to put an OPAMP buffer between the analog circuit output and the ADC input, but I'm struggling with the details of how to build the thing. Google tells me MANY things about buffered ADC inputs, but I'm lost in the discussion of Chebyshev and fifth-order Bessels and Sallen-Keys and low pass filters and ... oh my.

At the simplest level, I think what I need to do should look like:

b5d4a1a5-66a0-4be7-82a6-1f8667ea596b.png

In testing, a setup like this with a roughly 1500 ohm resistor and 680pF seems to work alright, though I'm getting more noise than I'd like, and the impact on the signal is non-trivial. (Note: I picked those values based on what I had on hand, not because The Math told me those were the right numbers.)

Schematic 5d(2).png
I'm putting the ADC downstream of the rectifier, connected to SV4, pin 2. It also occurs to me that, if I was smart, I might be able to combine the rectifier into the buffer so I could do both functions in one spot. But then, I have no idea how to do that, so I think I'll try to keep them separate for now.

The datasheet for the MCP3008 says that the internal sample capacitor is 20pF, and I understand that C1 should be "much larger" than the sample capacitor. I'm not sure how much larger it should be, though. (I've tried capacitors from 39pF to 1uF, with predictably varying results...) I also understand that, in this basic filter setup, R1/C1 are a basic low-pass filter. But I have no idea what filter frequency I should be shooting for. Should I be trying to get a 40kHz low pass, on the grounds that I'm basically working with a 40kHz signal? Or should I be shooting for something much lower, because the actual shape of the response curve is definitely not a 40kHz curve? Or do I need to be doing some kind of complex multi-stage filter thing, like the folks over at http://ww1.microchip.com/downloads/en/AppNotes/00699b.pdf MicroChip describe?

Lost in Circuits,
Dan
 

Thread Starter

Daniel McMath

Joined Dec 28, 2015
50
In case anyone's curious, I solved this one: I ended up cutting out the whole rectifier bit and using a single op-amp as a simple unamplified buffer. So the output of the 3-stage amplifier goes straight in to the non-inverting input of the op-amp, which provides the output back to the inverting input, as well as to the ADC. I get a good clean signal downstream and save a lot of complexity in the process. Bonus!
 
Top