3S Battery Charger - Hackster.io

2022-09-03 11:00:23 By : Mr. Reagan Ren

Add the following snippet to your HTML:

Build your own Li-Po & Li-ion Balance Charger for under $10

Read up about this project on

Build your own Li-Po & Li-ion Balance Charger for under $10

Recently I purchased some 3S Li-Po batteries for a project I was working on. Unlike single cell batteries, batteries with multiple cells should be charged in a balanced way. This is to ensure that any single cell is not overcharged and hence possibly damaged.

Note that the battery has a two connecters. The 2 pin connecter is the output of all three internal Li-Po cells in series. The 4 pin connector is the charging plug and corresponds to the B-, B1, B2 and B+ connections as shown in the diagram below.

So rather than pay $30+ for a commercial battery charger, I decided to make my own using a 3S battery balancing board from AliExpress (Cost around $3).

One option is to connect the battery as shown above and feed 12.6V to P+ and P-. You should use a constant current source to limit the current to the mAH rating of the battery. The cells are fully charged when each cell is charged to 4.2V. You can check this with a volt meter.

To simply this process, my build displays the voltages across each of the cells on a OLED display. You can easily see when the battery is fully charged or if you have a faulty cell that fails to charge.

The circuit is built around a ATtiny1614 microprocessor driving a I2C OLED display and monitoring the voltage at each connection of the Battery Balancing Module (HX-3S-JH20). Each voltage is passed through a voltage divider so it doesn't overload the analog pin on the microprocessor.

The Eagle files have been included should you wish to have the board commercially made or you can do as I did and make it yourself. I used the Toner method.

Start by adding the SMD components. I find it easier to use solder paste rather than use solder from a reel when soldering SMD components.

Add the links if your PCB is single-sided.

Add the power and UPDI 4 pin header to the copper side of the board.

Add the 4 pin JST socket and HX-3S-JH20 module to the component side.

3D print Spacer.stl. This is glued to the copper side after fitting the OLED screen. I used a 4 pin female Dupont header with long pins to plug the OLED module into. Once positioned, solder the female connector to the copper side of the board and glue the spacer to the PCB using super glue. The OLED module was held in place using 2 x 4mm M2 screws.

Unlike the earlier ATtiny series such as the ATtiny85, the ATtiny1614 uses the RESET pin to program the CPU. To program it you need a UPDI programmer. I made one using a Arduino Nano. You can find complete build instructions at Create Your Own UPDI Programmer. It also contains the instructions for adding the megaTinyCore boards to your IDE.

Once the board has been installed in the IDE, select it from the Tools menu.

Select the ATtiny1614 board in your IDE

Select Board, chip, clock speed, COM port the Arduino Nano is connected and the programmer

The Programmer needs to be set to jtag2updi (megaTinyCore).

Open the sketch and upload it to the ATtiny1614.

Li-Po batteries when flat, can draw a large amount of current when charging. You must limit this current otherwise the battery could overheat and catch on fire. I used my DC-580 DC Boost and Buck Adjustable Power Supply that I built a while back. Set the current to the mAH of the battery. My battery is 500mAH so it the charge current shouldn't exceed 500mA. The voltage should be 12.6V for a 3 cell battery (4.2V x 3). Exceeding this voltage is likely to damage the battery.

The OLED display will show the battery voltages and the voltage across each cell. The battery is fully charged when all cells are around 4.2V

It isn't really a self-contained unit because of the power source that is also required. It was a interesting build and it does the job that was intended so all in all, a useful build đź‘Ť.