Op Amp input to ADC - Page 1
Forum section: electronics / beginners

author: nr4ps
author_rank: Newbie
timestamp: September 26, 2022, 09:18:50 pm
content: Hello, I have a question about the input circuit used for an analog to digital converter as shown in the attached diagram (fromhttps://www.instructables.com/Girino-Fast-Arduino-Oscilloscope/?amp_page=true). I was wondering, what would be the consequence of omitting the second emitter-follower? The first emitter-follower is to avoid loading the circuit under test. And the non-inverting sum adds 2.5V bias because the ADC cannot read negative voltage. But I’m unclear on the need for the second emitter-follower. Can someone explain it? Thanks

author: coppice
author_rank: Super Contributor
timestamp: September 26, 2022, 09:31:27 pm
content: I think they are trying to stop the capacitive input of the ADC (i.e the sampler) destabilising the first op-amp. However, it probably won't do that reliably. Op-amps really don't like driving capacitive loads. Most ADCs have enough input capacitance to result in a phase reversal in the loopback path at a frequency where the loop gain is greater than one, and you have an oscillator. A lot of people put a resistor between the op-amp and the ADC input. This does stabilise the amp, but the resulting single pole RC filter will slow down the response at the ADC.

author: Benta
author_rank: Super Contributor
timestamp: September 26, 2022, 09:57:52 pm
content: First, the term is "voltage follower". Emitter follower is something else.Second, calling an LM324 buffer circuit " high speed" is somewhat over the top. This Girino guy apparently knows very little about analog electronics.Third: no, the second voltage follower is not really needed. I expect Girino had them in stock and decided to utilize as much as possible.

author: nr4ps
author_rank: Newbie
timestamp: September 26, 2022, 10:45:45 pm
content: Thank you both for your insights!

author: David Hess
author_rank: Super Contributor
timestamp: September 26, 2022, 11:58:34 pm
content: The summing amplifier has a gain of 2 and would drive a capacitive load better than a voltage follower, so there is no reason for the second voltage follower.

author: Circlotron
author_rank: Super Contributor
timestamp: September 27, 2022, 12:27:20 am
content: LM324 has four opamps in the package and the output buffer one was probably spare so he may have thought why not. But as others have said, no need for it.

author: Terry Bites
author_rank: Super Contributor
timestamp: September 27, 2022, 05:31:43 pm
content: How many bits is the ADC. The circuit needs high precision opamps and very good resistor matching to work properly. You can tune out the offset and gain errors in code, but the temeprature drift of a 324 and the resistors may kill your bits. It would not be good enough for a 10-bit system and hopeless at 12-bits.I imagine the originator just used U1 it becase the ic is a qaud and its going spare. It could be better used to buffer the voltage from R4, R5 before its fed into R3.Tip on drawing clear schematics. The opamps are numbered Un. U is the label for a complete ic, not its inner sections. eg U1a, U1b, U1c etc.

author: nr4ps
author_rank: Newbie
timestamp: September 27, 2022, 06:03:17 pm
content: Thanks for all the comments. The originator was only using it as an 8-bit ADC. For 10+ bits would one want to use an op amp with less offset voltage drift and replace the 10K resistors with a matched resistor network?

author: golden_labels
author_rank: Super Contributor
timestamp: September 28, 2022, 01:36:35 am
content: If anywhere in this circuit, another voltage follower would make sense between the 2.5V offset divider and the summing amplifier. Currently the offset leg has a slightly higher resistance than the signal leg. Not that with an effectively 8-bit ADC and likely 5% components it will make a huge impact. But if anybody wishes to spend an extra op-amp, this is where I would consider placing it first. It would also make the positive and negative inputs see similar impedance, helping reduce biases from input currents.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 28, 2022, 08:32:35 am
content: The resistor accuracy an value matching only effects the offset and gain. Both are usually calibrated for the full circuit anyway. So it would not matter using resistors that are 10% off. Large drift could be a problem though. When using same batch resistors this is often not that bad. The LM324 OP is indeed somewhat limiting, though not so much for the DC precison: with only 10 bit resolution of the AVR based Arduino this are some 5 mV/LSB for the ADC and some 10 mV/LSB for the input. The problem could be the AC performance with the rather anoying delay when the current polarity changes - this happens for the OP-amp at the input.Skipping the extra buffer one could as well use the equivalend dual LM358 instead of the LM324.

author: golden_labels
author_rank: Super Contributor
timestamp: September 28, 2022, 02:39:27 pm
content: Quote from: Kleinstein on September 28, 2022, 08:32:35 amI did not consider resistors tolerance to be a problem. I mentioned it to indicate that the imprecision on the positive input of the summing op-amp is not a problem.Currently that op-amp sees resistances as depicted in the attachment. Can you spot what does not match the pattern?That leads to two issues:The summed inputs are not Signal through 10kΩ and 2.5V through 10kΩ, but Signal through 10kΩ, 5V through 21kΩ and GND through 21kΩ. So instead of signal being offset by +2.5V, it is offset by a value that slightly depends on the signal itself, introducing an error of a few dozen mV.The negative input sees 5kΩ, the positive input sees 5.12kΩ.Of course that is a minuscule error, that can be ignored in a circuit consisting of 5% resistors. Either because the worsr case error from them is already larger, or because the circuit will be calibrated anyway. And this is my motivation for mentioning the tolerance.And, to be clear, I do not say OP should put an op-amp there. I am just saying thatifsomeone wanted to use an extra op-amp, placing it there would make more sense.Quote from: Kleinstein on September 28, 2022, 08:32:35 am10 bits is the width of a value used to control the internal DAC. It is returned as the measurement result. But the actual measurement accuracy is worse. Unfortunately that is not mentioned in the ADC part of the datasheet. For that one must scroll 60 pages, to the “Electric characteristics” section. For ATmega328 it’s Table 28-8 “ADC characteristics”. Total unadjusted error is up to 3.5 LSB. Without calibration one should not expect better than 8 bits. With calibration: depends, but getting full 10 bits is unlikely in ATmegas. Of course 8 bits is still better than 0.5%.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 28, 2022, 02:54:11 pm
content: Much of the 3.5 LSB unadjusted error is offset and gain error - so the comparable with error one gets from resistos that are off a little. Especially the zero offset is rather easy to adjust. The gain acts togther with the accuracy of the reference, that in this case likely is the 5 V supply. While not as easy as the zero adjust an extra calibration for the gain is a good idea.

author: Zero999
author_rank: Super Contributor
timestamp: September 28, 2022, 04:59:06 pm
content: Quote from: golden_labels on September 28, 2022, 01:36:35 amIf the reference is clean enough and a filter capacitor isn't required, remove R3 & C3 and change R4 & R5 to 20k.