Low voltage battery detector

Discussion in 'The Projects Forum' started by Smoke_Maker, Nov 28, 2009.

  1. Smoke_Maker

    Smoke_Maker Thread Starter Active Member

    Joined:
    Sep 24, 2007
    Messages:
    126
    Location:
    Las Vegas, Nevada
    Hi everyone


    I want to build a low voltage detector for 12 volt batteries, this is for stand by equipment, generators, welders, light towers. My thinking is if the battery drops below 8 volts on startup then the battery needs to be pulled and charged then tested.

    The current draw before it detects a low voltage occurrence has to be under 1mA. When the battery dips below 8 volts a red LED will flash every 5 seconds, the detector will not reset until it is powered down and up again.

    I was going to start with these parts, a blinking LED and a voltage detector, from there I need some way to latch the LED on until it is reset by disconnecting it.

    http://elexp.com/a_data/08L36BID_08L36BGD_08L36BYD.pdf

    http://ww1.microchip.com/downloads/en/DeviceDoc/21434h.pdf

    First is there better components to use to do this project and how do I latch it on when it dose detect a low voltage.
  2. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    The Microchip part you're looking at certainly has a low current, but they don't have a version that will operate on more than 10v.

    Take a look at this: http://www.onsemi.com/pub_link/Collateral/MC34161-D.PDF
    A universal voltage monitor IC. Vcc can go up to 40v. It has a built-in voltage reference and a couple of open-collector output comparators.

    Mouser carries them in both DIP and SMT packages. Here's a DIP package version:
    http://mouser.com/ProductDetail/ON-...=sGAEpiMZZMunEhqKs81nFN1FbXHrtkNdKHqnFrwxMP8=

    Oh, and your threshold for low battery voltage is off by quite a bit.

    A charged lead-acid battery will have a voltage of about 12.7v-12.9v @ 25°C when it's fully charged, depending on chemistry.
    Once it gets down to about 12.5v, plate sulphation begins. If the plates get heavily sulphated, the battery won't hold or accept a charge.
    By the time it's down to 11.4v, it's considered completely discharged.
    If it's below 11v, it's likely that it has one or more dead cells.
  3. Smoke_Maker

    Smoke_Maker Thread Starter Active Member

    Joined:
    Sep 24, 2007
    Messages:
    126
    Location:
    Las Vegas, Nevada
    I have some 34161 I will start with them for this project, thanks. This is a starting battery and I wanted to monitor the voltage under load, when the engine is starting. These units are started weekly and the starter can be used as a load tester.

    I may up the voltage some, above 8 volts, but using a graphing oscope I see about 9 volts sometimes when the starter first kick in on some of the generators.

    The 34161 will draw about 800uA which is good, but how do I latch the out put high or low until I reset it.
  4. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    See the sample schematic on page 1?

    Instead of connecting pin 6 to an LED, connect it to pin 2 via a NC pushbutton switch.

    When the battery voltage drops below the threshold you've set using a resistive divider, pin 6 goes low, which pulls the input of the comparator low; it's then latched.

    Press the pushbutton to turn it off.

    Also, the comparator can only sink 10mA per output. Since you want to drive a bright LED that'll take 20mA or 30mA, you can use the other comparator output to pull the base of a PNP transistor (2N3906, 2N2907) low via a resistor; sinking about 3mA current. A 3.9k resistor would do fine.

    Then, connect the PNP's emitter to +12v, and a current limiting resistor to the collector. 470 Ohms should limit current thru your LED to about 26mA. Connect the anode of the LED to the current limiting resistor, cathode to ground.
  5. Smoke_Maker

    Smoke_Maker Thread Starter Active Member

    Joined:
    Sep 24, 2007
    Messages:
    126
    Location:
    Las Vegas, Nevada
    Wow, I'm impressed, I don't know how you see that but I'm going to try it tomorrow morning.

    I think what your doing is pulling pin 2 low to reset it, is that correct? I was looking at Figure 20.

    Thanks SgtWokie, more on this tomorrow, it's my bed time.
  6. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    Well, I was close - but it needed changing a bit.

    The reference doesn't get used; pin 7 is grounded. That makes both internal comparators function identically.

    The upper comparator output (pin 6) is used to ground the voltage divider coming from the battery.
    The lower comparator output (pin 5) is used to turn on the LED via the PNP transistor.

    I didn't have the MC34161 available as a model, so I threw one together out of some opamps, logic IC's and voltage sources.

    Like this:
    [​IMG]

    The trip voltage is off by just a tad, but it's right about 8v.
    I chose 120k and 22k for the voltage divider to keep the current requirements within your 1mA limit.

    Attached Files:

  7. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    I've sorta been at this for awhile. ;)

    I didn't bother looking at all the applications stuff; I saw what I needed to see on page 1 and the electrical specifications. ;)

    Took me another minute or two to figure out the logic of using the reference, though - decided you didn't need it, as by grounding the internal comparator's inverting inputs, both outputs function identically, which is what you needed.

    When the voltage on the divider R1/R2 falls below the internal 1.27v reference, both output transistors get turned on. The upper output is connected to the middle of the voltage divider via S1, a NC pushbutton. Since the divider voltage is shorted to ground, it won't rise above the 1.27 internal threshold reference, which keeps the output transistors turned on.

    Pressing S1 allows the voltage divider to jump back up, which turns off the output transistors.

    Total power consumption (with LED off) will be typically around 600uA, but not over 950uA.

    Sounds like it'll meet your requirements, right?
  8. Smoke_Maker

    Smoke_Maker Thread Starter Active Member

    Joined:
    Sep 24, 2007
    Messages:
    126
    Location:
    Las Vegas, Nevada
    I connected it several different ways and it still not what I need. I followed your schematic first and there was no LED light, then I wired it like figure 20 to make sure the detector was good. What I ended up with is in the schematic. I connected the LED to pin 5 and grounded pin 6, no change, then the LED to pin 6 and grounded pin 5.

    The way it is weird it will light the LED when the voltages to 8 volts, but grounding pin 6 dose not change the operation. If I use pin 6 the LED go's out when the voltage reaches 8 volts.

    Attached Files:

  9. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    You're showing an MC64161 in the schematic. I don't know what that is.
    Did you mean an MC34161?

    If so, your R2 is much too low; if R1 is 100k then R2 should be about 18.9k to trip near 8v. If you are testing using a 12v bench supply, you can simulate the voltage dropping to 8v by decreasing the value of R2.

    The internal comparators trip at about 1.27v, with some hysteresis. You adjust R1/R2 to match that trip voltage.
    18.9k/(100k+18.9k) = 0.159
    8v * 0.159 = 1.272v; just about the internal comparator reference voltage.
    If you want it to trip at 12v, change R2 to 11.9k. As you decrease R2, it will take less voltage on Vcc to trip it.

    Pins 5 and 6 are open collector outputs. They will be either connected to ground via the internal transistor, or floating (open).

    Connect output 6 to pins 2 & 3 using a switch. Open the switch to reset the circuit.

    You have exceeded the current rating for pin 5 by a considerable amount; it's only rated for 10mA maximum. If you are powering the circuit from 12v and your LED has a Vf of 2v, current through D1 will be > 45mA. You have likely burned up the pin 5 output, if not the LED as well.

    That is why I used a PNP transistor to source current to the LED.

    If you go back to my schematic, you can eliminate that R4 if you wish; that is simply to make sure that the PNP transistor is turned off.

    Pin 7 should be connected to ground. If it is 'floating' or connected to something else besides ground, the logic will not function correctly.
    Last edited: Nov 29, 2009
  10. Smoke_Maker

    Smoke_Maker Thread Starter Active Member

    Joined:
    Sep 24, 2007
    Messages:
    126
    Location:
    Las Vegas, Nevada
    Woops, it is a MC 34161
  11. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    OK, I made extensive additions to my post.

    You have probably fried your MC34161 due to trying to sink 45mA current.

    If you stick to the resistor values and connections I used in my schematic, you should get just what you asked for.
  12. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    Here's an update on the schematic. I've labeled the pins using terminals; P1 = pin 1, etc.

    Maybe that will make it easier?

    [​IMG]

    Attached Files:

  13. Smoke_Maker

    Smoke_Maker Thread Starter Active Member

    Joined:
    Sep 24, 2007
    Messages:
    126
    Location:
    Las Vegas, Nevada
    "Connect output 6 to pins 2 & 3 using a switch. Open the switch to reset the circuit."

    I tried your suggestion, now the led never turns off.

    Anyway, this made clear what I was trying to do, I need a latching pulse detector. When the voltage detector, detects a below 8 volt occurence for a short time I need to latch on a LED.

    So I'm going to attach a MAX 835 to the voltage detector. I will get some and let you know how it go's.

    Thanks for the help.
  14. Smoke_Maker

    Smoke_Maker Thread Starter Active Member

    Joined:
    Sep 24, 2007
    Messages:
    126
    Location:
    Las Vegas, Nevada
    I have not tried your last schematic yet, I will let you know how it works.
  15. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    OK, this should make it easier yet.

    Everything inside the pink-bordered yellow box is the IC itself.

    Pins are still labeled P1, P2, etc.

    No electrical changes; just trying to make it a bit easier to understand what's in the IC, and what you need to connect externally.

    [​IMG]

    Attached Files:

    Last edited: Nov 30, 2009
  16. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    You must have made a wiring error someplace.

    That is exactly what the circuit I posted will do.

    You will fry a MAX835.
    Those are rated for a Vcc of up to 11v. Absolute maximum is 12v. If you connect it to a charged battery, it will be exposed to 12.7v. If you start a piece of machinery that has an alternator to charge the battery, it will probably get 13.8v-14.5v and will be burnt to a crisp.
  17. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    Maybe this will make it easier:

    [​IMG]

    NC1 and NC2 are the connections for the normally-closed pushbutton switch.

    Everything labeled "VCC" is connected together to BAT+

    R2 doesn't have to be exactly 22.6k; 22k will get you very close to an 8v trip point.

    As things are wired now, any dips below 8v will cause it to latch instantly.

    If you want it to be a little less sensitive, a very small cap could be added from pin 2 to ground.

    Attached Files:

    Last edited: Nov 30, 2009
  18. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    Any progress, Richard?
  19. Smoke_Maker

    Smoke_Maker Thread Starter Active Member

    Joined:
    Sep 24, 2007
    Messages:
    126
    Location:
    Las Vegas, Nevada
    Yes, the circuit works as needed. Thanks for your help, and thank you for sticking in there with me. Sorry it took so long to get back to this, I was buried at work. Anyway I found my mistake, I was the push button switch I was using.

    The circuit draws 545uA with the Led off which is perfect and 30mA with the LED on when the battery comes back up to 13 volts.

    Now if I want to build in a little hysterias into the circuit I would drop in a diode after R1 and a .01uf cap from pin 2 to ground, am I close? and of course readjust my resistors for the trip point, I'm going to install a pot anyway and set it with a bench power supply,
  20. SgtWookie

    SgtWookie Expert

    Joined:
    Jul 17, 2007
    Messages:
    22,073
    Location:
    In the vast midwest of the USA; CST
    That's very good news. :)

    That's OK, I'm just glad you figured out where you were going wrong. I figured that it had to be some kind of wiring error. Wrong type of switch = wiring error.

    In that case, increase R4. If it is 470 Ohms, and you're using an LED that has a Vf of 2v, you really should only be getting 25mA through it when the system voltage is 14. If you are using a flashing 12v LED and no resistor, consider adding R4 back in, with a value of 100 Ohms.

    If you want to build in a little hysteria, you will need a female circuit. :eek: [rimshot] ;)
    Actually, I think you meant hysteresis. It already has a HUGE amount of hysteresis; as soon as it trips, it stays tripped.

    However, you may want it to be just a little less sensitive. You could do so by adding a small capacitor from the junction of R1/R2 to ground. You will need to tell me what length of delay that you want; say 1/10 of a second, before it trips so that I can suggest a value of capacitance to add.

    If you put a diode between R1 and the junction of R2, you will throw the resistive divider completely out of whack. Right now, there is only 56uA current going through R1/R2 when the battery is 8v, and 91uA when the battery is 13v. Even a very small amount of capacitance will delay the trip point by quite a bit.
Similar Threads
Forum Title Date
The Projects Forum Dual supply voltage from a 9V battery Jan 26, 2014
The Projects Forum How to generate +2.5 and -2.5 voltages from single +3 Volts Battery? Feb 6, 2013
The Projects Forum Voltage regulator and battery status output Oct 31, 2012
The Projects Forum How do I get a constant voltage from car battery Jun 27, 2012
The Projects Forum battery DC/DC negative voltage powering op-amps Mar 8, 2012

Share This Page