Precise voltage reading - Page 1
Forum section: electronics / beginners

author: joegtp
author_rank: Contributor
timestamp: February 01, 2011, 03:53:45 am
content: I'm trying to build a simple logging multimeter using an Arduino's ADCs. The ADCs are 10 bit, running at 5 volts which would give me about 0.005V accuracy. This is assuming I have exactly 5V AREF. The question is how do I get a better AREF signal? Looking at the 5V power it jumps around quite a bit (relativly) which I assume throws off the readings. Also whats the best way to protect the inputs from the stray high voltage (maybe 10V)? I was thinking a 5V zener.

author: tyblu
author_rank: Frequent Contributor
timestamp: February 01, 2011, 04:02:26 am
content: Those are some loaded questions! There are books dedicated to each... what complexity are you looking for? Maybe a few diodes for clamping.. What about the supply filtering, though? Best to figure out what noise is 'acceptable' to you. If you want less than 5V/2^10=5mV noise, you are entering realm of linear supplies with active filtering stages; good ones have <1mV; ok ones get 10mV. Not that I actually know what I'm talking about, but this is the idea...

author: EEVblog
author_rank: Unknown
timestamp: February 01, 2011, 04:44:42 am
content: Quote from: joegtp on February 01, 2011, 03:53:45 amNo, that's called resolution, not accuracy. The two are not the same. Very commonly confused.QuoteNo, zeners are hopeless voltage references.You need a proper 5V reference chip, but it needs to be powered from more than 5V.The accuracy and stability of the reference will depend upon how much you pay.Dave.

author: joegtp
author_rank: Contributor
timestamp: February 01, 2011, 02:41:28 pm
content: Thanks for the replies.Looking at DigiKey it looks like a TL1431CZT (http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=497-7665-1-ND) Voltage Ref (±0.4%) would do the trick. I'm guessing I just feed the AREF with that and use the 7805 for everything else.I was thinking of using the 5V zener to protect my ADCs from unwanted high voltages.So are there any good places to find information on how a modern auto-ranging multimeter works. For my purposes, the above should work well but I'm curious how the auto ranging, input protection, etc works.

author: allanw
author_rank: Frequent Contributor
timestamp: February 03, 2011, 03:04:33 am
content: A 5V zener will affect your readings since it'll divert noticable current away from the input pin at voltages around 4-5V. You'll need a higher voltage zener which won't provide as much protection.

author: slburris
author_rank: Frequent Contributor
timestamp: February 03, 2011, 03:59:53 am
content: Quote from: joegtp on February 01, 2011, 02:41:28 pmDon't do that, use two schottky diodes to clamp to Gnd and AVcc (assumingthe diodes you pick don't have too much reverse leakage to affect what youare trying to measure). Zeners don't have a very sharp knee in their breakdownregion, so they really aren't good for this.You could also use normal small signal diodes to clamp, but make sure theirforward voltage drop is such that out of range voltages don't exceed theabsolute maximum ratings of the ATMEGA328.Don't connect Vcc and AVcc directly, at the very least you should put itthrough a ferrite bead or something to try to keep the digital noise outof the analog supply. Personally, I would use a second voltage regulatordedicated to the AVcc pin.I tend to think of the builtin ADC on most micros as courtesy parts, i.e.it's there in case you can make use of it, but don't expect too much,like decent linearity, out of it.If you want really decent performance, you could use an external ADC witheither an SPI or I2C interface. Up to 24 bit resolution is easily available,although getting a useful 23 or 24 bits is an art form!Scott

author: DrGeoff
author_rank: Frequent Contributor
timestamp: February 03, 2011, 06:28:25 am
content: DMM's typically use a dual-slope integrating ADC rather than the SAR that your MCU will have. I'd suggest reading up on ADC techniques before expecting too much from this project.http://en.wikipedia.org/wiki/Integrating_ADC

author: Psi
author_rank: Super Contributor
timestamp: February 03, 2011, 06:52:23 am
content: The adc build inside most mcus isnt really designed for the kind of resolution you want for a voltmeterEven though it's 10bits you're probably only going to get 9 usable bits.I tried to get mcu adc channels to measure various 0-15V voltages in my carpc and came across this issue.To get an acceptable voltmeter you need more than 10bits, i'd recommend 12 or more.An external ADC does seem like the best choice here. You can get a chip with a better resolution than 10bit and have it positioned away from the noisy mcu.With it's own dedicated ground and power you should get more accuracy as well.To get around the problem of generating a 5V ref voltage when you dont have a higher voltage to genearte it from you could use a 2.5V ref voltage generated from 5V and then use a 50% voltage divider on the incoming signal.Also, if you use a voltage divider on an ADC remember to check what the min/max scale factor is going to be for your resistor tolerance.I'd recommend precision resistor networks if you want a voltage divider on each adc channel, the resistors are more likely to be the same value and they are easier to route on a pcb.Any differences between the resistors on each channel will give different readings between channels for the same voltage, which is most annoying.

author: scrat
author_rank: Frequent Contributor
timestamp: February 03, 2011, 11:58:49 am
content: With diode to Vcc protection, just make sure there is a sufficient power consumption on that supply, absorbing at least all the current that could flow through the diode. With a sufficiently large shunt supply regulator this is done by default.Oversampling will help you gain more resolution, but not accuracy (linearity, offset).One could think of a procedure to calibrate the measure, depending on what it is meant for and which references you have.