LiPo Charger
Charge your batteries, charge your dreams!
π Brief description
It is always more convenient to be able to recharge the battery without having to dismantle the whole system. The addition of a battery charger seems to me to be essential in any electronic project.
π LiPo Charger Chip
The MCP73831 offers linear charging in a miniature package at an attractive price. It can be used with any type of battery by programming its charge current through an external resistor. It also features an automatic shutdown when the charged battery is full. This makes it an excellent charger for our card.
Technological capabilities
Features | Description |
---|---|
Charge Current | Programmable from 15mA to 500mA |
Power Down | Automatic |
Charge Status | Pin #1 in high state: LiPo full Pin #1 in low state: LiPo in charging |
Current Regulation
The speed at which a battery is charged depends on the amount of current applied during the charging period. The greater the current applied, the faster the battery will charge.
This charge current is set by adding a resistor to pin #5 of the MCP73831. So it's easy to change the resistor value to change the charge rate. The charge current is defined by the formula below:
In this project I've used a 10kOhm resistor, which allows a charge current of 100mA. So to charge a 100mA battery you'll need 1 hour of charging time, to charge a 200mA battery you'll need 2 hours of charging time, and so on.
Although we are tempted to set a high charge current to minimise charge time, all batteries have a maximum charge current. Be careful not to overcharge the battery. This can cause the battery to deteriorate prematurely or catch fire.
π Hardware Integration
Pin Configuration & Description
The MCP73831 is available in two packages: 8-lead DFN (2x3mm) or 5-lead SOT-23 (2.9x2.8mm). Due to availability, only the SOT-23 package was available, so this is the package in which the LiPo charger is mounted.
The available pins are listed in the table below:
Pin Number | Name | Description |
---|---|---|
1 | STAT | Charge Status Output |
2 | Vss | Battery Management 0V Reference |
3 | VBAT | Battery Charge Control Output |
4 | VDD | Battery Management Input Supply |
5 | PROG | Current Regulation Set and Charge Control Enable |
The Pin #1 STAT
Pin #1 indicates the state of charge of the battery. The pin is low when the battery is being charged / no battery detected, or high when the battery is full.
Based on this principle, I've added a pair of resistors and two LEDs (red and green) to indicate the state of charge of the battery. When the battery is charging, the red LED is on and the green LED is off. When the battery is fully charged, the green LED is on and the red LED is off (see figure: Kicad | Lipo charger stage).
Kicad - Rooting
The charger chip is wired according to the datasheet (see page 1). A 4.7Β΅F input and output is used for load transient response. Pin #4 is connected to the resistor to set the charge current. Pin #1 is used to set up the indicator LEDs.
The charging stage is connected directly to USB C. This means that even if the card is switched off (via the switch) but still powered by USB, it will still charge your battery.
π Documentation
Last updated