Today we try to build a battery charging circuit called a BMS (Battery Management System). Battery management systems are as important as other electronic components to measure voltage and cut-off charging when the battery got its required voltage. In the event of irregular or dangerous conditions, it might trigger an alarm to alert the user.
Lithium-Ion batteries are now so popular and easy to availability. in fact, it slowly replaces the lead-acid battery as well. These days, this type of battery is looking everywhere for portable devices. But compared to lead-acid or nickel batteries, lithium-ion batteries are very much dependable on the charger parameters. An ideal charger needs voltage and current protection, overheating protection, etc. If you don’t conscious of these criteria to control the process of charging and discharging lithium-ion batteries, they will damage soon. Even due to overheating, These batteries can swell and explode from overcharging, and this is dangerous for humans as well as electronic devices.
Today we will design and integrate a 3s Battery Management System circuit which will charge as well as protect our three 18650 lithium-ion batteries. Also, it has a tuning resistor cut-off voltage. The LED indicator on the collector circuit of the transistor will glow when the transistor is active, thereby indicating that the charging process is complete. This circuit is not the best circuit but it works finely. You can make 3s, 4s, and 5s BMS using one-by-one series combinations and so on.
Function of The Battery Management System
- To charge the batteries
- Protect them from overvoltage
- Limit the current
- Balance the batteries in case of more than one cell
- Estimating the battery’s operational state
- Continually optimizing battery performance
- LM317 Adjustable Voltage Regulator (x6)
- TL431 Regulated Zener Diode (x3)
- BD140 Transistor (x3)
- 1N4007 PN Diode (x12)
- 100uF/25V Capacitor (x6)
- 20KΩ Resistor (x9)
- Resistor (3.3KΩ, 1.39KΩ, 1KΩ, 330Ω, 2Ω) (x3)
- Red LED (x3)
- 3.7V Lithium-Ion Battery (x3)
- Lithium-Ion Battery Holder (x3)
- 12.8V Power Supply
- Connection Wires
- Double-Sided Prototyping Board
After designing the schematic diagram of the Battery Management System, the assembled components and wiring are too clumsy and look unprofessional. In fact, the wiring also has a chance of loose connection. To give it a clean and professional look I decided to build its PCB prototype using EasyEDA software as it is so simple to use. Now come to the main part, where we need to order our PCB prototype. I always prefer PCBWay for their quality assurance, fastest delivery and also for 24/7 customer support.
I’ve done several runs with PCBWay and am happy with the results, it’s good quality. The etching, solder mask, and hole sizes are all done well and that is what matters to me. It takes a few hours for a design to get approved and then a couple of days to finish and ship. With more than a decade in the field of PCB prototypes and fabrication, PCBWay has proved its assurance from time to time. They always look at the needs of the customer from different regions in terms of quality, on-time delivery, cost-effectiveness and any other demanding requests.
These PCBs were manufactured by PCBWay and the finish quality really impressive, especially with the gold finish path. If you want to finish your product faster you could also ask PCBWay to make a panelized order where you receive multiple PCBs in a single panel. Together with this, you will also receive SMT Stencil from PCBWay which will save you time and effort. All the orders are high quality and could select a lot of settings such as thickness, flexible PCB, the colour of the solder masks, the number of layers, material, surface finish and more.
High Delivery Rate
In previous years, the on-time delivery rate was 99%. Rather than PCB quality, PCBWay knows that the other most important factor is the shortest possible lead time, which is critical for R&D engineers, especially in the prototyping phase. PCBWay keeps working to ensure PCBs will be delivered to customers as soon as possible and they’re delighted. It takes only 3 to 15 days according to the courier service to deliver your products. After PCBWay moved to the new factory, the production capacity of multi-layer PCB can be as high as tens of thousands of square meters per month. So on-time delay is also reduced for that. They have the “Return and Refund” principle, for every unusable board caused by PCBWay, they will rebuild and refund the order soon.
When talking about quality assurance, all the PCB prototypes go through the most stringent tests rather than the basic visual checks. They have most of the testing and inspecting types of equipment used in the PCB prototyping industry, such as Flying Probe Tester, X-Ray Inspection Machine, and Automated Optical Inspection (AOI) Machine.
Previously there have 9 different types of solder masks available in their company. But now recently they have launched extra 4 solder masks that are pink, grey, orange and transparent solder masks.
Also, there is a piece of great news about the price reduction of PCB prototypes. From 5th August you can now buy 4-layers & 6-layers with upto 20% discounts. As the price dropped, don’t think they will compromise on the quality.
There are three types of assembly services:
- Turnkey where PCBWay supplies all PCB parts.
- Kitted or Consigned where the customer is responsible for buying and sending all parts to PCBWay.
- Combo, where the customer supplies some parts and PCBWay, completes the rest.
3D Printing & CNC
It also produces Rapid Prototyping like 3D printing, CNC Machining, Sheet Metal Fabrication, and Injection Molding. The quality of the product is too premium and reliable. And also the best part is that you will receive your order within a minimum of 3 days.
Guide for Ordering PCB from PC
Why We Need Battery Management System?
Lithium-ion or Li-Po batteries are very popular, especially with makers like us for small robots, portable devices, RC toy cars and drones and so on. But these batteries are also very sensible and dangerous. If you don’t control the process of charging and discharging such batteries, they will stop working or even worse. The battery cells can swell and even explode from overcharging, and a deep discharge can cause battery failure. That’s why these batteries should go together with a battery management system unit or BMS. This will control the voltage and current from the battery and keep them safe.
Usually, the nominal voltage of a Li-Po battery is 3.8V and 4.2V when fully charged. So, as soon as the battery cell will reach this 4.2V value, the charging process should stop and that’s what this circuit should do. When you have only one cell, you only care about the maximum voltage and the current limit to protect the battery.
How Balanced Chargers Work?
When you have a battery pack of more than one cell, so 2s, 3s and so on, you also need to balance the value of each individual cell.
For example, let’s say we have 3 batteries in series, so a 3S battery pack. The total voltage would be 3 times 4.2 so 12.6V. But let’s say the batteries are discharged so we need to charge them up. We apply a constant voltage of 12.6 volts to the pack. The battery pack start charging but is impossible to have the internal structure of all the batteries equally the same. So one will charge faster and another slower. Also, maybe one battery is discharged to 3.6V but the other one is only discharged to 3.8V. So when we apply 12.6V to the battery pack, some batteries will get to 4.2V faster than the other ones.
If we keep charging the battery pack till all of the batteries get above 4.2V, that means some batteries will have overvoltage and that is very bad. A balancing system will cut off the connections only to those batteries that have already reached 4.2V and leave the other batteries connected. In this way, all batteries will get to exactly 4.2V safely.
Analyze Battery Management System Circuit for Only One Battery
We have a PNP transistor connected in series with 4 diodes that will simulate a load. At the base of the transistor, we have a Zener reference diode which will get open at a certain voltage value and by that connects the ground to the base of the transistor. When the transistor is active, we bypass the battery and waste the power on the diodes instead.
Let’s see the picture to understand better. The battery is connected here which is the input and also the output of the circuit. When the battery is below 4.2V and we apply 4.2V at the input, the battery will start charging and a current will flow through it. Also, the voltage will drop. If the voltage is below 4.2V, the reference diode will be open, so the PNP transistor is OFF because it has a pull-up at its base. So at this point, the only current path is through the battery.
But when we reach 4.2V, the Zener reference diode will close and make the connection between the base of the transistor and ground. This Zener diode is the TL431 and it has a reference pin, so by adjusting the potentiometer we can set this reference to be at 4.2V, that’s how we select when the charging process will stop. That’s why this diode has 3 pins instead of 2 pins like other diodes.
So now, if the PNP transistor is active, current will flow through this transistor and also through the diodes which will act as a new load. So now we are wasting power instead of charging the battery, and that’s how the charging process is stopped. Also, when the transistor is ON, the voltage is also connected to this resistor and LED.
In this way, the LED will turn on when the charging process is complete. So as you can see, this circuit is not that efficient since we waste power inside the diodes and transistors. Also, if the power waste is too high, maybe the transistor would need a heat dissipator. So it won’t burn out. But we are not looking for efficiency here since we can use this charger with supply from the main outlet. So we don’t care that much about efficiency.
Testing Battery Management System Circuit for Only One Battery
I mount this simple circuit on my double-sided prototyping board and supply it with 4.2V from my power supply. Also, connect my multimeter at the output and using the potentiometer, we can fix the threshold value to around 4.14V up to 4.2V.
I am using a used battery which is already discharged and it is below 4.2V. When I connect it to the charger, the LED is turned off. We have a current flow of around 450mA and the battery is getting charged up. When it reaches 4.2V, the LED will glow ON. So the charging process is complete. Current is now flowing through the diodes and transistor and it skips the battery. So the cell is now protected from overvoltage. I also measure the battery and it is 4.11V.
How Can We Control The Current Limit?
Current limiting is also an important protective factor. At this point, we can’t really regulate the current limit with this circuit design. But we can add an LM317 regulator at the input place in the current mode. In this configuration, the current limit is set by the resistor at the output and is equal to this formula.
IOUT = (VREF / R1)
VREF = 1.25V
So it should be very easy to select a resistor and limit the charging current, let’s say 600mA.
In order to get a decent 2Ω resistor, for the final circuit, I’ve merged together in parallel, 5 resistors of 10Ω. So a total of 2Ω but it will stand more powers. At this point, with this circuit, we can protect the battery from overvoltage and charging current limit.
We could also add a second LM317 regulator IC but on voltage control mode.
With the previous circuit, the input must be exactly 4.2V. But sometimes we only have 5V or maybe 12V input if we use a DC adaptor. So with this second LM317 IC, we can adjust the output at 4.2V. So no matter the input value, the voltage that goes
to the battery is 4.2V.
Analyze Battery Management System Circuit for Two or More Batteries
Now comes the interesting part. We can take this simple circuit and merge it in series with another identical circuit. Now we can charge a 2s battery pack and also balance the voltage as I mentioned before. If we add three circuits in series, we can charge a 3S battery pack as well and all individual cells will stop charging at 4.2V.
Also, by having the two LM317 regulators ICs at the input section, we will have current limit protection but we are also able to supply the entire circuit with let’s say 16V to 20V. Set the voltage that goes to the battery to 12.6V, which is the charged voltage of 3 batteries in series.
Testing Battery Management System Circuit for Two or More Batteries
I get all the needed components and solder the circuit on a double-sided prototyping board. First, add the transistors and Zener diodes, then the potentiometers and 4 1N4007 PN diodes for each group. Then I add the LEDs and finally add the LM317 regulators and the current limiting resistor made out of 5 resistors of 10Ω. I make connections with solder and wires on the backside.
Now we have 3 pairs of connections for the batteries and one input and output. Each LED will turn ON when each individual battery will be fully charged. Using the potentiometer, you can finely adjust the threshold value. Changing this resistor value connected to the second LM317 IC can change the charging current limit as well.
When everything is ready, I just power on the circuit with 16V DC from my bench power supply. All batteries are now charging. After a while, one LED is turned on, then the second one and finally all 3 LEDs are turned ON. So all the batteries are full. I check the voltage with my multimeter and it shows 4.2V each. So the circuit works with no problems.
N.B: The only downside is the efficiency amd heat dissipation. But if you don’t care about that, this circuit could be useful for your battery pack.
If you want more power, you should use powerful transistors and bigger ampere diodes. To simulate the load and also add heat dissipator on the components. You should also change the current limiting resistor value and power, so get a bigger one.