Getting the magnitude of the voltage of a battery

Thread Starter

Skynt

Joined Nov 27, 2010
3
I want to create a circuit using some op-amps (LM324CN is what I have), resistors and capacitors that takes the absolute value of some DC power source and can output to some analog comparator. However, after looking up some schematics online, I haven't been able to design one that works with my parts. Could anyone offer some design help / advice? I'm an engineering student with a limited knowledge of electronics.
 

SgtWookie

Joined Jul 17, 2007
22,230
Hello Skynt,

Well, you are going to need a fixed voltage reference, and you will also need a voltage divider to get the battery voltage into the common mode range of the opamps' inputs.

For a fixed voltage reference, you can consider using a Zener diode in series with a resistor. The anode goes towards the more negative voltage. You want at least a couple of mA current through the Zener, but not more than 20mA. Size your current limiting resistor appropriately.

Then you need the voltage divider from the battery positive terminal to ground. The LM324s' range includes the negative rail (in this case, ground) and the upper limit is about +V/Vcc - 1.5v. You want to size the resistor values so that you will have between approximately 100uA/0.1mA and 2mA current flow through the divider; much lower than 100uA, and noise starts to become a factor; much above 2mA and you are using an excessive amount of power.

But you have not said what the voltage of the battery is, or how you are going to power the LM324, or what you are planning on doing with the output.
 

Thread Starter

Skynt

Joined Nov 27, 2010
3
The range of the battery size would be at maximum 20V. Right now I'm trying to feed this circuit into a differential comparator (LM339).
 

SgtWookie

Joined Jul 17, 2007
22,230
OK then, so lets' say you use a 5.1v Zener diode with a resistor to supply current for a voltage reference.

Are you familiar with Ohm's Law?

Calculate how many Ohms of resistance you will need to have in series with a 5.1v Zener across your 20v maximum supply, in order to have 5mA current.

Then you need to decide at what voltage you want the comparator to change states, indicating that the battery voltage is above or below the threshold.

Something about common comparator families; the LM339, LM393, LM111, LM2903 all have open-collector outputs; this means that they can sink current, but cannot source current. You need to have a resistor between the output and a more positive voltage in order to show a change in voltage on the output of the comparator.

The LM339, LM393 and LM2903 only have a 6mA guaranteed sink current; the LM111 is much higher at up to 50mA.

In order to ensure that the output of an LM339 can go low enough to signal a logic low level without a doubt, you should stay below 5mA. So:
Calculate what is the minimum value of resistance you need to limit current from a 20v source to 5mA?
 
Top