Author Topic: Precise voltage reading  (Read 5612 times)

0 Members and 1 Guest are viewing this topic.

Offline joegtpTopic starter

  • Contributor
  • Posts: 30
Precise voltage reading
« on: February 01, 2011, 03:53:45 am »
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.
 

Offline tyblu

  • Frequent Contributor
  • **
  • Posts: 287
  • Country: 00
    • blog.tyblu.ca
Re: Precise voltage reading
« Reply #1 on: February 01, 2011, 04:02:26 am »
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...
Tyler Lucas, electronics hobbyist
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38863
  • Country: au
    • EEVblog
Re: Precise voltage reading
« Reply #2 on: February 01, 2011, 04:44:42 am »
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.

No, that's called resolution, not accuracy. The two are not the same. Very commonly confused.

Quote
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.

No, 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.
 

Offline joegtpTopic starter

  • Contributor
  • Posts: 30
Re: Precise voltage reading
« Reply #3 on: February 01, 2011, 02:41:28 pm »
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.
 

Offline allanw

  • Frequent Contributor
  • **
  • Posts: 343
    • Electronoblog
Re: Precise voltage reading
« Reply #4 on: February 03, 2011, 03:04:33 am »
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.
 

Offline slburris

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: us
Re: Precise voltage reading
« Reply #5 on: February 03, 2011, 03:59:53 am »
I was thinking of using the 5V zener to protect my ADCs from unwanted high voltages.

Don't do that, use two schottky diodes to clamp to Gnd and AVcc (assuming
the diodes you pick don't have too much reverse leakage to affect what you
are trying to measure).  Zeners don't have a very sharp knee in their breakdown
region, so they really aren't good for this.

You could also use normal small signal diodes to clamp, but make sure their
forward voltage drop is such that out of range voltages don't exceed the
absolute maximum ratings of the ATMEGA328.

Don't connect Vcc and AVcc directly, at the very least you should put it
through a ferrite bead or something to try to keep the digital noise out
of the analog supply.  Personally, I would use a second voltage regulator
dedicated 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 with
either 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
 

Offline DrGeoff

  • Frequent Contributor
  • **
  • Posts: 794
  • Country: au
    • AXT Systems
Re: Precise voltage reading
« Reply #6 on: February 03, 2011, 06:28:25 am »
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

Was it really supposed to do that?
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10318
  • Country: nz
Re: Precise voltage reading
« Reply #7 on: February 03, 2011, 06:52:23 am »
The adc build inside most mcus isnt really designed for the kind of resolution you want for a voltmeter
Even 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.
« Last Edit: February 03, 2011, 07:21:04 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Precise voltage reading
« Reply #8 on: February 03, 2011, 11:58:49 am »
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.

One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf