board
Solar MPPT Power System
Public Unreviewedby TylerK
A 30 W solar battery charger with regulated 5 V and 3.3 V rails: an STM32G031 running perturb & observe MPPT and a CC/CV charge state machine, steering a TI LM5175 4-switch buck-boost through a single analog control input. Four-layer KiCad board, schematic and PCB generated from Python, with an electrothermal simulation run against the published board file.
← Commit history
Delete docs/05-comparison-vs-old-board.md
1 file changed
−119
docs/05-comparison-vs-old-board.mddeleted−119@@ -1,119 +0,0 @@-# MCU/IC Board vs. the Original Discrete-Analog Board--Both boards solve the same problem — a single 6-24V, ≤30W solar panel-charging a 12V SLA/AGM battery (14.2V CV) plus regulated 5V/2A and 3.3V/1A-outputs — with deliberately different design philosophies. Neither is-strictly "better"; they represent a real, common engineering trade-off.--## Side-by-side--| | Old board (discrete-analog) | New board (MCU/IC) |-|---|---|---|-| Charge-stage topology | Buck-only | Buck-boost (LM5175, 4-switch) |-| MPPT method | Fixed fractional-Voc divider | Adaptive P&O in firmware |-| CC/CV control | 3 analog error amps, diode-OR combined | Digital arbitration (most-restrictive-wins) |-| Reverse-polarity protection | Self-biased P-FET | Active ideal-diode (LM74700 + N-FET) |-| POL regulators | Discrete buck (5V) + LM317 linear (3.3V) | Integrated synchronous bucks (both rails) |-| Current sensing | LM324 diff-amp off a shunt | INA180 fixed-gain current-sense ICs |-| Control ICs used | 0 (LM324/LM393/TL431/NE555, all generic) | 7 (LM5175, 2x INA180, LM74700, TPS62130, TLV62569, LM5165) + MCU |-| MCU | None | STM32G031F8Px |-| Component count | 45 references (~150 parts) | 102 references |-| Board size | 250mm x 160mm (40,000 mm²) | 195mm x 135mm (26,325 mm²) |-| Layers | 4 (solid GND plane) | 4 (solid GND plane) |-| Routing | 776 track segments, 150 vias, 58 nets | ~2,300 track segments, ~250 vias, 60 nets |-| DRC status at handoff | 0 errors, 66 cosmetic warnings | rev 2: 0 different-net electrical defects, 0 mechanical defects, 13 unconnected items, 86 cosmetic (see the PCB layout review) |-| Input voltage range that actually charges the battery | Requires Vin ≳ 15-16V (buck-only headroom limit) | Full 6-24V range (buck-boost) |--## What genuinely changed, and why it matters--**Buck-boost vs. buck-only** is the single biggest functional upgrade. The-old board's own docs are explicit that its buck-only topology cannot-charge below roughly 15-16V input, "regardless of topology" for a-buck-derived stage — a real, stated limitation of that design, not an-oversight. The new board's LM5175 stage removes that floor entirely,-extracting usable charge current across the full 6-24V panel range,-including low-light conditions the old board simply cannot serve.--**Adaptive P&O vs. fixed-setpoint MPPT** is the second real functional-delta. The old board approximates the panel's maximum-power point with a-fixed fractional-Voc resistor divider — a reasonable low-parts-count-approximation, but one that doesn't adapt to temperature, irradiance, or-panel aging the way a real perturb-and-observe loop does. The new board-runs actual P&O in firmware (see `mppt-mcu-firmware/`), at the cost of-needing an MCU and firmware validation at all.--**Fewer conduction losses in two places**: the LM74700 active ideal-diode-stage has substantially lower forward drop than the old board's self-biased-P-FET at comparable current, and the integrated synchronous POL bucks-avoid the old board's 3.3V linear-regulator dissipation entirely (the old-board's own docs calculate that dissipation as small in absolute terms,-1.7W, but it's a real efficiency cost the new board doesn't pay).--## What genuinely got harder--**Layout density.** More than double the component count on a smaller-board means three genuinely fine-pitch ICs (LM5175 HTSSOP-28 at 0.65mm-pitch, the STM32 TSSOP-20, both POL bucks' SOT-563 packages at 0.5mm-pitch) that the old board's THT-and-generous-SOIC construction simply-didn't have to contend with. The PCB layout review documents this-concretely: a custom autorouter built for this project (no equivalent-capability existed as a ready-made tool) hit real capacity limits routing-through these pin fields. Rev 2 resolved that in the safe direction: the-routed copper is now clearance-clean and mechanically clean, at the cost of-13 unconnected fine-pitch escapes, where rev 1 had full connectivity but 86-genuine shorts and 150 genuine clearance violations. The old board, with no-fine-pitch parts to contend with, reached 0 DRC errors *and* full-connectivity outright.--**Firmware is now a dependency.** The old board has zero firmware risk —-every control function is a fixed analog circuit, verifiable entirely on-paper and bench. The new board's MPPT, CC/CV, and even basic output-regulation now depend on firmware that has been written and manually-reviewed but **not build-or-flash-tested** (no STM32 toolchain available in-this environment) — a real, stated gap the old board never had.--**A design bug that a discrete-analog board's simplicity would have made-obvious sooner:** the LM5175's FB summing-node resistor network was-initially specified with values that could only reach a 10.28V ceiling —-never enough to hit the 14.2V CV target under any firmware command. Caught-during firmware bring-up by solving the actual node equation, not by-schematic inspection. It's a fair observation that a three-op-amp analog-error-amp network (the old board's approach) makes this class of "does the-math actually reach the target" error more visually obvious at schematic-review time than a single summing-node equation buried in a mixed digital/-analog loop — worth keeping in mind as a general lesson from this-comparison, independent of which board is "better."--## When you'd actually pick each one--**Old board** if: firmware risk is unacceptable (safety-critical, no-programming/debug capability in the field), the installation's minimum-panel voltage reliably stays above ~16V, board real-estate is not-constrained, or the goal is a design that's fully verifiable by hand-calculation and bench measurement alone.--**New board** if: the panel needs to keep charging across a wide voltage-swing (partial shading, morning/evening low-angle light, a smaller or-higher-Voc panel than originally assumed), genuine MPPT efficiency gains-over a fixed-setpoint approximation matter for the specific site, or board-size / BOM efficiency (fewer discrete op-amp/comparator/timer packages,-even though total reference count is higher) is a priority.--## Open items carried by the new board, not present on the old one--1. Firmware build/flash/bench validation (no toolchain available here).-2. Independent re-derivation of the LM5175 VOSNS overvoltage threshold- (R16/R17) against the real datasheet.-3. A manual DRC clearance pass around the three fine-pitch ICs before- fabrication.-4. No direct panel-voltage (VIN) ADC channel — MPPT tracks charge current- as an accepted proxy for extracted panel power; a future revision could- add a VIN divider on an already-unused MCU pin for true P×V tracking.--## Open items shared by both boards, unchanged--1. Real panel Voc and its temperature coefficient (both boards' input- protection component ratings assume a 30V worst case pending the actual- panel datasheet).-2. Battery chemistry confirmed as SLA/AGM (14.2V CV) — a different- chemistry would shift this setpoint on both boards.