🔋 12V Lead-Acid Battery Charger with LM350: Temperature-Compensated DIY Charger (2026 Guide)

Hey makers! Electro here. A lead-acid battery doesn't want "just voltage" — it wants a controlled voltage that backs off as temperature rises, otherwise you cook it slowly with overcharging. Today we're building a proper 12V lead-acid charger around the LM350 (3 A adjustable regulator): adjustable output from 13 to 15 V, negative temperature compensation, and reverse-discharge protection. I've built this exact topology for my backup batteries — let's wire it right.

🔄 Updated for 2026: corrected regulator theory, input supply design, thermal calculations, calibration procedure, BOM, and an ESP32 charge-monitor upgrade.

12V lead-acid battery charger circuit built with LM350 regulator on heatsink charging a battery

Constant-voltage charging with temperature compensation — the right way to treat lead-acid.

🧠 Why Constant Voltage + Temperature Compensation?

A 12 V lead-acid battery charges at roughly 14.4 V (bulk/absorption) and floats around 13.6 V. Push higher — or keep the same voltage on a hot day — and you get gassing, water loss and thermal runaway. That's why a serious charger reduces its output voltage as temperature rises (negative temperature coefficient), and exactly what this LM350 design does.

🔧 Key Components & Their Roles

  • LM350 regulator: 3 A adjustable regulator holding a 1.25 V reference between OUT and ADJ — the heart of the constant-voltage loop.
  • Q1 (BD140): mounted close to the battery, it acts as a temperature sensor; its VBE drop (~-8 mV/°C in this network) pulls the output voltage down as the battery warms.
  • Q2: blocks the battery from discharging back through the regulator's resistor network when mains power is off.
  • R6 (potentiometer): sets the output anywhere between 13 V and 15 V.
  • Input supply: 20–30 V DC at 3 A.
  • LED indicator: shows the charger is live.

⚙️ How the Circuit Works

  1. The LM350 forces a fixed 1.25 V between OUT and ADJ, which sets a stable charging voltage across the battery.
  2. The R6/R3/R4 network biases Q1; as battery temperature rises, Q1 conducts more and lowers the output voltage.
  3. This negative temperature coefficient prevents overcharging and thermal runaway on hot days.
  4. Q2 isolates the battery when the supply is off — no parasitic drain.
  5. The LED confirms charging is active.
    Schematic of temperature-compensated 12V lead-acid battery charger using LM350

🔌 Building the 20–30 V Input Supply

  • Transformer: 15–18 V AC, 3–4 A (≈ 60–80 VA).
  • Bridge rectifier: 5 A type (e.g., KBL405).
  • Filter capacitor: 4700 µF / 35 V minimum.
  • Fuse: 3 A on the DC side, 1 A slow-blow on the AC side.
⚠️ Thermal reality check: the LM350 dissipates (VIN − VOUT) × I. At 30 V in / 14 V out / 3 A that's 48 W — enough to fry a small heatsink! Keep the input as low as possible (~20 V) and use a heatsink rated ≤ 2 °C/W with thermal paste. At 20 V in, dissipation drops to a manageable ~18 W.

🛒 Bill of Materials (BOM)

ComponentModel / ValueRole
RegulatorLM350 (TO-220)Constant-voltage core, 3 A
Q1 temp sensorBD140 (mounted on battery)Temperature compensation
Q2 protection2N2222 / BC547Reverse-discharge blocking
R65 kΩ multiturn potOutput adjust 13–15 V
Filter cap4700 µF / 35 VInput smoothing
BridgeKBL405 (5 A)Rectification
Transformer15–18 V AC / 3–4 AMains isolation
Heatsink≤ 2 °C/W + pasteLM350 cooling
Fuses3 A DC + 1 A AC slow-blowProtection

🛠️ Assembly & Calibration

  1. Mount the LM350 on the heatsink with paste; bolt the BD140 (Q1) near the battery case, not on the PCB.
  2. Power up without battery and set R6 until the meter reads 14.4 V (flooded) — never exceed your battery maker's spec.
  3. Connect the battery through the fuse; the LED lights and charging begins.
  4. Verify current tapers down as voltage approaches setpoint — that's healthy constant-voltage behavior.
⚠️ Note: this simple design is not suited to gel batteries as originally warned — gel cells demand lower peak voltages (~14.1 V) and are unforgiving of overcharge. Charge in a ventilated area: lead-acid emits explosive hydrogen gas.

🤖 The Modern Twist: ESP32 Charge Monitor

Add a smart cutoff alarm with an ESP32 and a voltage divider — it warns you the moment the battery hits full charge:

// Smart charge monitor - Electro (TechFix Hub)
// Divider: R1=100k (bat→GPIO), R2=27k (GPIO→GND) => ratio ~4.7
const int PIN_BAT = 34;

void setup() { Serial.begin(115200); }

void loop() {
  float v = analogRead(PIN_BAT) * 3.3 / 4095.0 * 4.7;
  Serial.print("Battery: "); Serial.print(v, 2); Serial.println(" V");
  if (v > 14.6)      Serial.println("FULL - cut the charger!");
  else if (v < 12.0) Serial.println("LOW - start charging");
  delay(2000);
}

❓ FAQ

Can I charge AGM or gel batteries with it?

AGM: yes, if you set the absorption voltage to ~14.4-14.7 V per the datasheet. Gel: not recommended with this simple charger — set ≤ 14.1 V and monitor closely, or use a dedicated gel profile.

What transformer should I use?

15–18 V AC at 3–4 A. After rectification and filtering you land inside the required 20–30 V DC window while keeping LM350 dissipation sane.

How do I set the output voltage?

No battery connected, multimeter on the output, turn R6 until you read 14.4 V. Use a multiturn pot for a stable, vibration-proof setting.

Why does the charger get hot even at low current?

Linear regulation wastes (VIN−VOUT)×I as heat. Lower the input voltage, improve the heatsink, or move to a switching (buck) charger for efficiency.

Close-up photo of a DIY 12V lead-acid battery charger on a workbench: LM350 regulator bolted to a large aluminum heatsink, BD140 transistor taped to a 12V lead-acid battery case, digital multimeter reading 14.4V, charging LED lit, warm workshop lighting, realistic electronics lab photo

🎯 Conclusion

This LM350 charger proves that "simple" doesn't mean "dumb": constant voltage, temperature compensation and reverse-discharge protection are exactly what a lead-acid battery asks for to live a long life. Build it, calibrate it at 14.4 V, bolt Q1 to the battery — and your batteries will thank you for years.

Built this charger or added the ESP32 monitor? Share your voltage logs in the comments — I read every single one!

📚 Read Next on TechFix Hub

Bottom Ad [Post Page]