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.
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:
It takes a wide range of input voltage (4.5v to 23v) and can deliver a stable output voltage between 1v and 17v.
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:
- 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.
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.
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!
Now, the only thing left is to hook up a cool battery powered circuit. How about a WiFi temperature + humidity sensor?
I’ll talk about these in another post – thanks for reading!