Connect with us

How can you monitor the charge of a sealed, lead acid (UPS) battery

Discussion in 'Electronic Basics' started by Jack Snodgrass, Dec 27, 2003.

Scroll to continue with content
  1. I'm building a robot that I plan on running off of 12 volt
    sealed, lead acid batteries ( UPS Batteries )

    One of my 'things to do' is to figure out how to have the
    robot recognize that the batteries are running low.

    Is there a simple circuit ( that won't consume a lot of power
    it self ) that will report the battery charge level via a
    couple of I/O pins or RS-232 signals?

    Thanks - jack
  2. The voltage of most batteries goes down as the battery is discharged. A
    simple battery monitoring circuit merely samples that voltage.

    One older method is to use a bargraph IC. These ive you output pins that
    can indicate voltage within a fairly narrow range. The IC is intended to
    connect to LEDs, which you can use for visual feedback. Pick one or two
    pins to connect to your microcontroller as "getting low" and "really
    low." Look on Google for some circuit ideas.

    If you are connecting to an MCU with an ADC, you can connect a resistor
    across the battery and load (a fairly high value to limit drain). Use
    Ohm's Law to calculate the voltage.

    Maxim and others make battery monitor ICs you might try out. Many of
    these companies will send free samples. Some of these have 1- and 2-wire
    serial interfaces. They're made for polymeer and rechargeable lithium
    cells, and are probably more sophisticated than you need for lead acid,

    A somewhat crude but workable method is to use a zener diode, which
    "folds back" if the voltage drops below a certain level (essentially,
    outputting a HIGH or LOW depending on battery level). You select the
    zener based on the minimum voltage desired from the battery, and the
    characteristics of the zener. Google should have circuit examples.

    RS-232 wouldn't be as easy, but it could be done with a PIC or AVR using
    just the analog comparator inputs. Some PICs and AVRs have serial
    UARTs, but you may need a MAX232 chip or equivalent if you need real
    RS-232 signals.

    -- Gordon
    Author: Constructing Robot Bases,
    Robot Builder's Sourcebook, Robot Builder's Bonanza
  3. John Fields

    John Fields Guest

    A 12 lead-acid battery is usually considered discharged when its
    terminal voltage falls to 10V, so this will give you a low-going output
    when that happens, and you'll only need a single polled µC I/O to read

    | |
    [51K] [10K]
    | |
    | +---[1M]---+
    | | |
    VBAT>---[10K]--+-------------+----|+\ |
    | | | >--+--->LOBAT-
    [10K] +--------| /
    | | 1/2 LM393
    | [LM4040-5.0]
    | |
    | |
    +---|+\ |
    | | >--+
    +---| /
    1/2 LM393

    With the battery charged to 14V, the worst case total current draw will

    Input divider: 700µA
    Reference: 176µA
    Feedback R: 7µA
    Pullup R: 0µA
    LM393: 2500µA
    Total 3383µA ~ 3.4mA

    With the battery at 10V,

    Input divider: 500µA
    Reference: 98µA
    Feedfack R: 5µA
    Pullup R: 1000µA
    LM393: 2500µA
    Total 4103µA ~ 4.1mA

    With two I/O's you can get a little warning before you got to 10V, and
    then another hit when you got there you could use the spare comparator
    and do this:

    | |
    [51K] [10K]
    | |
    | +---[1M]---+
    | | |
    VBAT>--+--[10K]--+-------------+----|+\ |
    | | | | >--+---> E1
    | [10K] +--------| /U1A
    | | | 1/2 LM393
    | GND |
    | |
    | | VBAT
    | | |
    | | [10k]
    | | |
    | | +---[1M]---+
    | | | |
    +--[10K]--+-------------+----|+\ |
    | | | >--+---> E2
    [R2] +--------| /U1B
    | | 1/2 LM393
    GND |

    With VBAT = 10V, the voltage on U1A+ will be +5V, and as soon as it
    drops below that (since U1A is tied to the +5V reference) E1 will go
    low, signalling that the battery is discharged.

    Before that, the voltage at E2 will have gone low at the battery voltage
    determined by when U1B+ fell to less than 5V, and that battery voltage
    can be determined by setting up the voltage divider R1R2 so that when
    VBAT is at the desired trip voltage the voltage at U1B+ will be +5.0V

    Looking at the voltage divider like this:

    VBAT E1
    | |
    [10K] [R1]
    | |
    +---5.0V = +---E2
    | |
    [R2] [R2]
    | |
    GND 0V

    The relationship between the voltages and resistances can be stated by:

    E2 = (E1R2)/(R1+R2)

    So, since we know everything but the value of R2, we can rearrange to
    solve for R2 like this:

    R2 = (E2R1)/(E1-E2)

    then plug in everything and solve for R2 with VBAT equal to whatever we
    want it to be, say 11.0V for this example:

    R2 = (5.0V*10KR)/(11.0V-5.0V) = 50000/6 = 8333 ohms

    8333 ohms is an oddball value, being bracketed by 8200 ohms on one side
    and 9100 on the other with 5% resistors and 8060 and 8250 ohms with

    If we look at the 1% band bounding the closest available 1%'er,8250
    ohms, we'll get 8167.5 ohms for the low end and 8282 ohms for the high
    end, so that means with a perfect 10K ohm for R1, a perfect reference, a
    perfect comparator, and neglecting the effect of the hysteresis resistor
    we'll get somewhere between

    E1 = E2(R1+R2)/R2 = 5.0V*(10000R+8167.5R)/8167.5R ~ 11.122V

    with R2 at its low resistance end, which is 11.0V + 1.11% and

    E1 = E2(R1+R2)/R2 = 5.0V*(10000R+8282R)/8282R ~ 11.037V

    at its high resistance end, which is 11.0V - 0.336%

    Not too shabby...

    The current drawn will be about a milliamp and a half more than the
    single comparator with both comparator outputs low, but still not too

  4. Thanks for the info.

  5. John Fields

    John Fields Guest

    You're welcome. Unfortunately, there's an error, since 8333 ohms is
    bracketed by 8250 ohms on the low end and 8450 ohms on the high end.

    Serendipitously, it turns out that 8250 is the better choice between
    the two, so all the numbers come out right!
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day