Author Topic: Making 6.5 digit DMM with Arduino & LM399H  (Read 11725 times)

0 Members and 1 Guest are viewing this topic.

Offline DROBNJAKTopic starter

  • Contributor
  • Posts: 31
Making 6.5 digit DMM with Arduino & LM399H
« on: April 07, 2014, 02:30:07 pm »
I was watching Dave's video about Agilent's bench 6.5 digit of precision, $2,500 plus multimeter. And there was this humble LM399H voltage reference chip right in the middle of the circuit board. So I figured out that this LM399H must be the heart of the precision of the $2,500 DMM. Than, one can just hook LM399H, costing $15, up to Arduion and still get 6.5 digit precision for pennies. OK, minus all the bells and whistles, not to mention branding and marketing, but who would care.

Now I checked the datasheet for LM399H and it said Initial Tolerance is 2%. Well, 2% is very far from 6.5 precision.

Now, question is, where am I going wrong?

And, is it possible just to buy an off the shelf precision voltage reference chip and make your own super accurate 6.5 digit voltmeter?

 

Offline theatrus

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: us
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #1 on: April 07, 2014, 02:43:21 pm »
While it is possible, the level of precision requires more than run-of-the-mill parts, specialized layouts, and especially a lot of precision on the analog to digital conversion side (i.e., not the unit in the AVR).
Software by day, hardware by night; blueAcro.com
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #2 on: April 07, 2014, 02:45:00 pm »
its accuracy is not important.  you can trim its output via different ways.

what matters is its precision.  does it always generate the same voltage output?  and yes, they do.

do they age well and be predictable?  yes, they are.

I am an arduino guy (did some several year long projects with arduino) but what do you want to accomplish with the arduino: an lcd display output and voltage divider (etc) front end?

the controller is not the important part, of course.  its the pcb design, parts selection, power supply design, shielding, guarding and so on that takes a 399 and makes it into a $2k dmm.

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #3 on: April 07, 2014, 02:52:52 pm »
Reference is only 5% of all work needed to be done for precision meter.
LM399 and similar reference chips are used in high-end gear because they are very stable (better than 10ppm/year is not a rarity), not because of initial tolerance. Absolute voltage output in such case is not important, because it's calculated and calibrated by software/firmware, but making sure that set value is not going to change millivolts after day/week/month is vital. Just a resistors alone for such references are often selected/aged and cost more than reference chip itself. For example Vishay foil resistors with similar to reference temperature related drifts can easily cost over 50USD per piece.

Also even if you spend countless hours designing and debugging whole thing, reference, ADC unit (which need to be very stable and precise as well), current sources for resistance measurements, all firmware tricks and hacks, proper thermals and mechanicals, you will end up spending way more than 2500$.
And even then - how you going to verify that such product meet spec? Common rule - to test accuracy of something, you need to have source or meter at least 4, better 10 times better than device under test. Which brings you back to high dollar arena, because 7.5/8.5 meters cost 5-10k, and calibrators cost 5 times of that :)

Of course there are some ways to cut corners, but to make device like mentioned Agilent, which you get supported, under warranty and well calibrated, would cost much more than 2.5K$ :).
« Last Edit: April 07, 2014, 02:55:15 pm by TiN »
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2905
  • Country: gb
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #4 on: April 07, 2014, 03:06:02 pm »
If some inventive chinese company could come up with a 6.5 digit multimeter for $250 I'm sure there would be one on the market. That they haven't does suggest that it isn't all that straightforward.

You could probably take a 20-bit ADC (lots to choose from on the market in the $30-40 range) and an REF3225 and a 20-bit ADC (probably another $20-40) and a bunch of precision resistors and come up with something in the 0.1% to .05% range.

But why bother when a UT-71D can be had for < $200?

 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16651
  • Country: us
  • DavidH
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #5 on: April 07, 2014, 05:11:43 pm »
I would actually consider it a trivial task but there are many traps for the unwary.

For example common instrumentation grade ADCs need to be driven with relatively low source resistance to achieve their rated performance so a high precision buffer is needed as well.  Simply connecting the ADC inputs to a 10 megohm decade divider network will not work.  Offhand I do not know of any ADCs where this would not be an issue in this sort of application.
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #6 on: April 07, 2014, 05:20:32 pm »
In any case I'd suggest you build one, 399s only cost about $7 bucks.  See how close you can get it to match your DMM and record the repeatability, you'll learn and have fun while doing it.

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #7 on: April 07, 2014, 05:30:04 pm »
In any case I'd suggest you build one, 399s only cost about $7 bucks.  See how close you can get it to match your DMM and record the repeatability, you'll learn and have fun while doing it.

I'd agree with that and you'd have a nice stable voltage ref. A handy thing to have kicking around.
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #8 on: April 07, 2014, 05:39:21 pm »
I just had a thought: would there be a benefit to having several 399 refs averaged together and running at the same time?

its not uncommon to see multichannel DACs being used as mono or stereo by averaging concurrent channels or outputs.  for the voltage ref, perhaps if you had 2 or 4 or 8 of those and could sum them and divide, that might be better than just a single one.  has anyone ever tried or shipped a product like this?

I can think of a few different ways to accomplish an 'average'.  the parts are not every expensive, really.  I bought a few 399's on ebay a few yrs ago just to have onhand to play around with ;)  never found a good project for them, though.

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16651
  • Country: us
  • DavidH
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #9 on: April 07, 2014, 05:51:11 pm »
I just had a thought: would there be a benefit to having several 399 refs averaged together and running at the same time?

The low frequency noise can be averaged out this way.  Assuming that the drift between units is uncorrelated, that can be averaged out as well.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8518
  • Country: us
    • SiliconValleyGarage
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #10 on: April 07, 2014, 06:03:30 pm »
I was watching Dave's video about Agilent's bench 6.5 digit of precision, $2,500 plus multimeter. And there was this humble LM399H voltage reference chip right in the middle of the circuit board. So I figured out that this LM399H must be the heart of the precision of the $2,500 DMM. Than, one can just hook LM399H, costing $15, up to Arduion and still get 6.5 digit precision for pennies. OK, minus all the bells and whistles, not to mention branding and marketing, but who would care.

Now I checked the datasheet for LM399H and it said Initial Tolerance is 2%. Well, 2% is very far from 6.5 precision.

Now, question is, where am I going wrong?

And, is it possible just to buy an off the shelf precision voltage reference chip and make your own super accurate 6.5 digit voltmeter?
your whole idea is off.

first of all arduino  :palm:
that thing doesnt have the horsepower nor peripherals to do the work. it does not have an accurate enough a/d nor one with enough bits. so scrap that idea you will need an external a/d

second you need some instrumentation circuitry : input divider , buffer amps. and you will need to make the correct voltage from the lm399. the 399 is long term stable voltage source. but the absolute is unknown (2%) so you need to make a calibration system.

6 1/2 digit and more machines use multislope integration . they are essentially voltage to time converters. this allows nulling all offsets. i posted a whole explanation on how this works. look for the 34401 teardown.

there are 24 bit adc out there but those require very careful board layout. you can't breadboard with those things. nor can you breadboard the entire instrumentation system.

once you have buikt the system you will need to calibrate it. most likely you will end up with calibration tables. that is where a fast cpu  is required.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1999
  • Country: us
    • netstuff
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #11 on: April 07, 2014, 07:15:52 pm »
no one would use the arduino's a/d for anything here.  you'd use i2c or spi to talk to read a/d subsystems.

the arduino would work ok as a controller for a voltmeter as long as it didn't have to do lots of complex work.  if its just setting up chips and then reading it as fast as I can and sending output to lcd or serial, it could do that fairly well.  it could probably even do multi reads and averaging and be fast enough for many people.

it could handle the button presses on the front and some back-end serial or front-end LCD.  if using mega arduino, it could handle touch screen TFT interfaces.

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16651
  • Country: us
  • DavidH
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #12 on: April 07, 2014, 08:04:27 pm »
your whole idea is off.

first of all arduino  :palm:
that thing doesnt have the horsepower nor peripherals to do the work. it does not have an accurate enough a/d nor one with enough bits. so scrap that idea you will need an external a/d

once you have buikt the system you will need to calibrate it. most likely you will end up with calibration tables. that is where a fast cpu  is required.

It certainly has the horsepower.  A 6502 could handle it although I would not use anything with lower performance or less integration than a PIC or AVR.  Conversion times are slow if only because of the need for high 50/60 Hz common mode rejection so processor throughput is not a limitation.

Quote
6 1/2 digit and more machines use multislope integration . they are essentially voltage to time converters. this allows nulling all offsets. i posted a whole explanation on how this works. look for the 34401 teardown.

there are 24 bit adc out there but those require very careful board layout. you can't breadboard with those things. nor can you breadboard the entire instrumentation system.

Or voltage to frequency conversion, or charge balancing (a specific case of voltage to frequency conversion), or delta-sigma, or single slope integration (no 50/60 Hz common mode rejection though).  My personal favorite is charge balancing but instrumentation delta-sigma converters have come a long ways.  Their integral nonlinearity just makes it to 6.5 digits.  Single slope integration can get you to 9.5 digits of linearity but the lack of 50/60 Hz common mode rejection makes them impractical except for very special applications.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8518
  • Country: us
    • SiliconValleyGarage
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #13 on: April 07, 2014, 08:40:05 pm »
It certainly has the horsepower.  A 6502 could handle it although I would not use anything with lower performance or less integration than a PIC or AVR.  Conversion times are slow if only because of the need for high 50/60 Hz common mode rejection so processor throughput is not a limitation.
Agilent uses 80188 or 80196 16 bit racers... an 8 bitter can't cope with everything that goes on in the multislope. even the 196 needs assistance of an ASIC implementing the charge balance timers. pic or avr are totally off. it's 2014. let's use a cortex M3 or M4 (hardware floating point) instead of backwards or obsolete cpu's.

Quote
Or voltage to frequency conversion,
not good enough for 61/2 and more

Quote
or charge balancing (a specific case of voltage to frequency conversion),
this is the way to go. charge balance is not a voltage-frequency conversion. it is voltage time

Quote
or delta-sigma, or single slope integration (no 50/60 Hz common mode rejection though).  My personal favorite is charge balancing but instrumentation delta-sigma converters have come a long ways.  Their integral nonlinearity just makes it to 6.5 digits.  Single slope integration can get you to 9.5 digits of linearity but the lack of 50/60 Hz common mode rejection makes them impractical except for very special applications.

all to impractical and combersome in designing the system. you'd end up with the solartron misery where you need unobtainium hand selected parts.

the Agilent technique is best. all errors are self cancelling at calibration. there is not a single adjustment in the system. as long as you have a long term stable reference voltage and a stable master oscillator (10MHz) you go. everything else is allowed to drift. including your integrating capacitor.

the system equation collapses to : (time to deintegrate unknown / time to integrate reference) * reference voltage
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline vaualbus

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: it
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #14 on: April 07, 2014, 08:51:01 pm »
The arduino adc is very very bad.
This summer I "charterized" them using a data precision 8200 voltage reference. What I figured out is that arduino adc  is only good in high voltage above 1.5V and under it really go crazy.
So I suggest using a external ADC.
Best regards, Alberto.

PS If I found I'll post the graph of the reading voltage using the arduino adc andt the set voltage.
« Last Edit: April 07, 2014, 08:53:05 pm by vaualbus »
 

Offline vaualbus

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: it
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #15 on: April 07, 2014, 09:06:29 pm »
It certainly has the horsepower.  A 6502 could handle it although I would not use anything with lower performance or less integration than a PIC or AVR.  Conversion times are slow if only because of the need for high 50/60 Hz common mode rejection so processor throughput is not a limitation.
Agilent uses 80188 or 80196 16 bit racers... an 8 bitter can't cope with everything that goes on in the multislope. even the 196 needs assistance of an ASIC implementing the charge balance timers. pic or avr are totally off. it's 2014. let's use a cortex M3 or M4 (hardware floating point) instead of backwards or obsolete cpu's.

Quote
Or voltage to frequency conversion,
not good enough for 61/2 and more

Quote
or charge balancing (a specific case of voltage to frequency conversion),
this is the way to go. charge balance is not a voltage-frequency conversion. it is voltage time

Quote
or delta-sigma, or single slope integration (no 50/60 Hz common mode rejection though).  My personal favorite is charge balancing but instrumentation delta-sigma converters have come a long ways.  Their integral nonlinearity just makes it to 6.5 digits.  Single slope integration can get you to 9.5 digits of linearity but the lack of 50/60 Hz common mode rejection makes them impractical except for very special applications.

all to impractical and combersome in designing the system. you'd end up with the solartron misery where you need unobtainium hand selected parts.

the Agilent technique is best. all errors are self cancelling at calibration. there is not a single adjustment in the system. as long as you have a long term stable reference voltage and a stable master oscillator (10MHz) you go. everything else is allowed to drift. including your integrating capacitor.

the system equation collapses to : (time to deintegrate unknown / time to integrate reference) * reference voltage

Strange tha agilent don't use the motorola 68000 family cpus I have seen use them in almost every device of the 90's
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16651
  • Country: us
  • DavidH
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #16 on: April 07, 2014, 09:51:47 pm »
It certainly has the horsepower.  A 6502 could handle it although I would not use anything with lower performance or less integration than a PIC or AVR.  Conversion times are slow if only because of the need for high 50/60 Hz common mode rejection so processor throughput is not a limitation.
Agilent uses 80188 or 80196 16 bit racers... an 8 bitter can't cope with everything that goes on in the multislope. even the 196 needs assistance of an ASIC implementing the charge balance timers. pic or avr are totally off. it's 2014. let's use a cortex M3 or M4 (hardware floating point) instead of backwards or obsolete cpu's.

I know that is not the case having worked with much older multislope designs which used the 8080.  The move toward more processing and less dedicated hardware is economic and functional.  I do not expect the processor to handle the state machine details.  Most modern designs I have seen have moved to using some type of programmable logic for this anyway.

Quote
Quote
Or voltage to frequency conversion,
not good enough for 6 1/2 and more.

There are certainly better ways.  There are a number of voltage to frequency conversion methods though.

Quote
Quote
or charge balancing (a specific case of voltage to frequency conversion),
this is the way to go. charge balance is not a voltage-frequency conversion. it is voltage time

Maybe we are thinking of different things because the charge balancing converters I am familiar with present their output as a frequency to be measured.

Quote
Quote
or delta-sigma, or single slope integration (no 50/60 Hz common mode rejection though).  My personal favorite is charge balancing but instrumentation delta-sigma converters have come a long ways.  Their integral nonlinearity just makes it to 6.5 digits.  Single slope integration can get you to 9.5 digits of linearity but the lack of 50/60 Hz common mode rejection makes them impractical except for very special applications.

all to impractical and cumbersome in designing the system. you'd end up with the solartron misery where you need unobtainium hand selected parts.

I agree that it would be impracticable and just listed it to be thorough.  Did Solartron use single slope conversion?  I have only seen it used in embedded designs where the lack of inherent common mode rejection was not an issue.

Quote
the Agilent technique is best. all errors are self cancelling at calibration. there is not a single adjustment in the system. as long as you have a long term stable reference voltage and a stable master oscillator (10MHz) you go. everything else is allowed to drift. including your integrating capacitor.

the system equation collapses to : (time to deintegrate unknown / time to integrate reference) * reference voltage

The limitation I always found was the dielectric absorption in the integration capacitor and now good capacitors have become more difficult to find.  Do you know what kind of capacitor Agilent uses?

For a simple 6.5 digit design I would go with one of the many instrumentation delta-sigma converters made now.  They are inexpensive and easy to use compared to doing a custom converter design of equivalent or better performance.  Handing the other aspects of a 6.5 digit design would be difficult enough.

I would enjoy the challenge of a charge balancing design of similar or better performance.  Isn't this what Keithley uses?

 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16651
  • Country: us
  • DavidH
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #17 on: April 07, 2014, 10:10:08 pm »
The arduino adc is very very bad.
This summer I "charterized" them using a data precision 8200 voltage reference. What I figured out is that arduino adc  is only good in high voltage above 1.5V and under it really go crazy.
So I suggest using a external ADC.
Best regards, Alberto.

PS If I found I'll post the graph of the reading voltage using the arduino adc andt the set voltage.

Converters integrated into microcontrollers are practically universally bad.  With sampling converters in general I usually conservatively assume that one bit is lost do to noise but with integrated ones, I assumed 2 bits or more are lost.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7801
  • Country: de
  • A qualified hobbyist ;)
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #18 on: April 07, 2014, 10:19:50 pm »
The arduino adc is very very bad.
This summer I "charterized" them using a data precision 8200 voltage reference. What I figured out is that arduino adc  is only good in high voltage above 1.5V and under it really go crazy.
So I suggest using a external ADC.

If the Arduino team would have followed Atmel's recommendations for the ADC it wouldn't be so bad.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16651
  • Country: us
  • DavidH
Re: Making 6.5 digit DMM with Arduino & LM399H
« Reply #19 on: April 07, 2014, 10:42:48 pm »
The arduino adc is very very bad.
This summer I "charterized" them using a data precision 8200 voltage reference. What I figured out is that arduino adc  is only good in high voltage above 1.5V and under it really go crazy.
So I suggest using a external ADC.

If the Arduino team would have followed Atmel's recommendations for the ADC it wouldn't be so bad.

It is pretty easy to make the performance worse.  The specifications are usually based on a best case reference implementation that is questionably practical in most designs.

My solution in the past has been either to use low impedance single point analog signal grounding in an attempt to keep the digital noise out of the ADC or to drive the ADC input with a current and shunt resistance at the microcontroller so any ground noise becomes common mode and isolated from the analog source.  The later method works particularly well in single ended audio connections which suffer from common mode power supply noise.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf