Fixing the offset problem Apr 2016

There is still a fairly serious flaw in our little voltmeter setup: its Vin input is not at ground level. It’s connected via Z1 and Z2 to that 2.4V or so virtual ground we just created, and when Vin is not connected to anything, it will read as 2.4V instead of 0V.

More importantly, this means that when we connect this to a circuit-under-test, it is likely to influence that circuit by injecting a bit of current. While it is impossible to completely avoid affecting a circuit when attaching a voltage probe, we really need to minimise that effect and it should definitely not be biased towards some non-zero voltage level.

The way to accomplish this is to measure against ground and to make the input of our voltmeter very high-resistance/-impedance so that it draws almost no current. Many commercial digital multimeters have an input circuit with 11 MΩ resistance. At 20V, this will draw under 2 µA.

This is another good task for an op-amp as voltage follower. A precision op-amp such as the dual LT1413 has an extremely small input current (well under 1 nA). If we use it as voltage follower in front of our circuit so far, we get a very good input stage - on par with commercial multimeters.

But then the input voltage range issue rears its ugly head again: if the LT1413 is powered from +5V and ground, then it too won’t be able to handle negative voltages! This time, the solution is different: unlike digital circuits, op-amps can easily be powered from both a positive and a negative supply voltage. If we power the LT1413 from say +8V and -8V supplies, then it can easily pass through any signal in the range of ±5V.

There are chips which can generate such voltages from a single supply. Such as the MAX232:

This chip is intended for use as RS232 converters, but we can ignore that functionality and re-purpose it as a cheap DC-to-DC converter. Unlike conventional switching power supplies, such a circuit only needs a few small capacitors. The flip side is that the chip can supply only a few milliamps of current, but since that’s more than enough to power an LT1413 - who cares?

Given such a “dual-rail” power supply, we can now sketch an improved input circuit:

Some notes about this simple op-amp based circuit:

We’ve now reached the point of this whole exercise: a circuit which can handle voltages between -20V and +20V and turns these into something suitable for the ADC’s limited 0..3.3V range.

A note about op-amps: not all types are created equal. Unlike “ideal” op-amps, real ones have various limitations and imperfections. One issue is the input bias current - which is why a “precision” LT1413 was picked for the input stage, although it costs more than the “household” quad op-amps of an LM324. Another aspect is the allowed voltage range for inputs and output: many op-amps don’t support voltages all the way up to the upper supply level, or down to the lower supply level. For those that do, the inputs and/or outputs are tagged “Rail-to-Rail”.

This is why the LM324 is powered from 5V and GND in this project, and why ±8V was used for the LT1413 - both are a bit beyond the signal ranges they need to deal with. See this PDF from Texas Instruments for all the key op-amp parameters and what they mean.

It’s time to wrap things up, draw the complete circuit, and perform final calculations and checks.

Weblog © Jean-Claude Wippler. Generated by Hugo.