Which A/D converter for measuring 10V with five significant digits ? - Page 1
Forum section: electronics / projects

author: Mike Jung
author_rank: Contributor
timestamp: May 08, 2023, 02:16:25 pm
content: I want to build an accurate voltmeter for 15V dc using an a/d converter and an Arduino. Which adc would be suitable ?

author: wasedadoc
author_rank: Super Contributor
timestamp: May 08, 2023, 02:48:06 pm
content: 14 bits is 16384. That would appear to be the minimum you need for 0 to 15 Volts to 5 figures. But if you only need to measure a smaller range around 10 or 15 (you have written both) you might consider subtracting a stable fixed voltage and use a lesser ADC to measure the difference.Do not overlook the issue of calibrating whatever you build.

author: pqass
author_rank: Super Contributor
timestamp: May 08, 2023, 03:11:02 pm
content: Look into this design:

author: bdunham7
author_rank: Super Contributor
timestamp: May 08, 2023, 03:13:41 pm
content: You need to further specify what you need the input impedance of the voltmeter to be and how fast you need it to sample. You'll also need either a resistive voltage divider or an active input buffer of some sort to scale your 15V down to whatever the ADCs full-scale range is. 5-digit meters have quite a range of accuracy specs, maybe 30ppm to 500ppm. Do you have an idea where you need to be?

author: Faranight
author_rank: Unknown
timestamp: May 08, 2023, 03:24:03 pm
content: Yep, I was just about to say this too. The ADC's are normally made for a given impedance - I've mostly worked with the AVR's built-in ADC's that require a maximum source impedance of 10kohm. External ADC's without a PGA will also likely require extra signal conditioning. Get an ADC with a built-in PGA and use it over a given resistor divider network or build an active buffer in-between the ADC and the resistor divider network - be sure to pick an opamp that has sufficient bandwidth, if you're going to be measuring fast signals.EDIT: Also, stable voltage reference!

author: Kleinstein
author_rank: Super Contributor
timestamp: May 08, 2023, 03:48:56 pm
content: Most ADC chips are made for a smaller input voltage range, like 3 V or +-2.5 V. So one would normally use a divider at the input. There is a very limited number of ADCs that include such a divider at the input, but these would still need a buffer amplifier for the input.A relatively high resistance divider directly at the input can also provide a certain degree of protection.At the low end one might get away with a stable divider, maybe a buffer amplifier and a MCP3421 or similar ADC chip. Ideally one would also need good reference chip, as the internal one included with some of the ADCs may not fully be up to the task. There are quite a lot of sigma delta ADC chips with some 18-24 bits resolution that can be used. The availabilty may still be an issue and some come in rather small cases that not everyone likes to solder.Open points are still the need for speed, accuracy and input resistance (e.g. is a 1 Mohm divider good enough ?). It can also make a difference if only positive voltages are to be measured.

author: Mike Jung
author_rank: Contributor
timestamp: May 08, 2023, 05:15:25 pm
content: Quote from: bdunham7 on May 08, 2023, 03:13:41 pmInput impedance is not an issue - couple of kohms or better and I'll use a resistive divider. I need to measure a bit under 15V withfive significant digits. Would that be 10ppm ?

author: bdunham7
author_rank: Super Contributor
timestamp: May 08, 2023, 05:30:00 pm
content: Quote from: Mike Jung on May 08, 2023, 05:15:25 pmI guarantee you that input impedancewillbe an issue if you use a resistive divider unless you use something with very low (pA) input current.Significant digits and ppm really don't correlate all that well, in part because you have to decide how many counts of error are acceptable. Zero sounds like a good answer but that is pretty much not attainable. You really need to define those requirements yourself unless someone has assigned you the task and only stated "5 digits". And for measuring 15 volts, it isn't clear whether that means 15.0000 or 15.000. For the former, 10ppm specified accuracy would be pretty ambitious since the most accurate 5.5 digit DMM I'm aware of (Fluke 8842A) would have a specified 47ppm total tolerance at 15 volts. For the latter, 10ppm is impossible.

author: Faranight
author_rank: Unknown
timestamp: May 08, 2023, 08:28:22 pm
content: Yep, I was just about to say this too. If you use a resistor divider, you have to take into account the impedance of this divider, not just the source.That is unless your source has such low impedance that you can use the divider in range like up to 10kohm or whatever the ADC requires.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: May 08, 2023, 09:33:19 pm
content: For 5 1/2 digits I had to use ADS1263 (32 bit), as the ADS1220 (24 bit) did not cut it. If you expect a solid last digit, as I assume, the last digit it can not be on a one on one relation with the LSB of your ADC.Take a look at the noise histogram of the ADC data sheets, and search for effective number of bits. The 24 bit ADC ENOB barely goes over 20, 32 bit just crosses into 24 ENOB. Also depends on the samples per second speed.Then you'll need an analog frontend, also adds noise and offset and drift. All of the above made me use the ADS1263. At 5 1/2 display, in the +/-150mV range when I short the inputs I'm getting a solid zero read, here and there some blinks into +/-1, that is 1uV. It was a lot of work to achieve it.

author: newbrain
author_rank: Super Contributor
timestamp: May 08, 2023, 10:36:55 pm
content: Quote from: pqass on May 08, 2023, 03:11:02 pmAargh!Not really my field, but going for a quick sampling, I would never even consider it."Calibration".6 digits of pure fantasy and systematic errors (he'd be better offwithoutzero calibration).If it shows 3 usable digits it's a miracle.

author: David Hess
author_rank: Super Contributor
timestamp: May 08, 2023, 10:39:13 pm
content: 5 significant digits is 16.6 bits and 10 parts per million. None of the 18-bit converters I checked are linear enough but the 20-bit LTC2420, and its 24-bit big brothers, are.Beyond that the reference selection is stringent. I would consider something like a LTC6655-4.096 for low noise and low drift.

author: pqass
author_rank: Super Contributor
timestamp: May 09, 2023, 12:28:07 am
content: Quote from: newbrain on May 08, 2023, 10:36:55 pmWhy couldn't you expect to get 6 digits? The circuit revolves around two main parts: a 24bit ADC and reference. It's not like Louis is rolling his own multi-slope ADC. It won't replace a bench meter since it only has a simple 10:1 divider and buffer as a front-end. But the series explains the component choices and their tradeoffs which is what OP needs to understand. See attached for the final iteration of the circuit (in part5 of the series).If you want a more refined implementation see:https://www.barbouri.com/2016/05/26/millivolt-meter/

author: Kleinstein
author_rank: Super Contributor
timestamp: May 09, 2023, 06:46:29 am
content: It is quite normal for a voltmeter to have more display resolution than accuracy. Typical 6 digit DMMs seem to claim 35 ppm of accuracy on there best range. The resolution is more linked to the noise, commonly wanting an RMS noise of less than 1 count, though a stable last digit would call for 1/3 of this. However at 5 digits the oise part is not really the difficult part, unless one wants high speed. The part that can be a bit difficult is the stability (drift) and linearity - depending on the requirements here. For a 5 digit meter this would normally be more in the 100-200 ppm range.It is still a good idea to have an ADC that has better resolution than the display. This is so that a numerical scale factor for the calibration does not add additional rounding errors. So a 18 bit ADC is indeed a bit on the low end.Quote from: pqass on May 09, 2023, 12:28:07 amThat simple voltmeter circuit in the later version could give noise OK for 6 digits, but the accuracy is a bit limited - well less than a more typical 6 digit meter.The simple circuit with divider and cheap 24 bit ADC may however be suitable for 5 digits as asked at the start. There are also a few slightly cheaper ADC versions.

author: newbrain
author_rank: Super Contributor
timestamp: May 09, 2023, 06:57:09 am
content: Quote from: pqass on May 09, 2023, 12:28:07 amAnd were that true, it could probably be OK.I'll gloss over the use of tantalum (why?, but OKish) and the reasoning about only having a 0.1 µF capacitor on the reference for "speed" reasons, when the ADC input has 1 µF.Note that the Ref input of the LTC2400 has a 15 pF sampling capacitance, this also affects the precision.The thing that immediately jumped to my eyes is the input buffer: OP777, though a nice op-amp, is not even a R2R one, its guaranteed minimum output voltage is 140 mV with a 1 mA load.Now the load in this circuit is quite lower (a 10 kΩ resistor), but still, with the input at 0 V, you can expect some mV on the output.And, in fact, that's exactly what happens.The stroke of genius is the "calibration": it simply nulls away the op-amp output!This means that the instrument will be totally insensitive to low voltages, and even worse, the input range from the op-amp minimum output to the max will be displayed as 0-max.6 digits indeed.This before even considering the op-amp offest and the PCB placement of the ref, op-amp and ADC.The improved version at least uses a R2R, low offset op-amp, which mitigates the issue.

author: iMo
author_rank: Super Contributor
timestamp: May 09, 2023, 08:34:56 am
content: My first questions would be:1. do you want to measure the voltage just around the 10V only?2. is the speed of the measurement important to you?A:1. yes - then the ADC linearity is not so extremely important2. no - you may use averaging and you may get 5 sig digits with a 12bit ADC too..

author: pqass
author_rank: Super Contributor
timestamp: May 09, 2023, 08:47:53 am
content: Any opamp will have some [even tiny] offset.Yes, his "calibration" method is naive in that it's not being adjusted against a traceable standard.What it lacks is the "gain" factor to solve for y = mx + b ie. displayed output = gain * raw ADC value + offsetThe software just needs to be told when a short is attached and then when a voltage standard is attached (and be told its value as written on the documentation). This is not a hardware issue.The ADC has more (10x better) than enough bits to cover 6 digits (1ppm) of precision.So 0V at the terminals may be 140mV at the ADC input and read as 253 but will be displayed as 0uV.And 10V at the terminals may be 1.140mV at the ADC input and read as 10123123 but will be displayed as 10.000 00V.

author: newbrain
author_rank: Super Contributor
timestamp: May 09, 2023, 11:57:14 am
content: Quote from: pqass on May 09, 2023, 08:47:53 amAy, there's the rub.I'll try to make myself clearer, it seems I was not able to convey my point.I'll use a 10:1 input divider, and 15 mV op-amp minimum output - this last value is much less than the worst case, but let's go with this.0 V will be displayed as 0 V - the initial, 15 mV offset has been "calibrated" away.5 V will be displayed as 5 V - the reading has been matched to a known good referenceAll is fine and dandy, isn't it? Well...Let's see what happens for 149.999 mV at the input, i.e. 14.9999 mV at the op-amp + pin, with 15 mV as initial offset).The op-amp out will still be 15 mV: that's the minimum it can output - remember we are not (yet) talking about the offset of the op-amp.So the input range 0 - 150 mV will be displayed as 0 (remember, we have a 10:1 divider!), nice large dead range thereAs our 0 point is 150 mV, and our 5 V point is 5 V the line equation has m = (5-0)/(5 - 0.150) ≈ 1.031, and b ≈ - 0.155.Let's see what happens for, say, a 2 V input.Now the op-amp is happily working in its foreseen range, so its output is a nice and round 200 mV (let's disregard the op-amp offset...).Vdisplay ≈ 2 × 1.031 - 0.155 = 1.907Conversely for a 15 V input:Vdisplay ≈ 15 × 1.031 - 0.155 = 15.31I stand corrected, it's not even 3 digits!The so called "calibration" has absolutely worsened the characteristics. Good thinking.It would have been better to just calibrate the 5 V point, at least the range 150 mV - max would have been (more) correct.The solution is not difficult, just provide a small negative supply to the op-amp. Then start to wonder about its offset...Honestly, given this basic system flaw having guard traces and removing the soldermask in the improved version looks really like lipstick on pig, and cargo cult design.EtA: The FW does not take into account that the LTC2400 can measure also a 0.125 × Vref interval fornegativeinput voltage. The sign is simply thrown away when reading the bit stream. So, even if we had an ideal op-amp, the noise will be rectified and averaged to a positive offset.Shoddy FW for shoddy HW.

author: Mike Jung
author_rank: Contributor
timestamp: May 09, 2023, 04:47:32 pm
content: Quote from: Faranight on May 08, 2023, 08:28:22 pmThe source is a 400Ah battery....

author: Mike Jung
author_rank: Contributor
timestamp: May 09, 2023, 04:54:48 pm
content: Quote from: iMo on May 09, 2023, 08:34:56 amYes, on both.

author: David Hess
author_rank: Super Contributor
timestamp: May 09, 2023, 05:03:57 pm
content: Quote from: pqass on May 09, 2023, 08:47:53 amSo does the ADC.QuoteI would not rely on good linearity of the operational amplifier when its output is close to saturation, with "good" in this case being pretty stringent because of the 10ppm requirements.Besides having a negative supply for the operational amplifier, the ADCs being discussed have differential input versions which would allow the ADC input to be deliberately offset above common so that a single supply operational amplifier can provide zero and negative values to the converter.

author: tooki
author_rank: Super Contributor
timestamp: May 09, 2023, 05:22:56 pm
content: Quote from: Mike Jung on May 08, 2023, 02:16:25 pmHave you considered the ICs made specifically for this purpose? TI calls them “digital power monitors”. I have used the INA226, which is supported by several Arduino libraries. It gives 1.25mV resolution on an input range of 0-36V.I’ve never used it, but the INA228 (I2C) (and INA229 (SPI)) gives about 200 μV resolution across an input range of 0-85V! In itsslowestmode, it takes 250 readings per second. In the fastest, 20,000 per second. (The INA226 is about half as fast.)Both of them also measure current, the range being determined by the value of shunt resistor.

author: Mike Jung
author_rank: Contributor
timestamp: May 09, 2023, 06:55:52 pm
content: Quote from: tooki on May 09, 2023, 05:22:56 pmNope, didn't know they exist.That's why this forum is great ! Thank you, I'll look into those, then. In my case speed is of no concern. I need to be sure of the last millivolt out of five digits - that's all.

author: Siwastaja
author_rank: Super Contributor
timestamp: May 09, 2023, 06:58:43 pm
content: Quote from: Mike Jung on May 09, 2023, 06:55:52 pmYou realize how demanding this specification is? It's not impossible, but very challenging and expensive to meet. What are you actually doing, if I may ask?

author: bdunham7
author_rank: Super Contributor
timestamp: May 09, 2023, 07:55:42 pm
content: Quote from: Mike Jung on May 09, 2023, 06:55:52 pmSo you need 15.000 with an error less than 1 count. That's not 10ppm, which is good since 10ppm would be hard. It also isn't trivial, but not impossible either--I can dial in 15.0000V on a calibrator and at least two meters on my bench will read it with errors of less than 20% of your goal. However, these meters have some features that allow them to acheive that and you'll need them to have any hope of succeeding. Some of them are:An integration time that is a multiple of the mains power period which is either 1/50 or 1/60 of a second. It doesn't matter if your device uses mains or not, the field from mains is omnipresent.A reasonably high impedance low tempco or tempco-matched resistive divider and low-current input circuitry. You probably don't need special laser-trimmed or monolithic solutions, just two low-tempco resistors to give you a divider that gets your 15V input down to something near the full-scale input of your ADC. And if your ADC doesn't have a very low input current, a low input current voltage follower. Or something along those lines.A low-tempco voltage reference.A means of dealing with any zero offsets. If they are stable, then they can be calibrated out in your software.A means of calibrating the whole thing when you are done. A good 6.5-digit DMM should be sufficient.If this is a one-off and you aren't too price sensitive, the MAX132 might be one of the simpler solutions for you.https://www.mouser.com/datasheet/2/609/MAX132-3126177.pdf

author: Mike Jung
author_rank: Contributor
timestamp: May 09, 2023, 08:44:19 pm
content: Quote from: Siwastaja on May 09, 2023, 06:58:43 pmNo, I do not. My experience and actual knowledge in electronics was gathered through the construction of many, many amplifiers. And a couple of superhet receivers, both valve and solid state. What I am trying to do is the repeat an experiment related to an effect related to charging and discharging lead acid batteries. I thought this might be achievable with present day components given that I am not trying to make a multimeter, only a voltmeter. I might've been wrong....

author: Mike Jung
author_rank: Contributor
timestamp: May 09, 2023, 08:50:25 pm
content: Thank you - I'll keep all those in mind and I'll keep asking questions as I go. The MAX132 is OK price wise. Could you recommend a suitable voltage reference ?

author: tooki
author_rank: Super Contributor
timestamp: May 09, 2023, 08:54:56 pm
content: Quote from: Mike Jung on May 09, 2023, 06:55:52 pmIfalmost1mV is sufficient (1.25mV) then the INA226 is really popular, lots of modules and libraries around. It does look like someone has made a library for the INA228, which will easily meet your needs.With that said, as a school assignment (to write a basic library for some I2C component) I chose the INA226 since I had one laying around, and it wasn’t that hard to DIY.FYI, even if you don’t need the speed, what it gains you is the ability to average or filter lots of measurements to achieve lower effective noise.These chips need almost no support circuitry whatsoever, a big advantage over an ADC.For what it’s worth, in my testing a while back, voltage measurements with the INA226 agreed to within 3 counts of my 6.5 digit bench multimeter, which I consider to be an excellent result for a $4 part. See this thread I made about it at the time:https://www.eevblog.com/forum/projects/ode-to-the-ina226-voltagecurrent-sensor/Just one thing to keep in mind: the INA sensors can only measure positive voltages. DO NOT attempt to measure negative voltages, as this will fry them. They can, however, measure positive and negativecurrent, so you can measure current going into and out of a battery, for example.

author: bdunham7
author_rank: Super Contributor
timestamp: May 09, 2023, 09:02:24 pm
content: Quote from: Mike Jung on May 09, 2023, 08:50:25 pmYou'll have to read the MAX132 datasheet to figure out exactly what you want as the reference voltage selection is not particularly straightforward. Perhaps something like the previously mentioned LTC6655 or MAX6341 perhaps, along with two selected low-tempco resistors and either no trimmer or a very small one will work if you calibrate in software.

author: Siwastaja
author_rank: Super Contributor
timestamp: May 10, 2023, 07:59:52 am
content: Quote from: tooki on May 09, 2023, 08:54:56 pmWith 0.1% gain error as specified, error is already 36mV, over an order of magnitude worse than what OP seems to want. One could try to calibrate this against a known good reference or multimeter, but I would rather start with a better reference / ADC. Popularity of the part is secondary; most ADCs are simple enough to interface with.