Making 6.5 digit DMM with Arduino & LM399H - Page 1
Forum section: electronics / beginners

author: DROBNJAK
author_rank: Contributor
timestamp: April 07, 2014, 02:30:07 pm
content: 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?

author: theatrus
author_rank: Frequent Contributor
timestamp: April 07, 2014, 02:43:21 pm
content: 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).

author: linux-works
author_rank: Super Contributor
timestamp: April 07, 2014, 02:45:00 pm
content: 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.

author: TiN
author_rank: Super Contributor
timestamp: April 07, 2014, 02:52:52 pm
content: 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 thatOf 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$.

author: grumpydoc
author_rank: Super Contributor
timestamp: April 07, 2014, 03:06:02 pm
content: 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?

author: David Hess
author_rank: Super Contributor
timestamp: April 07, 2014, 05:11:43 pm
content: 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.

author: dr.diesel
author_rank: Super Contributor
timestamp: April 07, 2014, 05:20:32 pm
content: 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.

author: pickle9000
author_rank: Super Contributor
timestamp: April 07, 2014, 05:30:04 pm
content: Quote from: dr.diesel on April 07, 2014, 05:20:32 pmI'd agree with that and you'd have a nice stable voltage ref. A handy thing to have kicking around.

author: linux-works
author_rank: Super Contributor
timestamp: April 07, 2014, 05:39:21 pm
content: 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 withnever found a good project for them, though.

author: David Hess
author_rank: Super Contributor
timestamp: April 07, 2014, 05:51:11 pm
content: Quote from: linux-works on April 07, 2014, 05:39:21 pmThe low frequency noise can be averaged out this way. Assuming that the drift between units is uncorrelated, that can be averaged out as well.

author: free_electron
author_rank: Super Contributor
timestamp: April 07, 2014, 06:03:30 pm
content: Quote from: DROBNJAK on April 07, 2014, 02:30:07 pmyour whole idea is off.first of all arduinothat 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/dsecond 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.

author: linux-works
author_rank: Super Contributor
timestamp: April 07, 2014, 07:15:52 pm
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: April 07, 2014, 08:04:27 pm
content: Quote from: free_electron on April 07, 2014, 06:03:30 pmIt 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.QuoteOr 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.

author: free_electron
author_rank: Super Contributor
timestamp: April 07, 2014, 08:40:05 pm
content: Quote from: David Hess on April 07, 2014, 08:04:27 pmAgilent 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.Quotenot good enough for 61/2 and moreQuotethis is the way to go. charge balance is not a voltage-frequency conversion. it is voltage timeQuoteall 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

author: vaualbus
author_rank: Frequent Contributor
timestamp: April 07, 2014, 08:51:01 pm
content: 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.

author: vaualbus
author_rank: Frequent Contributor
timestamp: April 07, 2014, 09:06:29 pm
content: Quote from: free_electron on April 07, 2014, 08:40:05 pmStrange tha agilent don't use the motorola 68000 family cpus I have seen use them in almost every device of the 90's

author: David Hess
author_rank: Super Contributor
timestamp: April 07, 2014, 09:51:47 pm
content: Quote from: free_electron on April 07, 2014, 08:40:05 pmI 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.QuoteThere are certainly better ways. There are a number of voltage to frequency conversion methods though.QuoteMaybe we are thinking of different things because the charge balancing converters I am familiar with present their output as a frequency to be measured.QuoteI 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.QuoteThe 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?

author: David Hess
author_rank: Super Contributor
timestamp: April 07, 2014, 10:10:08 pm
content: Quote from: vaualbus on April 07, 2014, 08:51:01 pmConverters 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.

author: madires
author_rank: Super Contributor
timestamp: April 07, 2014, 10:19:50 pm
content: Quote from: vaualbus on April 07, 2014, 08:51:01 pmIf the Arduino team would have followed Atmel's recommendations for the ADC it wouldn't be so bad.

author: David Hess
author_rank: Super Contributor
timestamp: April 07, 2014, 10:42:48 pm
content: Quote from: madires on April 07, 2014, 10:19:50 pmIt 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.