LiPo Battery Charger

By on February 12, 2020
Pin It



Complete charger in breakout board format based on the integrated BQ76920, capable of managing 3 to 5 cells.

The charging of lithium batteries, whether common Li-ion, LiPo or LiFePO4, requires particular precautions that make it more difficult and delicate than it is in accumulators such as lead batteries (for which it is enough to put under voltage with a mild current limiter) and NiCd or NiMH; this is because both the chemistry of the “lithium ions” is more demanding than those of the other batteries, and because it involves the risk of fire or explosion if the maximum allowed current is exceeded or the temperature reached by the cells during charging goes beyond critical. So if the charge is not managed correctly, there are risks both for things and people in the surrounding area and for damage or loss of battery quality. With regard to the latter, they materialize in the partial loss of the nominal capacity if the charge does not take place as expected; moreover, if battery packs composed of two or more cells are charged in series, the requirements increase, since the problem of containing the imbalance of the charge arises, which, given the relatively high voltage of each cell, can occur between the elements in series. All this imposes a certain requirement on the designer in finding the suitable circuit solution; to avoid this it is possible to draw on the products of manufacturers such as Texas Instruments, who make integrated circuits available containing all the circuits necessary to provide the optimal charge of the lithium-ion batteries and possibly interface with microcontrollers or microprocessors (as is the case in portable PCs, tablets and smartphones) via a standard bus such as the I²C or the SM-Bus (which is a variant) in order to monitor or condition the charge.

These are integrated like the BQ76920, which we used in the project described in these pages, consisting of a breakout board that makes it easy to experiment and integrate the integrated BQ76920 into existing systems that require recharging of Li-ion or LiPo batteries.


The project

The breakout board allows you to use the integrated, which depending on the hardware configuration would allow you to load or unload from 3 to 5 cells, in the three-cell mode only; no coincidence that the connector that connects it to the battery (BATT) has only 4 contacts: one for each cell and the negative one, common, connected to the earth.

There are also other versions of the integrated that allow you to manage up to 15 cells, therefore maintaining the same proposed scheme (without prejudice to the different connection of the battery pack) and following the manufacturer’s instructions, a modular lithium charger could be made. The integrated control takes place via I²C-Bus, but you must pay close attention to the version used since depending on the model, the commands are given must have different addresses.

In these pages, however, we will focus on the BQ76920; we leave the experimentation with the other integrated versions of the family to which it belongs to you.

A peculiarity of our integrated is that it measures and communicates the amount of charge transferred to the battery via I²C bus, i.e. the Coulombs; for this reason, care must be taken with the integration that the balanced charging of the cells, starting practically from the condition of low battery.

Recall that the amount of charge accumulated in a battery, which is usually expressed in amperes/hour (Ah) or watts/hour (Wh) can also be expressed in Coulomb (C), considering that 1C applies:

Q = i x t


where Q is the amount of charge expressed, precisely, I Coulombs, is the charge current and t the time for which it is fed into the battery. In short, it’s a bit like charging capacitors.

Another feature of our breakout board is the availability of the connector for balanced charging, which of course the BQ76920 is able to manage: the contacts of the balanced charge connector refer to the pins VC1 ÷ VC5 of the integrated.

The prototype you see on these pages has been prepared for 3 cells; analyzing the wiring diagram, we will then explain how to configure the number of cells.


Electrical diagram

So let’s see how it is made at the hardware level and how this charger works, which has, as visible in the relative wiring diagram, the heart of the U1, namely the Texas Instruments chip: you see it powered through the CHARGE + and CHARGE- (respectively positive and negative) which are located in parallel with two auxiliary contacts which output the same voltage received from the circuit. The external control interface refers to the pin-strip connector labelled CN1, on which we find SCL, SDA and GND of the I²C bus, in addition to the ALERT line with which the integrated communicates to the microcontroller, with a high logic level impulse, an alarm condition (exceeding the maximum temperature of the battery pack, excess absorption or lack during charging) and the BOOT, to which the NTC type battery temperature sensor is connected (it is a thermistor). This thermistor allows the circuit to detect if the temperature of the batteries exceeds critical, which can lead to the degradation of the cells (remember that the loss of capacity of these accumulators grows rapidly above 40 ° C) and, in extreme cases, to a battery fire. If you do not want to use the thermistor, a 10 kohm fixed resistor must be connected instead.



Through the I²C bus, a host controller can manage many of the activities and functions of the BQ76920, such as monitoring the voltage of the individual cells (read between neighbouring pairs of VC pins), charging current of the entire pack and its temperature, activating protections, control the individual cell charge/discharge MOSFETs in order to optimize the balance.

The outputs for the balanced charge of the individual cells are located at pins 16 (VC1) 15 (VC2) 14 (VC3) 13 (VC4) and 12 (VC5) and between each of them and the adjacent one there is a MOSFET that functions as a shunt, taking on itself part of the cell current which it has in parallel when the voltage measured by the ADC which is between two pins VC is higher than that of the other cells.

At the hardware level, although the integrated is able to load or unload a maximum of 5 lithium cells, we are content to manage a pack of three elements in series. To do this it was necessary to short-circuit certain cells in order to obtain the 3-cell version. In any case, keep in mind that the connections of the outputs for the cells of the BQ76920 are those indicated in Table 1, which shows how to connect a pack of 5 cells (using all the lines) or one of 3 or 4, shorting the excess outputs.

Table 1


As indicated, the integrated takes care of the management of the recharge and in this regard, it is sufficient to start the recharge procedure when desired, simply by sending a pin up or down, or CHG to activate the recharge or DSG for normal operation. These pins are connected to MOSFETs, which manage the flow of current to the battery or the withdrawal of current from it; note that the battery is connected to its own mass that does not coincide with the negative power supply, which only affects the input circuit (CHARGE + and CHARGE-) and is connected to the battery (the positive of which is instead in common with that of the battery pack) via the Q1 and Q2 MOSFETs, activated one at a time by the CHG and DSG pins. By reading the voltage across the Rsns resistor, the integrated detects the current in the battery: the measurement is made by associating the pins SRP and SRN (respectively positive and negative of the corresponding input) with the A/D converter inside the BQ76920.

We, therefore, describe the operation of the block of MOSFETS Q1, Q2 and Q3, which govern the charging and discharging activities, starting from the first: the CHG pin, which at rest is at a low level, is brought to a high level and the Q3 MOSFET, being a P channel, it enters conduction because its gate is grounded and therefore with a potential lower than that of the source, which you see connected to pin 2 of the integrated U1. Q3, therefore, carries voltage on the gate of Q, which is a channel N and is polarized through D1 (which short-circuits R12): having the source grounded, the potential on its gate sends it to the ON state and the drain drags to ground of Q1, which, being the DSG pin of the BQ76920 at logic zero, goes into conduction because the potential on source is positive with respect to pin 1, making the battery mass more positive than the CHARGE- point. Thus begins the charging of the battery pack, which is balanced and regulated by the U1 according to the settings provided by the I²Bus. The current flows through the Rsns resistor which allows to read in real-time the absorption of the battery and therefore the current supplied, which allows both to regulate the intensity, and to communicate it on the I²C-Bus and to check the various stages of charging, which, we remember, for lithium-ion batteries is divided into three phases:

  1. pre-conditioning, during which the current is gradually raised, especially if the voltage read across the cells is very low;
  2. constant current charge until a voltage of 4V per cell is reached;
  3. charge at a constant voltage, aiming for a value of approximately 4.2V.


Furthermore, knowing the current flowing through Rsns allows you to know the amount of charge stored in the battery during the recharging phase, averaging the current and multiplying its value by the elapsed time.

Once charging is complete, pin 2 of the integrated circuit returns to logical zero, so that MOSFET Q3 is disabled and Q2 and Q1 with it.

As for the discharge, it is carried out, for example, to prepare the battery for a new charge, possibly discharging the cells in the same way to balance them; also, in this case, the resistor Rsns allows to detect the current and determine the amount of charge subtracted, this time, from the battery pack.

During the charging cycle, it will be possible to monitor the “CC_READY” bit of the “SYS_STAT” register (Fig. 1) to find out if a new Coulomb data is present. If new data is available, it will be sufficient to read the registers “CC_HI” and “CC_LO” and add this value to that previously read to obtain the total Coulombs stored in the battery.

Through the status register, it is also possible to have other information, such as if the integrated is ready for readings if there are errors or alarms, such as too high temperature, and much more (refer to the datasheet).


Fig. 1


It is possible to understand from this register that it is also possible to monitor the temperature of the batteries provided that a 10 kohm NTC sensor is inserted externally (Fig. 2), which in our case can be inserted on the NTC connector. If this thermistor is present in the circuit, the temperature can be read through the appropriate register and alarm notifications can be received via the status register.

Components List:

R1: 10 kohm (0805)

NTC: 10 kohm NTC

R2, R3, R4, R5, R6, R7, R8, R9, R10: 100 ohm (0805)

R12, R13, R11: 1 Mohm (0805)

RSNS: 0.05 ohm 3 W (3015)

C11, C12, C13: 100 nF 50V ceramic (0805)

C1, C2, C4, C5, C6, C7, C8, C9, C10: 1 µF ceramic 35V ceramic (0805)

C3: 4.7 µF 25 VL ceramic (0805)

Q1, Q2: IPD034N06N3 G

Q3: NTR1P02T1G

U1: BQ7692006PWR


BATT: JST 2.5mm 4-way connector

PACK, OUT: Male XT60 connector with 10 cm of wire


  • XT60 female connector with 10 cm of wire

  • 2-way male strip

  • 2-way female strip

  • Printed circuit board S1442-3


Fig. 2


Arduino library

As mentioned, the BQ76920 must be managed by I²C-Bus and this mode of operation once again meets the inevitable Arduino, which is a candidate to be the election controller; not surprisingly, to manage the integrated we have created and made available a library for Arduino, which will manage the breakout board via the I²C-Bus.

The library that we propose derives from the one that can be downloaded from the web page ArduinoLibrary that we have modified to implement some improvements, but also to implement the charge quantity count (I Coulomb) which was not available in the original library.

Since the Coulomb count is precisely the purpose of the project, as well as activating the automatic recharge, we have created a sketch for Arduino that will allow you to perform these simple functions. It is a simple test program of the operating modes of the BQ76920, which we propose in these pages in Listing 1.

Listing 1

#include <bq769x0.h> // Library for Texas Instruments bq76920 battery management IC
#define BMS_ALERT_PIN 2 //Pin connected to ALN (Pin Alert)
#define BMS_BOOT_PIN 7 //Pin BOOT connected to TS1
#define BMS_I2C_ADDRESS 0x08 //I2C address of the integrated
#define CC_CHANGED_PIN 13 //Output indicating that a new Coulomb is available. Not used
bq769x0 BMS(bq76920, BMS_I2C_ADDRESS); //Output indicating that a new bq769x0 BMS(bq76920loat num_coulomb=0;
boolean CHARGE_ON=false; //False: Charging not in progress
const float MIN_TENS_CHARGE = 11000; //Minimum voltage below which charging takes place (sum of cells)
void setup()
int err = BMS.begin(BMS_ALERT_PIN,BMS_BOOT_PIN);
BMS.setTemperatureLimits(-20, 45, 0, 45);
BMS.setShortCircuitProtection(14000, 200); // delay in us
BMS.setOvercurrentChargeProtection(8000, 200); // delay in ms
BMS.setOvercurrentDischargeProtection(8000, 320); // delay in ms
BMS.setCellUndervoltageProtection(2600, 2); // delay in s
BMS.setCellOvervoltageProtection(3750, 2); // delay in s
BMS.setBalancingThresholds(0, 3300, 20); // minIdleTime_min, minCellV_mV, maxVoltageDiff_mV
BMS.enableAutoBalancing(); //Activation of battery balancing
BMS.setBatteryCapacity(2200); //Capacity battery. used for current calculation
void loop()
int dato;
byte registro;
BMS.update(); //This function should be called every 250ms to get the correct indication
Serial.print(“Vbat: “); //This displays the voltage of each cell
Serial.print(“ - “);
Serial.print(“ - “);
Serial.print(“ = “);
Serial.print(“mV - “);
Serial.print(“Temp: “); //Show the temperature
Serial.print(“CHARGE “); //If the recharge is not in progress, if the voltage drops below
//f the recharge is not in progress, if the voltage drops below MIN_TENS_CHARGE the recharge is activated
if (CHARGE_ON==false)
if (BMS.getBatteryVoltage() < MIN_TENS_CHARGE) CHARGE_ON=true;
//f charging is not in progress, normal operation is activated
if (BMS.enableCharging()==false)
//Reading Coulomb if a new data is available, to be used if you want to read the register on your own without going through the library
Serial.print(“Coulomb: “);
Serial.print(“ / Corrente: “);


From Openstore

3 cell LiPo charger

Rechargeable LIPO 2000 mAh – 7.4 V battery

Rechargeable LIPO 2200 mAh – 11.1 V battery

About Boris Landoni

Boris Landoni is the technical manager of Skilled in the GSM field, embraces the Open Source philosophy and its projects are available to the community.

Leave a Reply

Your email address will not be published.