Introduction: Lithium Battery Utility Board
UPDATE: there is a new version (1.2). This article explains version 1.0.
I use lithium batteries (mostly in form of the well known 18650 cells) quite a lot. For charging them, I used to use the TP4056 boards with protection, which are available from Ebay for about $0.5/piece. Then I utilized a separate boost converter. But a while ago, I saw a nice video from GreatScott which inspired me integrate this into a single board.
You see his original video here and the associated Instructable here. His work will be referred to as the original design. I reworked the circuit and made the following changes:
- I included a Load Sharing circuitry. In the original design, it was not possible to charge the battery and output 5 V at the same time (or better it was possible, but it would damage the battery and disrupt the charging).
- I optimized the layout of the SMPS a little bit, so it is now able to output 1 A without significant voltage drop. The schematics is done to be a little bit more organized and include equations for calculating output voltage, charging current etc. Also, all the source files are available as Eagle files, which at least in my opinion is better than that EasyEDA stuff.
- I did add a few capacitors, resistors and a "Power Good" diode. Also, all diodes are using such a footprint that you can put SMD 1206 diode over it or solder two wires in there easily, so you can route the diodes to some front panel or similar.
Just for remind you what this board can do:
- charge a Li-Ion or Li-Pol battery with a current of up to 1 A (the charging includes a precharge, CC and CV stages)
- protect the battery from overvoltage, undervoltage and short circuit
- boost the voltage of the battery to 5 V (or any voltage in the range of 4,5 to 28 V)
- share the load between the battery and the charging input (that means you can charge and use the device at the same time).
All the source files are available in the last step.
Step 1: Performance
Of course, after you build such a circuit you want to know the performance. I have performed a variety of test, of which the most important is probably efficiency versus load current at different battery voltages. Another test is load regulation (that is, how constant is the output voltage at different currents). The last measurement I did was output ripple, which was about 50 mV average and 600 mV peak-to-peak during all tests.
The first two charts are attached to this step as pictures.
Note: because of resistive losses, at 1 A output and 3,0 V battery voltage the actual voltage at the protection circuit was lower than 2,9 V and the protection disabled the output. So you need to raise the battery voltage to about 3,05 or use short thick leads to have 1 A output at 3,0 V of battery voltage.
Step 2: Conclusion
I had the board professionally manufactured in China. After JLCPCB screwed me, I chose ALLPCB and I got the boards in like 8 days, thanks to the free DHL shipping. The quality was very good for the price, so I recommend them.
All of the passive components are 1206 size, so really easy to solder by hand. The smallest IC is the dual N-FET in TSSOP-8 package, but even that can be soldered by hand. Except for the ICs and passives you need just two special components:
- microUSB connector (or you can directly solder wires to the board, if you want). I used the type with 5 pins and 2 holes, for example available here.
- 22 μH inductor in 7 x 7 mm package.
The final board is 20 x 50 mm, so you can fit 10 of them on a 100 x 100 mm board. It is also just 2 mm wider than a 18650 cell. In the thickest point it is 6,23 mm.
All the files and photos are also available on my GitHub (and I recommend you download them from there, as there might be some future updates, new features and so).
If you have any questions, comments or suggestions, feel free to leave them below! Also, if you have hard time getting the components or boards manufactured, PM me. I have a bunch of the boards and components lying around, so I might be able to post them to you.
47 Comments
5 years ago
Nice!
I would really like to see you do the same for 2x batts - (8.4 - 6.4v)!
Im looking to power an arduino-rfid-HC12 package where I need the battery life two of these will provide.
Any chance you could get back to me?
Reply 5 years ago
Actually, that's the thing I am working on right now :) It should be out in a week or two...
Reply 4 years ago
Did you ever get that 2 lipo board designed?
Reply 4 years ago
Hi, sort of - http://embedblog.eu/?p=123
This enables you to charge and protect two (or more) cells at once.
Reply 5 years ago
Diamond Geezer
5 years ago
Thank you for this version of the board, The design and the schematic was amazing to look at.
I have two questions:
1- if I remove the switch and make permanent connection to 5v output section of the circuit will I have issues with the charging process, I mean what is the purpose of the switch except than disconnecting the boosted output.
2- You have in the schematic Protected Battery output, what is this for? is it for getting the 3.7v output of the battery?
Reply 5 years ago
Hi,
your assumptions in your questions are indeed correct. The switch only disables the 5V boost section, I use it as a main switch in many of my projects (which are based on this board). And the protected output delivers the battery voltage without any boost, I use this to either measure it with a microcontroller to estimate battery charge level or if I need for example 2,5 V, I connect the LDO regulator directly to this output, for efficiency reasons.
5 years ago
Hi, I was about to build the board but decided to look closely at the Load Sharing Module. If you apply battery voltage AND 5V, the 5V will feed the Boost Module and it will charge C4 to 5V. If you then remove the 5V, Q1 turns on and the battery feeds the Boost Module - good operation. Except where indicated, I'm assuming the switch is closed.
However, if you never apply 5V, or if the switch is open for a while, C4 will discharge to 0V. Now, Q1 can not turn on to connect the battery to the Boost Module - bad operation (to turn on Q1, the gate voltage must be lower than the source voltage).
I think you can fix this by swapping source and drain. The battery is now connected to the source, so the source will be nominally 3.7V. If 5V is connected to the gate, Q1 turns off because the gate is more positive than the source. If 5V is not present, Q1 turns on because the gate is less positive than the source - good operation all around. That, however, will require a change to the board.
Another fix would be to replace the P-channel enhancement MOSFET with an N-channel depletion MOSFET. This acts like a normally closed switch, so if not turned on, battery voltage will flow to the Boost Module. If 5V is present, the transistor turns on breaking the connection to the battery allowing 5V to flow to the Boost Module (N channel MOSFET turns on if the gate is more positive than the source).
You don't specify, in the schematics, or the parts list, what you are using for Q1. What part have you installed on your boards?
Reply 5 years ago
Hi,
interesting point. However, you are not taking into account the body diode - if you never apply 5V, the diode will still keep the source at roughly Vbat and since gate will be grounded, Q1 will be conducting. So that should work OK. And in the testing, I had no problems with that...
I cannot tell you from memory which part I used (and I do not have any on hand), but I do believe I wrote it somewhere in the comments here...
5 years ago
Hi, For space considerations, I'm considering one of the flat, thin batteries as sold by Adafruit and Sparkfun. These batteries have built-in protection circuitry. Will the protection circuitry of your circuit interfere and cause problems? I guess I could modify your circuit and remove protection but I also envision using 18650's, meaning I would need two versions. Thanks, I especially like the way you presented this project.
Reply 5 years ago
Hi,
firstly, thanks for your feedback. Regarding your question - that is honestly hard to tell. I would say that they should not interfere during normal operation, but the real question is what would happen if for example both of them enter the undervoltage lockout mode.
What I suggest is that you have the boards made with footprints for the protection, and then you do not populate the protection parts (that is R4, R5, U2 and U3). Then you just need to short all of the pins of the U2 footprint to complete the current path and voila - you have a board without protection...
Reply 5 years ago
Thanks, your solution makes perfect sense. What is the exact part you used for Q1. I can't find it on Sparkfun. Guess it's not very critical but would like to use what you used. Speaking of parts, I was curious about the pricing of parts here in the US. I was astounded to see that neither Digikey or Mouser carried any of the IC's.
Reply 5 years ago
Answering my own question: Q1 Mosfet is IRLML2244. It's available on ebay.
5 years ago
I used to do this. but I found that its just a whole lot easier and better to get a phone bank charger because its all in one nice package. You do have a couple problems with the phone bank devices though, one is that they shut off if there is not enough draw on them (they think the phone is charged...), The other is that they dont have really awesome batteries, like the good 18650s (AW, panasonic, ...)
5 years ago
Thanks, but the board has to ordered from the manufacturer?
Reply 5 years ago
No, you can order it from anywhere you want. Just download the zip file and there are either gerbers or eagle source files...
Reply 5 years ago
Thanks, sorry, I didn't phrase that correctly: the board is not avaible for purchase without manufacturing it?
Reply 5 years ago
Hi,
yes, unfortunately you have to manufacture it yourself. Maybe I could post some of the PCBs to you, as I have about a 100 of them, but they will not be populated with components...
Reply 5 years ago
I would love to obtain one or 2 of these & would be glad to pay for them...
If this is possible, please drop me a note at andy at aschmitt dots com.
Thanks... & GREAT Instructable!!
Reply 5 years ago
thank you too, I sent you an email...