Simple digital voltage measurement IC - Page 1
Forum section: electronics / general

author: wblock
author_rank: Regular Contributor
timestamp: August 20, 2016, 09:54:04 pm
content: Is there a simple, inexpensive DC voltage-reading IC that will let me avoid having to calibrate resistor dividers and try to get my math to be accurate and linear over a range? Say, something that will read up to 20 or 24V, reasonable accuracy (hundredth of a volt?), maybe temperature compensation, and easy-to-read digital output that can just be used, like 1-wire?Is there name for this type of sensor? My searches find high-accuracy current measurement or smart battery monitors, which seems like way more than needed.

author: Vgkid
author_rank: Super Contributor
timestamp: August 20, 2016, 10:04:42 pm
content: You mean an analog to digital converter(ADC). Though with that input voltage range you will need an input divider.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: August 20, 2016, 10:08:18 pm
content: What is your desired output? A communications bus SPI,I2C etc. or a seven segment display or something else?

author: Ian.M
author_rank: Super Contributor
timestamp: August 20, 2016, 10:25:26 pm
content: I don't think so. Your spec of 24V input voltage 0.01V resolution & accuracy needs a >12bit ADC and better than 0.02% accuracy for the input divider ratio and the reference voltage. That's possible for laser trimmed hybrid modules, but it wont come cheap. 16bit ADCs, 0.02% references and 0.02% ratiometric error resistive dividers are all commonly available so you can do this with individual parts for about $25.

author: wblock
author_rank: Regular Contributor
timestamp: August 21, 2016, 02:29:37 am
content: Quote from: Vgkid on August 20, 2016, 10:04:42 pmGot one on these ESP8266 modules. But it's 3.3V of course, so must be scaled with a resistor divider. But the resistors are always different, so I have to calibrate each time.

author: wblock
author_rank: Regular Contributor
timestamp: August 21, 2016, 02:31:53 am
content: Quote from: Aodhan145 on August 20, 2016, 10:08:18 pm1-wire would be perfect, but anything there's an Arduino module for would be fine. The equivalent of an DS18S20 that reads DC voltage would be ideal.

author: wblock
author_rank: Regular Contributor
timestamp: August 21, 2016, 02:59:49 am
content: Quote from: Ian.M on August 20, 2016, 10:25:26 pmI'm just measuring battery voltage. With my hand-picked parts and calibration, I can get .01V agreement between my measurements and my Fluke over a range of a couple of volts, but it's quickly off outside of that range (nominally 12V, but charge voltage is 13+, and a motorcycle battery I tried was 16V or more (no-load). I could choose better parts and work on the math more, but it seemed like this is something that could be done easier and better by a purpose-built IC.

author: StillTrying
author_rank: Super Contributor
timestamp: August 23, 2016, 04:08:34 pm
content: Quote from: wblock on August 20, 2016, 09:54:04 pmYep. The INA226 claims typical 0.02% on Vbus up to 36V.http://www.ti.com/product/INA226

author: Zero999
author_rank: Super Contributor
timestamp: August 23, 2016, 05:11:30 pm
content: A TL431, set to 20V, before the ADC will subtract 20V from your range, giving 0 to 4V but it won't be that accurate so will need calibration.EDIT:Converting it to 0V to 4V isn't ideal because it's at the lower end of a 5V. Go for 0.5V to 4.5V because it's in the middle of the range.

author: dannyf
author_rank: Super Contributor
timestamp: August 23, 2016, 10:42:07 pm
content: What's the point of measuring a 24v battery down to 10mv?That seems very extreme.

author: Ian.M
author_rank: Super Contributor
timestamp: August 23, 2016, 11:41:16 pm
content: The INA226 in an interesting chip. At 25 deg C it will certainly meet your specification of 0.01V accuracy without calibration , but if you extend the temperature range to 0-50 deg C, you may well be off by one count, depending on how the errors stack up.It also has an absolute maximum input voltage limit of -0.3V to +40V which is problematic in a automotive application - you'd need an input protection network to clamp transients below that voltage and provide protection against -ve spikes.However its cheap enough (when you consider the mess of analog circuits it replaces) and interesting enough to make me consider it for future designs, so thank you 'StillTrying' for drawing it to my attention.

author: Zero999
author_rank: Super Contributor
timestamp: August 24, 2016, 10:56:20 am
content: I agree that measuring a 24V battery to 10mV resolution seems like overkill.If a greater degree of precision is required, resistors and voltage references can be connected in series/parallel so the errors average out. For example, the single TL431 set to 19.5V can be replaced with four TLV431, each set to 19.5/3 = 4.875V (R1 = 93k1, R2 = 97k6, assuming VREF= 1.24V) in series, giving a greater deal of accuracy, than a single IC. The TLV431 also has the advantage of working at lower currents than the TL431 (increase R3 to 22k) and will draw less current from the battery.

author: rstofer
author_rank: Super Contributor
timestamp: August 25, 2016, 05:26:05 pm
content: First of all, you don't need the entire range from 0 to 16V. You probably only need 10 to 16V.So, section 4.3 of Op Amps for Everyone will show you how to offset and scale with 4 resistors and one op amp.You don't calibrate the resistors, you have the calibration correction built into the uC code. You still need precision resistors but the absolute value isn't so terribly important.http://web.mit.edu/6.101/www/reference/op_amps_everyone.pdf