Let's measure ± 20V @ 11MΩ Apr 2016

So much for theory and design. Here’s a built-up version of the voltmeter:

It was built as add-on for the RF Node Watcher, here’s the side view of this sandwich:

Everything was built with through-hole parts, the LM324 and LT1413 op-amp chips (quad and dual, respectively) were mounted on the bottom, to provide easy access to all their pins from the top and allow simple experimentation & soldering. The ST232C chip was mounted in a free spot, with the 4x 0.1µF caps needed to make it generate about ±9V. Here’s the corresponding circuit:

Some resistors differ (as built, it’ll handle ±15V), but it shows the line of thought which led to it:

This also adds some amplification to the op-amp. It is now no longer a voltage follower, because we’re not feeding all the output back to the V- pin but a slightly reduced level derived from it. As a result, the op-amp needs to generate a somewhat higher output swing to get V- to match V+.

As with software, once you have a working setup, you can start to optimise - either by improving the specs, or by reducing the parts count. In this case, that U2B buffer can go with little effect on the ADC performance, so we can drop the LM324 and use the 2nd LT1413 for a 3.0V reference:

Several changes are worth pointing out (and a minor tweak, R6 should be 20KΩ, not 22KΩ):

For the -5V supply, we can use this very simple circuit, based on a TC7660S in an 8-pin DIP:

But hey, why stop there? That reference voltage in this second iteration is 3.0V - couldn’t we dimension everything so that 3.3V itself can be used as reference? Sure enough, we can:

The ±2.27V input variation that comes out of the 11:1 input voltage divider ends up as ±3.11V on the output pin of the op-amp. This happens to be exactly right for a 2:1 divider tied directly to the +3.3V supply. The result varies from 0.1V to 3.2V, a perfect match for the ADC’s input range!

So there you have it: this implements a voltmeter not unlike the portable multimeters we use to measure voltages and more with (although our circuit only has a single ±25V range), with a very decent high 11 MΩ input resistance. It’s also quite robust against over-voltage.

With 1% accurate resistor values and a little calibration check, this single op-amp circuit is all we need to make the ADC of a µC usable for a much wider voltage range. The unused op-amp in the LT1413 could then be used to build an identical second channel, for example.

These designs have only addressed “static” DC behaviour so far. There is a lot more to go into, such as how to measure A/C voltages, how to measure current, and exploring the behaviour of this front-end at various frequencies. But that will have to wait for another time…

Weblog © Jean-Claude Wippler. Generated by Hugo.