Solar Bank Switch
Mixed-chemistry solar battery charger
A mixed-chemistry battery charging device powered by a single solar panel: one panel charges two different-chemistry banks (LiFePO4 + Li-ion), each through its own MPPT profile.
Task
Problem: one solar panel and two different-chemistry batteries (LiFePO4 + Li-ion), each requiring its own MPPT charging profile. Tested for 3 months on 2 batteries in a real-world deployment.
Hardware
MOSFET switch routing the panel input between two MPPT controllers, voltage monitoring of both batteries (ADS1115), panel voltage (ADC), current/power sensing (INA219/INA226 with auto-detect), SSD1306 OLED display, sealed CAD enclosure for potting compound with T-plug inputs/outputs.
Software
ESP32-C3, ESP-IDF, Embedded C, FreeRTOS, PlatformIO. Hysteresis governor with anti-chatter lockout, failsafe with blocking / emergency shutdown and auto-recovery, no-reflash tuning of thresholds and battery labels (USB Serial CLI + BLE UART NUS, NVS, status json), JSON telemetry, energy metering (Wh), GCC host tests.
Features
- Auto bank selection by voltage: hysteresis + anti-chatter lockout
- Failsafe: out-of-window blocking, emergency shutdown, auto-recovery
- Telemetry: 2x battery voltage, panel voltage, current/power, Wh counters, OLED
- No-reflash tuning via USB Serial CLI and BLE UART (NUS)
- Sealed enclosure with T-plug I/O, CAD model for potting