[Solved] How to measure voltage.

Hello everyone!

I'm wondering what my options are to track voltage of a 24volt battery of a cordless drill..
ADC accepts up to 5v on input.
So one option is to make a resistive divider.
Is a programmable gain amplifier (with 'negative' gain) an option?

Are there perhaps better alternatives?

Thanks!

AlfaOmega:
..... make a resistive divider.

Better meaning what exactly?

You can use high value resistors and a capacitor to reduce the battery drain, so 1M and 4M7
divider with 100nF (film) cap across the lower (1M) resistor. This has a limited bandwidth
response, but that's not a problem with a slowly varying voltage from a battery.

The capacitor is needed to provide a suitably low-impedance source into the ADC and its multiplexer,
while allowing only a few uA of current to flow through the divider.

A plastic film cap, not a ceramic is advised, since they have much lower leakage currents (which
matters in such a divider)

Is a programmable gain amplifier (with 'negative' gain) an option?

Only if you have access to a power supply with about 30V output and your op-amps can stand it.

Surely you only need +/-5V supplies with the opamp, using a summing junction at virtual ground?
Output is negative of course so you'd invert that with another opamp....

It's just a battery of a cordless drill is in question here.. There is no issue of frequency response and a resistor divider is a perfectly adequate for the purpose.

However I have some time on my hands and I want to try new things. Hence I've mentioned the programmable gain amplifier (never had a reason tu use one before), a fuel gauge/coulomb meter can also be an interesting thing to try here, but again there is an issue of battery voltage (24v).

So basically I'm looking for guidance or suggestions on possible interesting things to experiment with :))

2016-03-28 18-04-50.629.jpg

AlfaOmega:
So basically I'm looking for guidance or suggestions on possible interesting things to experiment with :))

Voltage, current, power, 12-bit.
Coulomb counter?
Leo..

I inserted a zener above the potential divider. For example [about] 20Volts, and then divide by about 2.
Pick values to at least contain the range from almost empty battery (?20) to at least the fullest during charge (?28?)

By comparison to an /6 resistive potential divider, you get more steps within the rather limited 10 bit ad range, and by comparison to op amps you've decreased component count and got rid of extra power supplies.

The downside is that zeners might be 19V or not exactly as-advertised, so you do need to calibrate and a polynomial calibration subroutine is recommended to get to 1 bit accuracy.

And zeners are not perfect, the graph doesn't suddenly bent at exactly 20V or whatever the rating is, its
a non-linear device. This can be compensated for, ignored, or a constant current source could be used to
stabilize the zener voltage!

Well, Coulomb counter it is then.
Plus will get a programmable gain amplifier for good measure, just to see what it does :smiley:

Thank you guys!!

Advanced hackers can remove the 0.1 ohm current sense resistor and replace it with their own to change the range (say a 0.01 ohm to measure up 32 Amps with a resolution of 8mA)

Precision Resistors