# Measuring voltage window with ADC

I'm working on my own SLA charger that has MCU onboard, can regulate switching DC/DC converter to charge 12V battery in 3 stages and can do temperature correction.

Everything is fine except that I want to improve on battery voltage measurement.

Currently, I use simple voltage divider to reduce battery voltage range into MCU's ADC range of 0-1.8V. The thing is I don't care of battery voltage (let's say) less than 10V because that is a bad battery and I don't want to charge it at all. I would like to map 10-16V into 0-1.8V instead of 0-16V into 0-1.8V so ADC measurement could be done more precise:

What can be used to archive such mapping (price does not matter)?

A simple but crude method would be to subtract 10V from the measured signal using a zener diode: -

So, if Vin is 16V, Vout will be 6V if the zener diode voltage is 10V. If instead of a single 10k resistor you used a potential divider, the 6V can be "tapped" to give 1.8 volts.

In case you've never used a zener, they have a defined reverse breakdown voltage like this: -

The part of the curve to the right is the "normal" forward conduction operation of any diode - just think about the left hand side.

You can also use a more accurate op-amp subtractor: -

Just set a 10V steady voltage at V1 (maybe with a voltage reference) and the output will be R2/R1 *(V2-10V). You can also "ratio" R2 and R1 to give you the required voltage range of 0V to 1.8 volts. Use a rail-to-rail op-amp for this but be aware that the bottom 20 mV to 50 mV range of the op-amp's output will fixed because although a rail-to-rail device is good it aint that good!

• What exactly is "crude" here? Is it because Vz can never be precisely 10V (or any other value) due to it being a semiconductor? Dec 21, 2015 at 12:50
• @Sergii temperature drift of the zener, zener tolerance etc.. Dec 21, 2015 at 12:50
• I think 20-50mV of low and up range values are not important as they exceed battery charge voltage range anyway, the working range will be narrower than 10-16 possible range. What I'm worrying is the 10V reference voltage. My system only has 3.3V (fixed) and charge voltage (that is variable). Dec 21, 2015 at 12:56
• You can also split R1 into 2 resistors for the simplest way to achieve the voltage scaling ( 6V down to 1.8V) at the same time.
– user16324
Dec 21, 2015 at 13:35
• Thanx, Brian. I'll try now to recalculate to use 3.3V as a base. Dec 21, 2015 at 16:44