Author Topic: How Auto Ranging on a DMM works  (Read 17639 times)

0 Members and 1 Guest are viewing this topic.

Offline MikeNyeTopic starter

  • Contributor
  • Posts: 26
  • Country: au
How Auto Ranging on a DMM works
« on: October 31, 2012, 02:59:47 pm »
Hi Dave,

While you've been on the subject of multimeter input protection circuitry lately, I thought it would be good to explain how auto ranging works on a DMM, why the ADCs don't blow when you measure high voltages / currents, and how the DMM knows how to switch between ranges.

Cheers.

Kind regards,
Mike Nye
 

Offline altaic

  • Supporter
  • ****
  • Posts: 45
Re: How Auto Ranging on a DMM works
« Reply #1 on: March 17, 2016, 08:31:46 pm »
I'm really curious about this as well. I'd like to see equivalent circuits of common switched attenuators which are designed for safety.

Also, a rundown of the design decisions and gotchas, such as switching speed vs. transients. I.e. if your multimeter is on the mV range, and suddenly switch 200V onto it, what keeps it from blowing?

Are there intrinsically safe designs which bypass attenuation if under voltage is detected, and switch attenuation back on the moment a threshold is crossed?

Also, are there ICs specifically for auto-ranging an external ADC (as opposed to fully discrete or otherwise all-in-one multimeter-on-a-chips)?

There's a really nice service manual (w/ schematics) for the Keysight 34401A 6.5 digit multimeter which employs analog switches, muxers, etc., though there are still some secret sauce ASICs. It's freely available with registration at http://literature.cdn.keysight.com/litweb/pdf/34401-90013.pdf.
« Last Edit: March 17, 2016, 08:41:43 pm by altaic »
 

Offline hopski

  • Regular Contributor
  • *
  • Posts: 50
  • Country: gb
Re: How Auto Ranging on a DMM works
« Reply #2 on: March 19, 2016, 12:25:05 am »
+1  :-+
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: How Auto Ranging on a DMM works
« Reply #3 on: March 20, 2016, 03:33:25 am »
Basically, the reason the buffer/amplifier/ADC don't blow up when you apply 200V while it's in the 2mV range is because of the very high input impedance.

Generally at the input there's a relay to switch between the <2V and >20V ranges.

The <2V range has a few hundred Kohms of input impedance and goes straight into an op-amp configured for unity gain, which then goes to a second op-amp that can select between a few levels of gain (x10, x100 and maybe x1000) in order to amplify the mV and uV signals up to the ADC's native input voltage, which in this example is 2V. Anyway, let's say the input impedance is 600k ohms in the >2V range. Let's also say 1000V is applied to the input in this range. The maximum amount of current the op-amp's input would be subjected to is ~1.7mA, which isn't nearly enough to damage it. Why? Well, the inputs of the op-amp have ESD diodes connected to VCC and GND that will shunt the excess voltage away, and, since it's current limited by the input impedance, will be able to handle it.

Most precision DMMs don't rely on the op-amp's input diodes and instead will use some sort of ultra low leakage (<1pA) diodes, Zeners, JFETs or similar for protection.

Now, for the >2V ranges, the input impedance is 1M-10M so there's even less current to deal with.

Here's two visual examples:

1kV Applied to the 2V Range


1kV Applied to the 1kV Range
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Offline ChunkyPastaSauce

  • Supporter
  • ****
  • Posts: 539
  • Country: 00
Re: How Auto Ranging on a DMM works
« Reply #4 on: March 20, 2016, 04:07:15 am »
Here's two visual examples:

1kV Applied to the 2V Range

1kV Applied to the 1kV Range

What app is this?
 

Offline FlyingHacker

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: us
  • You're Doing it Wrong
Re: How Auto Ranging on a DMM works
« Reply #5 on: March 20, 2016, 04:18:01 am »
Looks like iCircuit for iPad. A decent simulator. Not incredible, but decent. Can be a pain to route things and get things hooked up sometimes.
--73
 

Offline ChunkyPastaSauce

  • Supporter
  • ****
  • Posts: 539
  • Country: 00
Re: How Auto Ranging on a DMM works
« Reply #6 on: March 20, 2016, 04:31:52 am »
Looks like iCircuit for iPad. A decent simulator. Not incredible, but decent. Can be a pain to route things and get things hooked up sometimes.

I think you're right. It's on android too, but pay version only. Saw EveryCircuit, going to mess around with it.
 

Offline altaic

  • Supporter
  • ****
  • Posts: 45
Re: How Auto Ranging on a DMM works
« Reply #7 on: March 20, 2016, 07:17:02 am »
Basically, the reason the buffer/amplifier/ADC don't blow up when you apply 200V while it's in the 2mV range is because of the very high input impedance.

Generally at the input there's a relay to switch between the <2V and >20V ranges.

The <2V range has a few hundred Kohms of input impedance and goes straight into an op-amp configured for unity gain, which then goes to a second op-amp that can select between a few levels of gain (x10, x100 and maybe x1000) in order to amplify the mV and uV signals up to the ADC's native input voltage, which in this example is 2V. Anyway, let's say the input impedance is 600k ohms in the >2V range. Let's also say 1000V is applied to the input in this range. The maximum amount of current the op-amp's input would be subjected to is ~1.7mA, which isn't nearly enough to damage it. Why? Well, the inputs of the op-amp have ESD diodes connected to VCC and GND that will shunt the excess voltage away, and, since it's current limited by the input impedance, will be able to handle it.

Most precision DMMs don't rely on the op-amp's input diodes and instead will use some sort of ultra low leakage (<1pA) diodes, Zeners, JFETs or similar for protection.

Now, for the >2V ranges, the input impedance is 1M-10M so there's even less current to deal with.

Here's two visual examples:

Excellent explanation and pics, thanks! I've got iCircuit, too-- it's wonderful for fiddling around. FYI, it's based on Paul Falstad's free Java circuit simulator applet, which is I find is even better because it's got numerous great example circuits: http://www.falstad.com/circuit/.
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: How Auto Ranging on a DMM works
« Reply #8 on: March 20, 2016, 12:32:18 pm »

Looks like iCircuit for iPad. A decent simulator. Not incredible, but decent. Can be a pain to route things and get things hooked up sometimes.

Yeah, it's iCircuit. The iPad version UI can be a bit fiddly at times. For example, to delete an item you have to tap it to select it, then tap again shortly thereafter for the Delete/Copy menu to pop up. Once you get the right rhythm down it's alright, the issue is that sometime it bugs and just won't show up. The fix is simple, just tap back to the main menu and then tap back into the circuit you were working on.

The scope trace also occasionally bugs in the same way, with the same solution. I recently got around to reporting both bugs, hopefully they'll be fixed soon. (They don't appear for me on the Mac version. I assume the PC version would be equally as stable.)

I think you're right. It's on android too, but pay version only. Saw EveryCircuit, going to mess around with it.

I recently saw EveryCircuit on the App Store and decided to check it out. I was really put off with it trying to force me to register an account with them. Once I got into the simulator, I didn't like it very much. It seemed very, very basic on the surface. I also didn't care for the way you hook things up and add parts to the schematic.

I mainly use iCircuit on my iPad when I'm away from my computer and want to put an idea down, or just kind of spitball with a theory or problem I'm working on. It does use "ideal" models of components, but they're competent models none the less. Even stuff like inductors and transformers are fully implemented, which is pretty neat. Just the other night I was working on a Resonant Royer converter design and used the Center Tapped Transformer part in iCircuit to simulate it by reversing the primary/secondary turns property and just hooking up the secondary as the primary. It worked perfectly, which isn't something I expected it to do!

I also use it at the bench on my main computer for quickly seeing "What happens if I..." before going through the hassle of setting the circuit up in SPICE or running a bunch of calculations or trial and error component swapping on the breadboard.

It's a nice little simulator, if you don't expect too much from it. It's got a large built-in library of parts, including nearly fifty 74-Series logic chips. You can also add your own custom parts by adding a sub-circuit. I've actually made quite a few custom parts that work really well, based on the datasheet models of the real parts.

Here's some of my parts library, along with a shot of the LTC1043 Switched Cap Building Block (complete with the built-in oscillator that's settable with an external capacitor) and LT1970A Power Op-Amp w/ Adjustable Current Limits.

If anyone is interested, I'll make a thread about iCircuit and upload my collection of parts.







Excellent explanation and pics, thanks! I've got iCircuit, too-- it's wonderful for fiddling around. FYI, it's based on Paul Falstad's free Java circuit simulator applet, which is I find is even better because it's got numerous great example circuits: http://www.falstad.com/circuit/.

Is it actually based on Falstad's simulator? I know visually they are very similar, but for some reason I was always under the impression that Krueger did the iCircuit engine himself, from scratch, and just cribbed Falstad's visual style. I'm not sure why, I swear I read it on the iCircuit website when it first came out circa 2010, but now I can't find mention either way.

Anwyay, if you don't like Java, someone ported Falstad's code to JavaScript (holy shit, I know, right?) which is pretty awesome. I've been meaning to take a look at the JS to see what it would take to create a forum plugin version of it. Wouldn't it be cool if you could embed a live simulated circuit into your post? My thought is it would show a static PNG and, when clicked, would come live (or open a new window with a live view).

Okay, now that I'm done with simulator talk, back to DMMs! I forgot to mention in my explanation that, before the high/low range switch, right at the input, there might also be a Transorb (TVS), spark gap, or some other means of extreme high voltage protection. I know it's common on handheld meters, but I'm not sure about modern benchtop DMMs.  (I know it's generally uncommon on older benchtop DMMs, I guess the assumption being you're not going to be hooking a HP 3456A up to a several-thousand volt distribution panel capable of hundreds of amps.)

I also wanted to give an explanation of why the <2V ranges have lower source impedance than the other ranges. A lot of it has to do with the input bias currents of the buffer amp. Once you start talking about megaohms of source impedance, just drawing *picoamps* of current will cause an offset, especially when you're trying to measure mV or uV. (A 10M resistor will drop 1mV with a 100pA load; with a 2mV input, that would be a 50% error!)

So, to help with that problem, the low range is generally relay (and not FET) switched through a few hundred kOhms instead of the 10M ohm divider chain the higher ranges use. At higher ranges, the offset is a small fraction of the total signal so it's not as big a deal; 100uV is nothing when talking about 200V, for example.

In a precision DMM, a femtoamp op-amp might be used for the buffer, to further lower the bias induced offset. Guard traces would also be used to reduce or eliminate other sources of leakage.

Now, for the auto-ranging itself! That's almost always done with the MCU in software. A lot of off the shelf SAR and Delta-Sigma ADCs actually have a unique output code for over/under range conditions. So you'd simply check that and switch your way up or down the line until you get a working code. The other option might be to use a slightly higher VREF than needed on the ADC (2.1V instead of 2V, for example) and just treat any codes over 2.000 as over range. Add a little software hysteresis so you don't constantly switch when near the limit (range up at 2V but don't range down until 1.9V, for example).

I have seen some old very simple DMMs based on V-to-F converters (which used 74-Series decade counters and BCD to 7-segment decoders for the display) which used hardware auto-ranging. Basically, a separate comparator was hooked to each tap of the input divider, which was used to drive the appropriate FET switches or relays.

Also, some of the classic 3.5 digit DMM-on-a-Chip ICs have over/under range outputs to drive logic for auto ranging.
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Offline altaic

  • Supporter
  • ****
  • Posts: 45
Re: How Auto Ranging on a DMM works
« Reply #9 on: March 20, 2016, 04:22:49 pm »
Is it actually based on Falstad's simulator? I know visually they are very similar, but for some reason I was always under the impression that Krueger did the iCircuit engine himself, from scratch, and just cribbed Falstad's visual style. I'm not sure why, I swear I read it on the iCircuit website when it first came out circa 2010, but now I can't find mention either way.

In the "About iCircuit" Window, he gives special thanks to Falstad. Could just be a tip of the hat for showing that free or low cost simulation software doesn't have to suck.

Anwyay, if you don't like Java, someone ported Falstad's code to JavaScript (holy shit, I know, right?) which is pretty awesome. I've been meaning to take a look at the JS to see what it would take to create a forum plugin version of it. Wouldn't it be cool if you could embed a live simulated circuit into your post? My thought is it would show a static PNG and, when clicked, would come live (or open a new window with a live view).

What?! I had no idea! Link?

I also wanted to give an explanation of why the <2V ranges have lower source impedance than the other ranges. A lot of it has to do with the input bias currents of the buffer amp. Once you start talking about megaohms of source impedance, just drawing *picoamps* of current will cause an offset, especially when you're trying to measure mV or uV. (A 10M resistor will drop 1mV with a 100pA load; with a 2mV input, that would be a 50% error!)

So, to help with that problem, the low range is generally relay (and not FET) switched through a few hundred kOhms instead of the 10M ohm divider chain the higher ranges use. At higher ranges, the offset is a small fraction of the total signal so it's not as big a deal; 100uV is nothing when talking about 200V, for example.

In a precision DMM, a femtoamp op-amp might be used for the buffer, to further lower the bias induced offset. Guard traces would also be used to reduce or eliminate other sources of leakage.

So the femptoamp opamp would buffer, then one would use a low noise, low offset gain stage? I hadn't run through the calculation with the opamp I selected for my project till now. 200 picoamps sounded like nothing. |O

A bit off topic, but do you know of a good femptoamp opamp with noise and input offset in the single digit µVs or lower, sub-µs settling times, high open-loop gain (~150dB), and works with a 4-5V supply?

Now, for the auto-ranging itself! That's almost always done with the MCU in software. A lot of off the shelf SAR and Delta-Sigma ADCs actually have a unique output code for over/under range conditions. So you'd simply check that and switch your way up or down the line until you get a working code. The other option might be to use a slightly higher VREF than needed on the ADC (2.1V instead of 2V, for example) and just treat any codes over 2.000 as over range. Add a little software hysteresis so you don't constantly switch when near the limit (range up at 2V but don't range down until 1.9V, for example).

I have seen some old very simple DMMs based on V-to-F converters (which used 74-Series decade counters and BCD to 7-segment decoders for the display) which used hardware auto-ranging. Basically, a separate comparator was hooked to each tap of the input divider, which was used to drive the appropriate FET switches or relays.

Also, some of the classic 3.5 digit DMM-on-a-Chip ICs have over/under range outputs to drive logic for auto ranging.

I'm using a SAR ADC for a test and measurement project, so I'm designing a fast hardware range switching stage using latching comparators and analog switches. Essentially, if the signal goes underrange while the ADC is sampling, it doesn't switch. And if it goes overrange, it latches an overrange pin on the microcontroller-- that way, the microcontroller knows to throw the ADCs result out and go with the max of that range. Otherwise, because the ADC is successive approximation, the result would have excessive error at any range transition. It's too bad no one sells a simple ASIC to take care of this (at least I haven't been able to turn one up).

Will

Edit: Just found the javascript port of Falstad's circuit simulator [http://lushprojects.com/circuitjs/], and they have a link to github. That is fucking awesome.

« Last Edit: March 20, 2016, 04:32:10 pm by altaic »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14500
  • Country: de
Re: How Auto Ranging on a DMM works
« Reply #10 on: March 20, 2016, 09:43:01 pm »
For the auto-ranging there are different solutions around. Many of the lower end DMMs use a 10 M input resistor for a kind of inverting amplifier input stage. For auto ranging the feedback is switched. So the input is always protected from the 10 M resistor.
Typical the lowest range is something like 200 mV - the 10 M resistor causes quite some noise.

Some chips also change the integration time for the ADC, so the ADC itself has a larger range and this way can compensate an extra factor of for example 100.

Higher quality DMMs (usually bench type), use a relay (or MOSFETs) to switch between high voltage ranges ( > about 10-20 V) that use a divider and the low ranges that use an high impedance input amplifier/buffer directly. The inputs are protected by something like a resistor (may be PTC) in the 50-500 K range that limits the input current. There are usually extra clamping diodes - not just ESD diodes of the amplifier. So in a 20 mV range the resistor and diodes would clamp a high input to something in the 20 V range. This would still drive the input amplifier to saturation, but with no damage to the following stages.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6815
  • Country: nl
Re: How Auto Ranging on a DMM works
« Reply #11 on: March 20, 2016, 09:49:40 pm »
Amplifier offset isn't really relevant, autocalibration is done too often for it to matter (the circuitry for calibration might have it's own offset, but that's unavoidable).
« Last Edit: March 20, 2016, 09:51:11 pm by Marco »
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: How Auto Ranging on a DMM works
« Reply #12 on: March 20, 2016, 10:46:23 pm »

In the "About iCircuit" Window, he gives special thanks to Falstad. Could just be a tip of the hat for showing that free or low cost simulation software doesn't have to suck.

Huh. Sure enough. I think I'll send an email to him and ask, because I'm curious now.

So the femptoamp opamp would buffer, then one would use a low noise, low offset gain stage? I hadn't run through the calculation with the opamp I selected for my project till now. 200 picoamps sounded like nothing. |O


A bit off topic, but do you know of a good femptoamp opamp with noise and input offset in the single digit µVs or lower, sub-µs settling times, high open-loop gain (~150dB), and works with a 4-5V supply?

Take a look at the LTC2054HV. It has 140dB gain, 30nV/C offset drift, 1.6uV noise and 1pA (at 25C) input bias.

When searching for a low input bias current op-amp, make sure you check the datasheet carefully, a lot of companies *only* spec it at room temperature (25C). Linear Tech generally has specs for 25C and 125C.

If you want the absolute best, the LTC6268 is pretty damn good. +-3fA at 25C, 4pA at 125C. 5.5fA/Hz current noise and 4.3nV/Hz voltage noise. If I recall, the SOIC package even has two dummy pins next to the inputs for routing a guard ring, which is always a nice feature.

The thing about regular offset/offset drift (as opposed to bias current induced offset) is it can be zeroed out before conversion. Basically, one of the channels on your analog multiplexer connects to ground. You select it, do a conversion, save the results, select your measurement channel, do a conversion and then subtract the zero result from it.

So, the things you need to focus on for the buffer is low noise and low input bias currents. The rest of the front end needs to just be low noise.

I'm using a SAR ADC for a test and measurement project, so I'm designing a fast hardware range switching stage using latching comparators and analog switches. Essentially, if the signal goes underrange while the ADC is sampling, it doesn't switch. And if it goes overrange, it latches an overrange pin on the microcontroller-- that way, the microcontroller knows to throw the ADCs result out and go with the max of that range. Otherwise, because the ADC is successive approximation, the result would have excessive error at any range transition. It's too bad no one sells a simple ASIC to take care of this (at least I haven't been able to turn one up).

Will

Edit: Just found the javascript port of Falstad's circuit simulator [http://lushprojects.com/circuitjs/], and they have a link to github. That is fucking awesome.

You could also use two ADCs. Have a fast low resolution (8/10/12 bit) one constantly converting while waiting for results from the slower high resolution unit.

Though, the comparator method you've got setup works well. I did something similar with a PSoC5LP. I setup my input to go through the built-in PGA first, the output of which was internally routed to a pair of comparators and an ADC. Basically, two internal DACs could set the comparator thresholds from the MCU in software, the comparator outputs went to some logic which would control the PGA gain and cause the ADC to abort the current conversion and restart.

The thing I loved about that solution was it was almost entirely based on the analog/digital fabric of the PSoC, so it was really, really fast and I didn't need any extra hardware or have to do much programming (aside from having the DACs set the threshold).

And yes, that's the JS version of the circuit simulator. Pretty awesome, right? I started working on making a WordPress plugin out of it awhile back. I need to finish that.
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 137
  • Country: pt
Re: How Auto Ranging on a DMM works
« Reply #13 on: March 01, 2024, 09:42:08 am »
For the auto-ranging there are different solutions around. Many of the lower end DMMs use a 10 M input resistor for a kind of inverting amplifier input stage. For auto ranging the feedback is switched. So the input is always protected from the 10 M resistor.
Typical the lowest range is something like 200 mV - the 10 M resistor causes quite some noise.

Some chips also change the integration time for the ADC, so the ADC itself has a larger range and this way can compensate an extra factor of for example 100.

Higher quality DMMs (usually bench type), use a relay (or MOSFETs) to switch between high voltage ranges ( > about 10-20 V) that use a divider and the low ranges that use an high impedance input amplifier/buffer directly. The inputs are protected by something like a resistor (may be PTC) in the 50-500 K range that limits the input current. There are usually extra clamping diodes - not just ESD diodes of the amplifier. So in a 20 mV range the resistor and diodes would clamp a high input to something in the 20 V range. This would still drive the input amplifier to saturation, but with no damage to the following stages.

Hello,
I see that Keithly2000 does the range switch using mosfet to enable/disable 10:1 divisor.
I am considering building the minivoltemeter project that Louis Scully first proposed with LTC2400 and some buffer opamp. I will also use a cadoc devider resistance network.
I was wondering if this same approach to enable/disable the 10:1 divisor with Mosfets can be done and if there are Mosfet that hold same characteristic with VGS at TTL level. I was not considering power it behind 0-5V and Mosfet keithly uses has a VGS Off ids of 1nA. There is this similar mosfet MMBF4391 but VGS Off is -12V.
Typically mosfet working at TTL level that I have looked have currents on VGS Off on the order of 1uA which is too much I guess.
There are designs that use relays for this but they are power hungry and would drain a 9V battery very quickly.

Cheers,
Jorge


 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14500
  • Country: de
Re: How Auto Ranging on a DMM works
« Reply #14 on: March 01, 2024, 04:19:07 pm »
The divider in the Keithley2000 and most high end meters is 1:100, not 1:10. The main amplifier is for some 10 V and the 100 V range would do a :100 by the divider and than a gain of 10 from the amplifier.
The range swiching with the better bench meters is often made this way: a 1:100 divider for the high ranges and a high impedance (e.g. > 10 Gohm) amplifier that can work with 10 V and in a few cases also 20 V.  Handheld DMMs are usually with a more or less fixed 10 M input impedance and need more divider steps, as the amplifier usually can only handle some 2 V, maybe 4 V, because of the lower supply voltage.

The switches in the Keithley meter a JFETs. Discrete MOSFETs have the parasitic diode and are thus not so suitable to switch an AC voltage or voltage that can have both polarities. Instead of discrete MOSFETs one could consider CMOS switch chips (e.g. DG212 or DG508).

For the leakage specs of the FETs, the numbers shown are the test limits. The actual leakage can be quite a bit lower. This is why some meters specify selected parts there.
A relay can also be low power, if a latching relay is used. This also helps to keep thermal EMF around the relay contacts low. There are a few handheld meters that use latching relays.
 
The following users thanked this post: jorgemef


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf