Community project

Multi-Rail Battery Power Board

Badis Bouchama

Published July 25, 2026 · Updated July 25, 2026

ESP3222 components7 assembly steps
Remix this project
Photo of Multi-Rail Battery Power Board

The Multi-Rail Battery Power Board is a comprehensive power distribution system built around the TI BQ25798 buck-boost charger, delivering regulated 5 V and 3.3 V rails from a 12 V Li-ion battery pack while managing field input, reverse polarity protection, and thermal monitoring. An ESP32-S3 controller monitors charger status and battery health via I2C telemetry, enabling intelligent power sequencing and fault detection across the entire system.

This guide provides a complete wiring diagram, detailed parts list, staged assembly instructions, and controller firmware to build a robust multi-rail UPS suitable for remote or mission-critical applications. Readers will learn how to integrate battery charging, ideal-diode protection, pre-regulation, and dual buck converters into a single cohesive power architecture, with step-by-step power-up procedures and diagnostic test points for validation.

Wiring diagram

Interactive · read-only
Wiring diagram for Multi-Rail Battery Power Board

Pan and zoom to explore the wiring. Remix the project to edit it in your own workspace.

Parts list

Bill of materials
ComponentQtyNotes
TI BQ25798 NVDC Buck-Boost Battery Charger / Power PathBQ2579813S NVDC charger and uninterrupted power-path controller. J10 exports 3.3 V I2C, INT, PG/STAT, and active-low charge enable to the off-board ESP32 controller.
7 A Input Protection and EMI Filter7 A / 36 V max input block1Field-input fuse, surge/EMI protection and filtering for 9–36 V DC. The 7 A fuse is a protection component, not a 90 W-at-9 V rating claim; final fuse curve, harness and thermal validation are required.
SGM25730 Ideal-Diode Reverse-Polarity StageSGM25730 + AON65121SGM25730 ideal-diode controller with AON6512 N-channel MOSFET, creating the low-loss reverse-polarity protection stage after the EMI filter.
SC8701 18 V Pre-Regulator18 V regulated output1Southchip SC8701 synchronous buck-boost pre-regulator. Receives the protected 9–36 V field input and provides a regulated 18 V charger-input rail. Inductor, compensation network, switching capacitors, and programmed current limit require verification from the selected SC8701 datasheet/reference design before PCB release.
12 V Rechargeable Li-ion Battery Pack with Built-In BMS3S1P 18650, 3.5 Ah, 11.1 V nominal, BMS; 5 A continuous / 10 A pulse discharge; 3 A max charge1User-specified 3S1P pack: three 18650 3500 mAh cells, 11.1 V nominal / 12.6 V charge cutoff, 8.25 V ±1 V discharge cutoff. Built-in BMS is specified to protect against overcharge, over-discharge, over-current, and external short circuit. Limits: 5 A continuous discharge, 10 A pulse discharge, 3 A maximum charge. Pack size 70 × 38 × 38 mm; mass 188 g. The BQ25798 configuration must remain at or below 4.5 A continuous battery discharge and 3 A charge, subject to final pack/BMS and thermal validation.
SGM6132 5.0 V / 3 A Buck Rail5.0 V / 3 A1U3 downstream buck regulator providing the 5 V auxiliary rail for the display supply and isolated-interface converters. Final inductor, feedback resistors, input/output capacitors, thermal layout, and load-current budget must follow the verified SGM6132 application circuit.
SGM6132 3.3 V / 3 A Logic Buck Rail3.3 V / 3 A1U5 downstream buck regulator providing the board’s 3.3 V logic rail. It feeds the downstream controller board, storage/network logic and low-voltage interface side; the detachable ESP32-S3 service board remains USB powered during bring-up.
5 V Auxiliary Rail Distribution5.0 V / 3 A1Board output distribution for the 5.0 V / 3 A auxiliary rail. It feeds external display and isolated-interface assemblies, which are intentionally outside this power-board project.
3.3 V Logic Rail Distribution3.3 V / 3 A1Board output distribution for the downstream 3.3 V logic domain: separate controller board, MicroSD, W5500 logic, RTC, ADM2483 logic side, and SGM4553 VCCA. Those loads remain outside this power-board project.
J1 Field Input Terminal2-pin 3.81 mm, 10 A12-pin 3.81 mm locking terminal block, 10 A rated. Field 12–24 V DC input connector.
J2A Battery Connector2-pin JST XH, 2.54 mm12-pin JST XH battery power connector for protected 3S Li-ion pack leads.
J2B Battery NTC Connector2-pin JST PH, 2.0 mm12-pin JST PH connector for the 10 kΩ NTC lead from the 3S battery pack to BQ25798 TS.
J3 Universal Power Distribution Connector6-position 2.54 mm connector; parallel SYS_BUS/GND contacts1Six-position distribution interface: 5 V, two parallel SYS_BUS contacts, 3.3 V, and two parallel ground contacts. SYS_BUS is the battery-backed 3S-class rail only (8.25–12.6 V), never 18 V. Parallel-contact current sharing requires final connector, terminal, harness, and PCB-copper validation.
J10 Telemetry and Control Harness7-position 2.54 mm telemetry/control connector1Seven-position 3.3 V telemetry/control interface for the external controller. It intentionally contains no cellular or filament PWM signals.
J10 ESD, Backfeed and Signal ProtectionB130WS-class blocking stage + ESD arrays + I2C pull-ups + 3×470 ohm1Protection and bias boundary for the seven-pin telemetry/control harness: diode-isolated 3.3 V output, ESD protection, local I2C pull-ups, and 470 ohm series protection on INT, STAT, and CE. No filament PWM paths are included.
Universal UPS Bring-Up Test Point and Grounding Provision SetTP1–TP7 + 4× grounded M3 mounting holes1Top-side SMD test pads for protected field input, 18V_PRE, SYS_BUS, 5V_AUX, 3V3_LOGIC, ground, and SC8701 switching node, plus four grounded M3 mounting holes. GSM/cellular test points are intentionally omitted.
Five-Rail Hardware Diagnostic LED Bank5×0603 LED plus five series resistors1Five 0603 rail-presence indicators for VIN_FIELD, 18V_PRE, SYS_BUS, 5V_AUX, and 3V3_LOGIC. Each LED includes its own correctly rated series resistor; values are selected during schematic capture for the rail voltage and desired indicator current.
Resistor10 kΩ, 0805, ≥0.25 W1Through-hole resistor (current-limiting in series with an LED)
Resistor8.2 kΩ, 0805, ≥0.125 W1Through-hole resistor (current-limiting in series with an LED)
Resistor4.7 kΩ, 0805, ≥0.125 W1Through-hole resistor (current-limiting in series with an LED)
Resistor1.5 kΩ, 0805, ≥0.125 W1Through-hole resistor (current-limiting in series with an LED)
Resistor680 Ω, 0805, ≥0.125 W1Through-hole resistor (current-limiting in series with an LED)

Assembly

7 steps
  1. Confirm the separated project scope

    Build this board only for the 3S UPS, 5 V rail, 3.3 V rail, J3 distribution, and J10 telemetry/control functions. Do not fit cellular-modem power parts, filament LED driver parts, PWM wiring, or a PCB-mounted master switch in this revision.

    • Tip: Keep the 18V_PRE and SYS_BUS labels distinct throughout schematic capture and assembly.
    • 18V_PRE is mains-only charger input. SYS_BUS is the battery-backed 8.25–12.6 V rail; never connect 18 V to J3 SYS_BUS.
  2. Install and inspect the field-input path

    Fit J1, the input-protection/EMI stage, ideal-diode stage, and SC8701 pre-regulator in power-flow order. Observe polarized TVS, electrolytic capacitors, MOSFET orientation, and all inductor markings.

    • Tip: Keep high-current and switching loops short during PCB layout and verify all footprints against final manufacturer data.
    • Do not energize the board until the final input fuse, field wiring, and connector ratings are reconciled with the chosen input range and power rating.
  3. Install the battery and charger section

    Fit the BQ25798 support circuit exactly from the verified reference design. Connect J2A directly to the protected 3S1P 18650 battery pack: PACK+ to BAT+ and PACK- to BAT-. The specified pack is 3.5 Ah, 11.1 V nominal, 12.6 V charge cutoff, 5 A continuous discharge, 10 A pulse discharge, and 3 A maximum charge, with a built-in BMS. Connect J2B only if the pack provides the required 10 kΩ NTC lead.

    • Tip: Check battery and NTC connector pin order before attachment.
    • Tip: Keep BQ25798 battery-discharge configuration at or below the pack’s 5 A continuous rating; the current architecture target remains 4.5 A continuous.
    • Tip: There is no battery kill jumper or PCB battery-disconnect jumper in this revision.
    • Never short BAT+ to ground.
    • Do not exceed the specified 3 A maximum battery charge current without an actual pack/cell manufacturer approval and thermal validation.
    • The supplied pack specification must be confirmed against the exact purchased pack and its wiring before use.
  4. Install the downstream rails and J3

    Fit the 5 V and 3.3 V buck stages and connect them to J3. J3 pins 2 and 3 are parallel SYS_BUS contacts; pins 5 and 6 are parallel returns.

    • Tip: Use matched harness conductors and verify terminal/current derating before relying on the parallel contacts for high current.
    • Do not inject external power into J3 rails without a separately reviewed power-path design.
  5. Install J10 protection and controller harness

    Fit the J10 protection/bias network and connect the seven-pin harness: 3.3 V, GND, SDA, SCL, BQ_INT, BQ_STAT, BQ_CE. Connect it to the external ESP32-S3 controller only after pin order is checked end-to-end.

    • Tip: The controller firmware keeps BQ_INT and BQ_STAT high impedance with no internal pull-ups.
    • Do not connect legacy 10-pin PWM/cellular harnesses to this seven-pin interface.
  6. Fit diagnostics and test pads

    Fit the five rail-present LEDs with one dedicated series resistor per LED: LED1 VIN_OK uses led_r_vin_1 (10 kΩ, 0805, at least 0.25 W); LED2 18V_PRE_OK uses led_r_18v_1 (8.2 kΩ); LED3 SYS_BUS_OK uses led_r_sys_1 (4.7 kΩ); LED4 5V_OK uses led_r_5v_1 (1.5 kΩ); and LED5 3V3_OK uses led_r_3v3_1 (680 Ω). Fit TP1–TP7 and the grounded M3 mounting provisions.

    • Tip: LED1’s 10 kΩ resistor is sized for the field-input domain and must be at least 0.25 W at a 36 V input.
    • Tip: Keep every resistor physically in series between its named rail and the corresponding LED-bank input.
    • Do not substitute one common resistor value across 3.3 V, 5 V, 12.6 V, 18 V, and field-input rails.
    • Confirm LED polarity and the selected LED forward voltage before fabrication.
  7. Perform staged power-up

    Begin with a current-limited field supply and no battery. Verify VIN_FIELD, 18V_PRE, SYS_BUS, 5V_AUX, and 3V3_LOGIC at the labeled test pads. Then add the battery, verify charge behavior and seamless field-loss operation, and finally attach intended J3/J10 loads.

    • Tip: Record input current, rail voltages, temperature, and BQ25798 status at each stage.
    • Do not claim 90 W operation until the final fuse, input wiring, thermal behavior, BQ25798 configuration, and load/charge allocation have been validated.

Pin assignments

Board wiring reference
PinConnectionType
EXTj1_field_terminal VIN+7 A Input Protection and EMI Filter VINpower
GNDj1_field_terminal GND-ground
EXTinput_protection_1 VPROTSGM25730 Ideal-Diode Reverse-Polarity Stage VINpower
GNDinput_protection_1 GNDground
EXTideal_diode_1 VOUTSC8701 18 V Pre-Regulator VINpower
GNDideal_diode_1 GNDground
EXTpreregulator_1 VOUTTI BQ25798 NVDC Buck-Boost Battery Charger / Power Path VBUSpower
GNDpreregulator_1 GNDground
EXTbattery_3s_1 PACK+J2A Battery Connector BAT+power
EXTbattery_3s_1 PACK-J2A Battery Connector BAT-ground
EXTj2a_battery BAT+TI BQ25798 NVDC Buck-Boost Battery Charger / Power Path BATpower
GNDj2a_battery BAT-ground
EXTj2b_ntc NTC_TSTI BQ25798 NVDC Buck-Boost Battery Charger / Power Path TSanalog
GNDj2b_ntc NTC_GNDground
GNDbq25798_1 GNDground
EXTbq25798_1 SDAJ10 ESD, Backfeed and Signal Protection SDA_BQi2c
EXTj10_interface_protection_1 SDA_J10J10 Telemetry and Control Harness I2C_SDAi2c
EXTbq25798_1 SCLJ10 ESD, Backfeed and Signal Protection SCL_BQi2c
EXTj10_interface_protection_1 SCL_J10J10 Telemetry and Control Harness I2C_SCLi2c
EXTbq25798_1 INTJ10 ESD, Backfeed and Signal Protection INT_BQdigital
EXTj10_interface_protection_1 INT_J10J10 Telemetry and Control Harness BQ_INTdigital
EXTbq25798_1 PGJ10 ESD, Backfeed and Signal Protection STAT_BQdigital
EXTj10_interface_protection_1 STAT_J10J10 Telemetry and Control Harness BQ_STATdigital
EXTj10_telemetry BQ_CEJ10 ESD, Backfeed and Signal Protection CE_J10digital
EXTj10_interface_protection_1 CE_BQTI BQ25798 NVDC Buck-Boost Battery Charger / Power Path CEdigital
EXTbq25798_1 SYSSGM6132 5.0 V / 3 A Buck Rail VINpower
EXTbq25798_1 SYSSGM6132 3.3 V / 3 A Logic Buck Rail VINpower
EXTbq25798_1 SYSJ3 Universal Power Distribution Connector SYS_BUS_Apower
EXTbq25798_1 SYSJ3 Universal Power Distribution Connector SYS_BUS_Bpower
EXTbuck_5v_1 VOUT5 V Auxiliary Rail Distribution VINpower
GNDbuck_5v_1 GNDground
EXTrail_5v_output_1 VINJ3 Universal Power Distribution Connector 5V_AUXpower
GNDrail_5v_output_1 GNDground
EXTbuck_logic_1 VOUT3.3 V Logic Rail Distribution VINpower
EXTbuck_logic_1 VOUTJ10 ESD, Backfeed and Signal Protection 3V3_INpower
GNDbuck_logic_1 GNDground
EXTrail_logic_output_1 VINJ3 Universal Power Distribution Connector 3V3_LOGICpower
GNDrail_logic_output_1 GNDground
EXTj10_interface_protection_1 3V3_J10J10 Telemetry and Control Harness 3V3_LOGICpower
GNDj10_interface_protection_1 GNDground
GNDj10_telemetry GNDground
GNDj3_distribution GND_Aground
GNDj3_distribution GND_Bground
EXTled_r_vin_1 P17 A Input Protection and EMI Filter VINdigital
EXTled_r_vin_1 P2Five-Rail Hardware Diagnostic LED Bank VIN_FIELDdigital
EXTled_r_18v_1 P1SC8701 18 V Pre-Regulator VOUTdigital
EXTled_r_18v_1 P2Five-Rail Hardware Diagnostic LED Bank PRE_18Vdigital
EXTled_r_sys_1 P1TI BQ25798 NVDC Buck-Boost Battery Charger / Power Path SYSdigital
EXTled_r_sys_1 P2Five-Rail Hardware Diagnostic LED Bank SYS_BUSdigital
EXTled_r_5v_1 P1SGM6132 5.0 V / 3 A Buck Rail VOUTdigital
EXTled_r_5v_1 P2Five-Rail Hardware Diagnostic LED Bank AUX_5Vdigital
EXTled_r_3v3_1 P1SGM6132 3.3 V / 3 A Logic Buck Rail VOUTdigital
EXTled_r_3v3_1 P2Five-Rail Hardware Diagnostic LED Bank LOGIC_3V3digital
GNDdiagnostic_leds_1 GNDground

Firmware

ESP32
main.cppDeploy to device
/*
  External ESP32-S3 controller for the Universal 3S UPS Power Board.
  J10 is a seven-pin telemetry/control harness only:
  3.3 V, GND, SDA, SCL, BQ_INT, BQ_STAT, BQ_CE.
  Cellular and filament-control functions are intentionally deferred to
  separate dedicated-power projects.
*/
#include <Arduino.h>
#include <Wire.h>

constexpr int I2C_SDA_PIN = 8;
constexpr int I2C_SCL_PIN = 9;
constexpr int BQ_INT_PIN = 4;
constexpr int BQ_STAT_PIN = 5;
constexpr int BQ_CE_PIN = 6;

void setup() {
  Serial.begin(115200);
  Wire.begin(I2C_SDA_PIN, I2C_SCL_PIN);

  // No MCU pull-ups: a USB-powered controller must not source the unpowered
  // power board through J10. Final line bias resides on the power board.
  pinMode(BQ_INT_PIN, INPUT);
  pinMode(BQ_STAT_PIN, INPUT);
  pinMode(BQ_CE_PIN, INPUT); // Leave CE high impedance until commanded.
}

void loop() {
  Serial.print("BQ_INT=");
  Serial.print(digitalRead(BQ_INT_PIN) == LOW ? "active" : "idle");
  Serial.print("  BQ_STAT=");
  Serial.println(digitalRead(BQ_STAT_PIN) == LOW ? "active" : "idle");
  delay(1000);
}

“Deploy to device” opens this project in Schematik, where you can flash it to your board over USB.

Remix this project

Make it yours in one click

Open a full copy of this project in your own Schematik workspace — diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.

Open in Schematik