When you pull up a circuit diagram of charger designs for 12V energy storage, you will quickly find that a Constant Current/Constant Voltage (CC/CV) topology is the undisputed standard for modern lithium iron phosphate (LiFePO4) and sealed lead-acid (SLA) batteries. A practical, high-efficiency implementation relies on a step-down (buck) controller like the LM2596-ADJ paired with an LM358 dual operational amplifier to manage the feedback loop and auto-cutoff. This guide dissects the topology, provides exact component values for a 14.6V LiFePO4 charger, and details how to safely test it on the bench.

The Anatomy of a 12V CC/CV Charger Topology

Before soldering, you need to understand the nodes and why we choose a switching buck topology over a linear regulator. A linear charger (like one based on the LM317) is simple, but it operates by burning excess voltage as heat. If you are charging a 12V battery from a 24V solar panel at 3A, a linear regulator must dissipate roughly 30W of heat. That requires a massive heatsink and wastes energy. A buck converter operates at 80-90% efficiency, dissipating only a few watts (Texas Instruments LM2596 Datasheet).

The CC/CV circuit diagram of charger topologies relies on four critical nodes:

  • VIN (Input Node): Accepts 18V–32V DC from a solar panel or bench supply.
  • SW (Switch Node): The high-frequency pulsing node between the internal MOSFET and the Schottky diode. Requires short, thick traces.
  • ISENSE (Current Sense Node): Measures the voltage drop across a low-value shunt resistor to regulate the Constant Current phase.
  • FB (Feedback Node): A high-impedance voltage divider that monitors the battery voltage to regulate the Constant Voltage phase and trigger cutoff.
Bench Tip: Never rely solely on the buck converter's internal current limiting for battery charging. The internal limit is a fault-protection mechanism, not a precision charge controller. Always use an external op-amp and shunt resistor to inject a CC/CV feedback signal into the FB pin.

Component Selection and Design Walkthrough

Let's design a 2A CC/CV charger for a 4S LiFePO4 battery (nominal 12.8V, max charge 14.6V). Here are the exact component values and the math behind them.

The Power Stage

  • U1: LM2596-ADJ (Adjustable buck converter IC).
  • L1: 33µH shielded power inductor (rated for at least 3A saturation current).
  • D1: 1N5822 Schottky diode (3A, 40V). Do not use a standard 1N4007; the reverse recovery time is too slow and will destroy the IC.
  • C_IN / C_OUT: 220µF, 35V low-ESR electrolytic capacitors.

The Feedback and Control Stage

The LM2596-ADJ attempts to keep its FB pin at exactly 1.23V. We use an LM358 dual op-amp (U2) to compare our battery voltage and charge current against reference thresholds, pulling the FB pin high to throttle the output when limits are reached.

1. Setting the Constant Voltage (CV) at 14.6V:
We need a voltage divider from VOUT to GND that yields 1.23V at the FB pin when VOUT hits 14.6V.
Formula: V_FB = V_OUT * [R2 / (R1 + R2)]
If we set R2 = 1kΩ, then R1 needs to be 10.87kΩ. Since 10.87kΩ is not a standard E24 value, we use a 10kΩ fixed resistor in series with a 2kΩ multi-turn trimpot. This allows you to dial in exactly 14.60V on the bench.

2. Setting the Constant Current (CC) at 2.0A:
We place a shunt resistor (R_SENSE) in the ground return path. The LM358 compares the voltage drop across this resistor to a fixed reference. If we use a 0.05Ω, 5W power resistor, a 2A current flow generates a 0.1V drop (V = I × R). We configure the second half of the LM358 to amplify this 0.1V signal and feed it back to the FB pin, overriding the CV loop when the current tries to exceed 2A (Battery University: Charging LiFePO4).

Behavior Matrix: What Happens When Components Shift

Understanding failure modes is what separates a hobbyist from an engineer. If you are troubleshooting a broken board, this behavior table shows exactly what happens at the extremes.

Component Normal State Open Circuit Failure Short Circuit Failure
R_SENSE (0.05Ω) Regulates CC at 2A Charger loses current limiting; will push max inductor current into a dead battery, risking thermal runaway. Charger thinks current is zero; will continuously ramp up voltage trying to reach 2A, likely overvolting the battery.
R1 (CV Divider Top) Sets VOUT to 14.6V FB pin drops to 0V. Buck converter ramps to maximum duty cycle. VOUT spikes to VIN (up to 32V), destroying the battery BMS. FB pin sees full VOUT. Buck converter shuts down entirely. VOUT drops to 0V.
D1 (Schottky Diode) Provides freewheeling path Inductor voltage spikes when internal MOSFET turns off. Instantly destroys U1 (LM2596) via overvoltage. VIN is shorted to GND through the inductor. Input fuse blows or VIN supply goes into protection.
Output Blocking Diode Prevents reverse battery drain Battery discharges back into the charger circuit when VIN is removed, draining the pack. Charger output is shorted to battery positive; functions normally but loses reverse-polarity protection.

Step-by-Step Breadboard Testing Protocol

Testing a 2A power circuit on a standard solderless breadboard is a recipe for melted plastic due to high contact resistance. Rule #1: Use a breadboard only for the low-current LM358 op-amp control loop. Solder the LM2596, inductor, Schottky diode, and shunt resistor to a piece of perfboard or use a pre-built LM2596 module for the power stage. Once your hybrid test rig is built, follow this verification sequence:

  1. Power Up Without a Load: Connect your 24V DC bench supply to VIN. Leave VOUT open. Measure VOUT with a multimeter. Adjust the CV trimpot until VOUT reads exactly 14.60V.
  2. Verify the Constant Current (CC) Limit: Set your multimeter to the 10A range and place it directly across VOUT and GND (effectively shorting the output through the meter). The voltage should drop near 0V, and the current reading should clamp exactly at 2.0A. If it reads higher, adjust the LM358 current-reference trimpot.
  3. Simulate the CV Transition: Connect an electronic dummy load set to draw 1.5A. The output voltage should remain at 14.6V. Slowly increase the dummy load to 2.5A. The voltage should smoothly drop as the circuit enters CC mode to protect itself.
  4. Test Auto-Cutoff (Optional but recommended): If your circuit includes a relay or MOSFET cutoff driven by a third op-amp stage monitoring current drop-off, connect a battery simulator. When the current drops below your termination threshold (usually 0.1A or C/20), verify the output relay clicks open.
Safety Warning: Never test a charger by connecting it directly to a heavily depleted lithium battery pack without first verifying the CC limit on a dummy load. A deeply discharged LiFePO4 pack will look like a dead short and pull maximum current. If your CC loop is misconfigured, the cells can vent or catch fire.

Frequently Asked Questions

How do I modify the circuit diagram of charger for a 24V battery system?

To adapt this topology for a 24V system (like a 7S LiFePO4 pack charging at 25.55V or a 24V Lead-Acid at 28.8V), you must change three things. First, ensure your VIN is at least 5V higher than your target charge voltage (so, a 35V+ input supply). Second, recalculate the CV voltage divider (R1 and R2) to yield 1.23V at the FB pin when VOUT hits your new target. Third, verify that the output capacitors and the LM2596 itself are rated for the higher voltage; the standard LM2596-ADJ is rated for up to 40V VIN, but the HV variant (LM2596HV) is safer for 24V battery systems to handle voltage spikes.

Why does my charger circuit diagram show a diode on the output?

Many reference schematics include a series Schottky diode (like a 1N5822 or SS34) between the buck converter's output capacitor and the battery positive terminal. This is a blocking diode. When you unplug the charger from the wall, the battery voltage will try to flow backward into the charger circuit, powering the op-amps and draining your battery pack over a few days. The blocking diode prevents this reverse current. Be aware that this diode introduces a voltage drop (about 0.3V to 0.5V), so you must measure and set your CV trimpot after the blocking diode, directly at the battery terminals.

Can I use this circuit diagram of charger for lithium-ion (NMC) cells?

Yes, but you must adjust the Constant Voltage setpoint. A 4S LiFePO4 pack requires 14.6V (3.65V per cell). A 4S NMC (Lithium-Ion) pack requires 16.8V (4.20V per cell). You will need to recalculate the R1/R2 voltage divider to target 16.8V. Furthermore, NMC cells are far more volatile than LiFePO4 if overcharged. If you are charging NMC, it is highly recommended to add an independent over-voltage protection IC (like a dedicated BMS or a TL431-based crowbar circuit) that physically disconnects the charger if the voltage exceeds 4.25V per cell (All About Circuits: Buck Converter Design).

What breaks if I reverse the battery polarity on this charger topology?

If you connect the battery positive to the charger ground, and battery negative to the charger output, you will instantly destroy the circuit. The output blocking diode will become forward-biased, dumping the full battery current backward through the LM2596 inductor and the internal freewheeling diode. The Schottky diode (D1) will short the battery, likely melting the PCB traces or causing the battery wires to catch fire before the battery's internal BMS can trip. Always add a reverse-polarity protection circuit—such as a P-channel MOSFET on the output or a physical polarized connector (like an XT60) that makes misalignment impossible.