Skip to content

How-to: Undervoltage protection for li-ion batteries

in my previous post, I talked about how I got hold of a bunch of li-ion batteries, in this article I’ll describe how to create a module to protect them against under voltage.

Problem, plan of action and schematics

In order to use all these 18650 batteries I got, I bought a some of these double batteries holders, this will allow me to power up some projects.

Holder_2x18650__95376.1328665889.480.480

 

18650 li-ion batteries, when fully charged, reaches 4.20v. They are considered completely discharged at 3v. Because the voltage will change over time, I need a power regulator that will ensure I get a constant voltage available for the electronics behind, for that I’m using a cheap Chinese modulator based on the LM2596:

power

 

It takes a wide range of input voltage (4.5v to 23v) and can deliver a stable output voltage between 1v and 17v.

The problem

The two batteries, when fully charged, will output 8.4V, and fully discharged about 6V – but the power module will still be able to give me a stable output until about 4v (so two volts/battery), then the voltage will get flicky. This have two consequences:

  • The electronics powered by the battery will lack power and might get damaged
  • The batteries, at 2v, are way under their safe voltage limit (3v) and this will drastically reduce their life expectancy.

How to solve it?

I need a circuit that will measure the voltage output from the battery, and cut down the power to the module once it reaches 6v (so 3v/battery). For that I’ll be using a voltage comparator circuit, whom input will be connected to a transistor that will “cut the cord” if the battery level goes below the predefined threshold voltage.

So, here is the schematics I came up with:

liion

 

  • On the top part, you see the Chinese LM2593 power module that outputs 3.3v for my circuit (this module have a potentiometer on it’s PCB, the output voltage could easily be changed to 5v, for example)
  • On the left, there is the voltage divider circuit for the battery voltage (the three resistors in serial). Because the measured tension on the pins of the comparator cannot be more than it’s power input – 1v (I think), which would be 2.3v here, I had to divide it with a factor of 10 with the resistors, so if the battery voltage is equal to 9v, we will get 0.9v on the ‘+’ pin of the comparator.
  • The ‘-‘ pin of the comparator is wired to a potentiometer that will allow me to precisely select the threshold voltage. For 6v I will put 0.6v on the ‘-‘ pin.
  • On the output of the comparator, I wired a 2n2222a transistor that will be saturated (think closed switch) as long as the battery voltage (+ pin) is superior than the threshold voltage (- pin). I use a 220ohm resistor to get a sufficient current flow in my module. (Note: I originally had a 1.2Kohm resistor here, but the current was not enough, thank you Arouse1973 for helping me find out the culprit :)).
  • The circuit to power will be connected between the 3.3v point and the transistor. There’s a connector on the schematics.

Testing!

First, we need to make sure the idea works, so let’s get the breadboards and try it out with a LED as a powered module.

small_DSC04185.JPG
5.5V, the battery is below the 6v threshold voltage: the LED is off

 

 

small_DSC04186.JPG
6.3V, the battery is above the 6v threshold voltage: the LED is on!

Looks easy, but it took me quite some time to get it right :). Anyways, now that I know my circuit works, let’s start soldering!

Soldering!

small_IMG_0157.JPG
The first prototype, looking good!
small_IMG_0156.JPG
preparing the components for the 4 others modules, taking example on the prototype above.

 

small_IMG_0161.JPG
Weee!

small_IMG_0158.JPG

small_IMG_0160.JPG
Setting the power module output to 3.3v

 

small_IMG_0159.JPG
setting up the threshold voltage (by a factor of 10, so here I’m setting it at 6.02v)
small_IMG_0162.JPG
Neat, 5 voltage controlled battery modules!
small_IMG_0163.JPG
A bit of hot glue to stick it on one side
small_IMG_0164.JPG
Working great 🙂

Now, the only thing left is to hook up a cool battery powered circuit. How about a WiFi temperature + humidity sensor?

small_DSC04199.JPG

 

I’ll talk about these in another post – thanks for reading!

 

Published inUncategorized

5 Comments

  1. Antonio Antonio

    Great job!!!
    Thank you Benoit; i was looking for these kind of remote sensors and I found in your work all I neded

  2. Hello, for how long will the unit run for in your setup, im doing a similar setup and using deep-sleep for 30min and then measuring but noticed that the DC-DC regulator im using which looks identical to yours has a quiescent current draw of around 7-10 mA which reduces the operation time from say 370days to 21days…
    ordered some linear voltage regulators (XC6203E332PR) with a quiescent current draw of around 10uA to make it more robust in that sense,

  3. Alan Lord Alan Lord

    Thanks for the very interesting write ups. I’m playing around with some ideas for ESP8266 modules in my polytunnel to report temperature and humidity.

    I have a test system working on the bench and am now thinking about battery power… Once point I note on your design is your voltage regulator has a high quiescent current rating – that is, it draws around 10mA even when not doing anything.

    There are far better LDO voltage regulators which have a very low quiescent current < 10uA and have a fixed voltage out so do not need potentiometers etc… One of these should help greatly to improve the life of the battery between cycles.

    Just a suggestion.

    • Benoit Dumas Benoit Dumas

      Hi there,

      Very interesting – my setup did not last as long as expected and it might very well be because of the voltage regulator.
      Do you have any reference I could search for?

      Cheers,
      Benoit

      • Alan Lord Alan Lord

        Sure, the one I chose to use in the end was the MCP1700-3302E/TO. It’s quiescent current draw is a mere 1.6uA. I now have a working monitor in my Polytunnel running off a single 18650 battery. I’m hoping for many months of life between charges.

        http://uk.rs-online.com/web/p/products/403888/?cm_mmc=UK-PPC-_-google-_-3_UK_EN_M_SEMIS_Broad-_-microchip|low_dropout_voltage_regulators&mkwid=sjzGO8uuq_dc|pcrid|79440684555|pkw|%2Bmcp1700+%2B3302e+%2Bto|pmt|b|prd|&gclid=Cj0KEQjwz-i3BRDtn53Z5Z7t4PUBEiQA23q2APo7yeokN9oVWcXuNnXz9CFOoVQMyIEGpmD7sJBlWIEaAraC8P8HAQ

Leave a Reply

Your email address will not be published. Required fields are marked *