A battery charger is a specialized power circuit that dynamically regulates output voltage and strictly limits current to safely force energy into a chemical cell without exceeding its thermal or gassing thresholds. In a real circuit or installation, a charger transforms a raw, unregulated DC source—like a rectified AC transformer or a fluctuating solar array—into a precisely controlled constant-current (CC) and constant-voltage (CV) profile that matches the battery's chemical requirements. Makers commonly confuse a standard DC power supply with a charger; while a power supply holds voltage steady regardless of the load, a true charger must actively throttle current when the battery voltage is low to prevent catastrophic thermal runaway.
The Core Theory: Power Supply vs. True Charger
Understanding how to create a charger starts with recognizing why a standard bench power supply will destroy a depleted lithium battery. If you connect a fixed 14.6V power supply capable of delivering 30A to a 12V LiFePO4 battery that has been discharged down to 10.0V, Ohm's law takes over. The voltage delta is 4.6V. Assuming the battery's internal resistance and wiring total a mere 0.05 ohms, the initial current surge would theoretically attempt to pull 92A (4.6V / 0.05Ω). The power supply will either trip its overcurrent protection, or worse, push its maximum 30A continuously into a battery and Battery Management System (BMS) rated for only 20A.
A true charger solves this by operating in two distinct modes. Think of current limiting like a toll booth that only lets 20 cars pass per minute, regardless of how massive the highway behind it is. In Constant Current (CC) mode, the charger acts as a current source, raising its output voltage only as much as needed to maintain the target amperage. Once the battery voltage reaches the target absorption threshold, the charger switches to Constant Voltage (CV) mode, holding the voltage steady while the current naturally tapers off as the battery's internal chemistry reaches equilibrium.
The CC/CV Profile: A Worked Numeric Example
Let's walk through the exact numbers for charging a 12V (4-series) 100Ah LiFePO4 battery using a properly configured DIY buck-converter charger.
- Bulk Phase (CC Mode): The battery is at 12.0V (roughly 20% State of Charge). The charger outputs exactly 20.0A. To push 20A through the battery's internal resistance and wiring, the charger's output terminals might only read 12.8V. As the battery charges, its terminal voltage rises, and the charger continuously adjusts its PWM duty cycle to maintain exactly 20A.
- Transition Point: After roughly 4 hours of bulk charging, the battery terminal voltage reaches the 14.6V target. The charger's voltage feedback loop now takes priority over the current feedback loop.
- Absorption Phase (CV Mode): The charger locks its output at exactly 14.6V. Because the battery is now nearly full, its internal chemical resistance increases. The current naturally drops from 20A down to 15A, then 5A, and finally below 0.5A.
- Termination: Unlike lead-acid batteries, LiFePO4 does not require a continuous float voltage. Once the current drops below a termination threshold (typically C/20, or 5A for a 100Ah bank), the charger must completely disconnect to prevent micro-cycling and lithium plating.
Where You Meet This in Practice
You will encounter CC/CV charging topologies across several domains of power electronics. In solar charge paths, MPPT (Maximum Power Point Tracking) controllers use CC/CV algorithms to harvest maximum wattage from panels while respecting the battery's absorption limits. In bench power supplies, advanced lab units feature a dedicated 'battery charge' mode that engages a hardware current-limit shunt before the voltage regulation loop takes over. In EV and e-mobility systems, the onboard charger (OBC) inside an electric vehicle is essentially a massive, digitally controlled CC/CV buck converter that communicates with the battery pack via CAN bus to dynamically adjust the target voltage based on cell temperature.
Scenario Walkthrough: When a DIY Charger Bricks a BMS
Theory is clean; the workbench is not. Here is a real-world failure that highlights the difference between advertised specifications and actual circuit behavior when learning how to create a charger.
- Setup: A maker wanted to build a fast charger for a 24V (8-series) 100Ah LiFePO4 bank. They used a 48V server power supply stepped down through a generic, unbranded '60A' DC-DC buck converter module purchased online. The target voltage was set to 29.2V, and the current limit potentiometer was adjusted to 40A.
- Numbers: The battery was depleted to 22.0V. The BMS was rated for a continuous 50A charge, with an overcurrent cutoff at 60A.
- Outcome: Within three seconds of connecting the circuit, the BMS tripped and permanently shorted its charge MOSFETs. The buck converter's input fuse blew, and the battery was left stranded in a disconnected state.
- What Went Wrong: The maker assumed the buck converter's 'current limit' feature was a true CC feedback loop. In reality, cheap modules often use fold-back current limiting. This means the module only limits current by aggressively dropping the output voltage when an overcurrent event is detected. When connected to the 22.0V battery, the module initially surged to 55A before the fold-back protection reacted. The BMS saw a 55A spike, panicked, and the transient voltage spike from the sudden load dump bypassed the BMS protection, frying the silicon. A true charger requires a dedicated current-sense amplifier (like the INA219 or a dedicated analog shunt op-amp) feeding directly into the PWM controller's error amplifier.
Designing the Circuit: Topology and Component Choices
If you are designing a charger from scratch rather than configuring an off-the-shelf module, your choice of topology dictates your efficiency and complexity. Below is a comparison of common charger topologies for sub-100W and high-power applications.
| Topology | Best For | Pros | Cons |
|---|---|---|---|
| Linear (Series Pass) | < 10W, small LiPo cells | Zero EMI, extremely simple, low noise | Terrible efficiency, massive heat dissipation (burns excess voltage as heat) |
| Synchronous Buck | 10W - 500W (12V/24V systems) | High efficiency (>92%), compact, handles high step-down ratios | Requires careful PCB layout to manage switching noise and ground bounce |
| Flyback / Forward | AC-DC direct charging (50W - 300W) | Provides galvanic isolation from mains AC, single-stage conversion | Complex transformer design, higher component count, lower efficiency than buck |
| Phase-Shifted Full Bridge | > 1000W (EV charging, large 48V banks) | Handles massive power, soft-switching reduces losses | Overkill for DIY, requires advanced DSP control and high-voltage safety protocols |
For most 12V and 24V DIY solar or bench applications, a synchronous buck converter controlled by a dedicated charge IC (like the Texas Instruments bq24650 or similar MPPT/charge controllers) is the gold standard. These ICs have built-in CC/CV state machines, eliminating the need to write complex feedback loop compensation code in a microcontroller. For a deeper dive into the electrical principles governing these circuits, the All About Circuits textbook on battery charging provides excellent foundational math on internal resistance and gassing voltages.
Frequently Asked Questions
Can I use a standard 14.4V lead-acid charger for a 12V LiFePO4 battery?
No. Lead-acid chargers typically include an 'equalization' or 'desulfation' stage that pushes voltages up to 15.5V or higher to deliberately boil the electrolyte. This voltage will trigger the high-voltage disconnect on a LiFePO4 BMS and can cause permanent degradation to the lithium cells.
Why do some chargers have a 'float' stage and others don't?
Float charging (holding the battery at ~13.5V indefinitely) is required for lead-acid batteries to counteract their natural self-discharge and prevent sulfation. Lithium-ion and LiFePO4 chemistries do not self-discharge at a meaningful rate and are actually degraded by holding them at a high state of charge. True lithium chargers terminate completely once the CV current drops below the cutoff threshold.
How do I measure the actual charge current on my DIY setup?
Do not rely on the built-in ammeter of a cheap bench power supply, as they often measure total input current or lack the resolution for low-current CV tapering. Use a dedicated DC shunt monitor or a Hall-effect clamp meter placed directly on the negative battery terminal lead to capture the exact current entering the cell.






