This is a project that talks about interfacing your laptop battery with TIVAC TM4C123G using SMBus protocol and reading its internal registers. This will help the creators to reuse the old laptop batteries in their project.
Warning: Laptop batteries are so dangerous because they contain high energy and could explode if you make any mistake with them. It could even damage any device that is connected to it. I am not responsible for any damage or injuries that occur to anyone. Don't try this at home. You are doing this at your own risk.
2
Safety First!!
When working with lithium batteries, you must keep them in a clean environment (keep the batteries away from any metal objects). Keep the batteries in well-protected boxes; keep them far from any liquids; use proper safety tools for handling and containing lithium fires; keep the batteries far from children; and use proper tools for protecting your own computer, such as:
1- Using USB isolators for isolating the computer from the microcontroller that connected to the battery. If the high-voltage wires touch any signal wires, this could fry your computer and everything connected with it.
2- Make sure to fasten all your wires and keeping them intact.
3- Keep the communication wires away from the high-voltage wires.
3
Introduction
The BMS is an electronic system that manages a rechargeble battery (cell or battery pack), such as by protecting the battery and monitoring its state, balancing each individual cell, and making sure that it operates within the safe operating area.
01- Reports the appropriate charging current needed for constant current charging and the appropriate charging voltage needed for constant voltage charging to a smart charger using SMBus broadcasts. These values can be sent to the BQ24725 smart charger.
02- Determines the chemical state of charge of each battery cell using Impedance Track™ and can reduce the charge difference of the battery cells in fully charged state of the battery pack gradually using cell balancing algorithm during charging. This prevents fully charged cells from overcharging and causing excessive degradation and also increases the usable pack energy by preventing premature charge termination.
03- Supports pre-charging/zero-volt charging.
04- Support fast charging.
05- Supports charge inhibit and charge suspend if battery pack temperature is out of temperature range.
06- Reports charging fault and also indicate charge status via charge and discharge alarms.
The BMS might also have a communication protocol that enables controlling it using any embedded system. The embedded system could also read many internal registers inside the BMS, such as:
01- The voltage for each individual cell.
02- The voltage of the pattery pack
03- The current (Positive value for charging, Negative for discharging, and zero for idle).
04- The temperature of the battery pack.
05- Estimated time to full (when charging).
06- Estimated Time to empty (when discharging).
07- Full charge capacity.
08- Remaining capacity.
09- Cycle count.
10- Absolute/Relative state of charge.
11- Charging voltage.
12- Charging current.
14- Battery status flags.
15- Mosfets status.
16- Charging status.
and more ....
The Laptop BMS is controlled using the System Management Bus (SMBus) protocol. It is a special type of I²C bus with a low frequency speed of 10KHz and might require a low value pull-up resistor such as 1.2 KOhm for both the clock and data lines. This protocol is used by all the computers to control the BMS and to read its basic information. This communication bus follows a standard which will be discussed further later.
We can do lots of projects using the BMS such as:
01- DIY power walls (using lithium batteries for storing solar energy) and monitoring each battery pack.
02- DIY electric scooters.
03- DIY electric cars and robots.
04- Battery backuped devices, power banks, and UPSs.
05- DIY power bank for Raspberry Pi and controlling it from Raspberry Pi.
So many applications ..
Once the battery is used too many times, its life degrades by usage, and once the BMS detects that one of the cells is damaged, it locks down the battery and prevents any further charging/discharging process.