Overdischarge protection for a li-ion powered circuit


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2005
    Posts
    130

    Question Overdischarge protection for a li-ion powered circuit

    Im using a 12f675 circuit powered by a li ion battery, to protect it from over discharge I want to measure the provided voltage and if its equal or below 3v I want to flash a led.

    Li ion batteries have this behaviour:

    When they are removed from the battery charger they measure 4.2v for a couple of minutes of use.
    Then they settle around 3.7v for almost all the remaining charge, and then when they are almost depleted they fall from 3.7v to 0v. To avoid battery damage, the discharge must stop at around 3v

    any idea? I tought than using the comparator alone to measure this would not produce accurate results, but Im not sure.

    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Hi peu,


    What will stop it from being discharged?

    In other words, once you detect <= 3.0 Volt, how are you planning to cut the circuit off? Via what?
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Once the battery discharge phase is detected in the battery (equal or less than 3v supplied) I put the circuit in very low consumption and flash a led to let know the user the battery needs to be replaced.

    If a subsequent low battery level is detected, say 2.8V for example, the circuit does not operate at all via BOD or by putting it to sleep.

    I just want to let know the user that the rechargeable battery needs to be recharged or replaced


    thanks!

  4. #4
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    I could use some help, it seems simple, but I cant find a working solution

    Thanks in advance


    Pablo

  5. #5
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Did you come up with a concept schematic ?

    A diagram etc..?

    I am sure there is more then one way to do it. This forum has so many kind members each is thinking in a different way then the others; looking at the same picture and seeing a different part of it.

    I suggest that you start from somewhere and the rest will come up.


    --------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  6. #6
    Join Date
    Sep 2005
    Location
    Dayton, Ohio
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    Why not use the onboard AtoD convertors? 10-bit precision should be more than is needed.

    Are you using a voltage regulator to power the PIC? If it is relatively precise (1% ish) then you should be fine to use that as your reference voltage. Just use a voltage divider to feed the AtoD input.

    Otherwise you may need an external voltage reference. 3-pin voltage refs are cheap and plentiful. I'd guess you need around a 2.5V reference.

    Set your voltage divider so it doesn't exceed 2.5V when the battery is fully charged. Then just do the math to determine A/D value at 3.0V.

    Here's some code for 18F2525 so may need to change register names, etc. But the concept is the same. Note, I only use 8 bits to keep it simple. It's accurate enough for my app:

    battery_monitor: '
    TRISA.0 = 1 'make AN0 input
    ADCON1 = 14 'AN0 = analog in
    ADCON0.1 = 1 'start AD
    wait_ad:
    pause 1
    IF ADCON0.1 = 1 then wait_ad
    batt_v = ADRESH
    ADCON1 = 15 'return pins to digital
    TRISA.0 = 0 'output
    IF batt_v < 150 then batt_warn
    Jim Robertson
    "MilesTag" DIY Lasertag
    www.lasertagparts.com/mtdesign.htm
    Dayton, Ohio

  7. #7
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    I just did some testing for a similar circuit to see how hard we had to drive a flashing LED.

    I used a green led, gave it a trickle of 10 mA, and surprisingly enough there was little change in intensity if I drove it any longer then 20 milliseconds. The human eye is a peak detector, and the short burst is enough to let you see it, even from across the room; I could get about 30 feet away and it was still plainly visible in room ambient light.

    Milestag has a good idea, although I wouldn’t bother with a regulator between the battery and the PIC, it’s just a waste of power (which batteries don’t have much of). Drive it direct, and use a low current low voltage reference to reference the A2D. Divide down the battery voltage to put it in the range of the lower reference voltage and just measure.

  8. #8
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Good ideas, I found this ldo voltage reference: http://www.national.com/pf/LM/LM4121.html, it may do the trick.

    One more question, do I need to use 2 pins? or could I compare this voltage reference to any internal value?

    Thanks!

  9. #9
    Join Date
    Sep 2005
    Location
    Dayton, Ohio
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    It looks like you would need 2 pins. GP0 is the A/D input and GP1 is the Vref.

    But you can sometimes do multiple functions on a single pin.

    In my circuit I have one pin performing 2 functions alternately as Digital output (driving an LCD) and Analog input (read battery voltage).
    Jim Robertson
    "MilesTag" DIY Lasertag
    www.lasertagparts.com/mtdesign.htm
    Dayton, Ohio

  10. #10
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    If you have a free on board A to D, it should be pretty easy. Get a silicon diode, say a 1N4148. These have a nominal voltage drop of .7 volts. The cathode goes to ground, and the anode is connected through a high value resistor, say 100K to B+. Connect the A/D input to the junction, and measure the voltage relative to the power supply voltage. As the battery drains, the number will rise, because the .7 volts becomes a larger portion of b+. Take samples at the target voltages, and tell the processor what to do at the preset trip points. You can even use an output pin from the processor as b+, to turn the circuit on or off for even more current savings. You may have to put a small bypass cap across the junction to ground as diodes can get noisy in forward bias. I'd try it without and see how it works first.

    Ron

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Wink Voltage detection on Pics

    It is not written in the specs ...

    but the low to high voltage level change occurs for a quite precise voltage !!! ( TTL inputs ... of course).

    a 1.5 v value, i.e.

    so, a simple voltage divider is generally enough for these measurements

    ( a scope closer look with the RCTime function pin could enlight that ...)

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts