Design review request — what went wrong with my Li-ion UPS board? (built but non-functional)

Thread Starter

Bilal01-e

Joined May 8, 2026
1
Hi everyone,
I'm hoping someone with fresh eyes can help me understand where I went wrong on this board. I've been debugging it for three months and I'm clearly missing something. I'd really appreciate the help — I want to learn from this mistake before I move on to the next design.
Context: The board is a small UPS for an ESP32-based monitoring device that watches circuit breaker auxiliary contacts and a phase relay inside an electrical panel. Because the device's whole job is to detect mains power loss, it absolutely cannot lose power itself during an outage — it needs true UPS behavior with seamless transition between mains and battery.
The proven prototype (works perfectly): Before designing the PCB, my client built a hand-soldered version using off-the-shelf hobby modules, and it has been bulletproof in the field. The architecture is:

3S BMS module: External 3S 10A BMS connected via B+/B−/B1/B2/P1/P2 headers
Three 18650 Li-ion cells in 3S configuration (nominal 11.1V, ~12.6V fully charged), held in a BAT-3C 3-cell holder
CC/CV charger module: Built around a LM358PWR dual op-amp (U3) with adjustable CC and CV via 10 kΩ trimmer potentiometers (R CC-ADJ and R CV-ADJ), a 330pF timing capacitor (C4), and a CH-LED charge indicator (100 kΩ series resistor R CH-LED)
5V buck regulator on the output to power the ESP32: LM2596S-ADJ/NOPB (U2) with a CDRH104RNP-331NC 330µH inductor (L2), SS54 output diode (D2out), CAPA-220 output capacitor (Cout2), and a voltage divider feedback network (Rhaut2 = 3.09 kΩ, Rbat2 = 1 kΩ)
Two Schottky diodes — ES3AB-13-F (Din and Dbat) — used to OR the input source with the battery output, so the load can run directly from the input while charging — this is what gives the seamless UPS behavior
Any voltage drop or mains issue is covered cleanly by the batteries. Zero brownouts in field deployment.

What I tried to do: Consolidate that exact proven architecture into a single PCB — same parts, same topology, just integrated onto one board instead of wired modules. The charger stage uses a LM2596S-ADJ/NOPB (U1) buck regulator with a CDRH104RNP-331NC inductor (L1), SS54 output diode (D1out), CAPA-220 filter capacitors (Cin1, Cout1), and a 470 Ω feedback resistor (Rbat1). Input protection is handled by an M4 rectifier diode (D1) and a PJ-102AH barrel jack (J1). A 78L05/LM7805-1 linear regulator provides the 5V rail for the control circuitry, with a 0.1µF bypass capacitor (C3) and a 1 kΩ resistor (R3). I ordered the boards from JLCPCB based on my schematic and layout.

-The problem: The board has three observed issues:

Inductor L1 overheating: When the input voltage is around 12.6V everything seems fine, but when the input voltage is around 20V and the batteries are discharged, the inductor L1 (CDRH104RNP-331NC, 330µH) gets extremely hot — hot enough that it feels like it could burn. I don't understand why this is happening. The LM2596S should be regulating the output regardless of input voltage within its range, but something is causing excessive current or duty cycle through L1 at higher input voltages.

CC-ADJ potentiometer has no effect: The trimmer potentiometer used for CC-ADJ (R CC-ADJ, 10 kΩ) appears to be malfunctioning — turning it has absolutely no effect on the output.

Charge status LEDs not working correctly: The charge and discharge indicator LEDs (CH and OK) don't behave the way I expected — they don't correctly indicate when the batteries are charging versus when they are fully charged, unlike the reference module behavior I was trying to replicate.

- What I've already checked:

Verified the CV ADJ trimmer (R CV-ADJ, 10 kΩ) output voltage setting
Verified battery charge and discharge behavior at the BMS connector (B+/B−/B1/B2/P1/P2)
Checked the LED indicators — the CH and OK LEDs do not work like the reference module (no correct charge/full indication)

- Things I'm wondering if I got wrong:

Maybe I didn't replicate the input/output capacitors that were already present on the hobby modules — when you integrate a chip directly (LM2596S-ADJ), you need to add the bypass network the module had built in, and I'm not sure I did that correctly (Cin1/Cout1 are CAPA-220 electrolytics but I may be missing ceramic bypass caps)
Maybe the CDRH104RNP-331NC inductor (330µH) is not the right value for the LM2596S at higher input voltages — at 20V input with a discharged 3S pack (~9V output), the duty cycle is very low and peak inductor current could be much higher than at 12.6V input
Maybe the trace widths aren't sufficient for the charge/discharge currents through L1 and the BMS connectors
Maybe my ground return paths are creating loops, especially around the shunt resistors (R shunt / R0, both 0 Ω)
Maybe the ES3AB-13-F Schottky diode placement or orientation on Din/Dbat is causing reverse leakage I didn't expect
Maybe my component substitutions (especially the SS54 for D1out/D2out) weren't actually equivalent in terms of forward voltage and reverse recovery
Maybe I missed something about what external components the BMS protection circuit needs beyond the B+/B−/B1/B2 connections

Honestly, I don't know what I don't know, which is why I'm posting here. The discrete-module version proves the architecture works — so the mistake has to be in how I translated it to a PCB. Any pointers would be hugely appreciated.
Thanks for taking the time to look.

Capture d’écran 2026-05-07 115610.pngCapture d’écran 2026-05-07 115653.pngCapture d'écran 2026-05-08 132623.png
 
Top