MPPT Testbench
The MPPT Testbench is our automated system for testing and optimizing MPPT converter hardware such as the LVSolarBuck. It orchestrates three precision bench instruments and a direct firmware link to the converter’s STM32G474, so a complete efficiency characterization runs unattended instead of taking hours of manual measurement.
- Source: git.b4l.co.th/B4L/mppt-testbench
- Background: blog posts Our Automated Test Bench is Live and LVSolarBuck Milestone: Full Power at 97.36% Efficiency
- In use: the charge controller test procedure behind the solar charge controller comparison
Hardware setup
Section titled “Hardware setup”The bench operates a star topology around the device under test:
| Device | Role | Interface |
|---|---|---|
| ITECH IT6500D-series DC supply (IT6537D and IT6532D in our lab) | Simulates the solar panel at configurable voltage/current setpoints | USB-TMC / SCPI via PyVISA |
| Prodigit 3366G electronic load (600 V / 420 A / 6 kW) | Absorbs output power in CC/CR/CV/CP modes | RS-232 at 115200 8N1 with RTS/CTS |
| HIOKI 3193-10 power analyzer | Measures input and output power simultaneously for the reference efficiency reading | GPIB via UsbGpib / PyVISA |
| STM32G474 (converter firmware) | Streams live telemetry and accepts parameter writes | Serial at 460800 baud |
Efficiency is computed as Pout / Pin on the HIOKI, which senses both sides through isolated voltage and current inputs. The STM32 debug link broadcasts CRC-framed telemetry at 100 Hz (flying capacitor voltage, temperatures, fault flags) and lets the bench write control parameters while a test is running.
Open-source instrument drivers
Section titled “Open-source instrument drivers”No open-source SCPI drivers existed for these instruments before this project, so we wrote and published them. They are usable standalone and are pulled into the testbench as git submodules:
| Repository | Description |
|---|---|
| IT6500D | SCPI driver for ITECH IT6500D series power supplies |
| PRODIGIT-3366G | SCPI driver for the Prodigit 3366G electronic load |
| HIOKI-3193-10 | SCPI driver for the HIOKI 3193-10 power analyzer |
Capabilities
Section titled “Capabilities”Measurement
Section titled “Measurement”- Single-shot or continuous monitoring with CSV export
- Real-time four-panel plots (power, efficiency, voltage, current) during runs
- 1D voltage sweeps and 2D input-voltage x load sweeps that produce a complete efficiency map of the converter across its operating range
- Shade and irradiance profile simulation replayed from CSV files
Converter tuning
Section titled “Converter tuning”- Automated parameter sweeps (dead-time, control gains, thresholds) with live HIOKI feedback, so firmware parameters are optimized against measured efficiency
- Live STM32 telemetry logged alongside instrument data during sweeps
- Thermal guard: pauses a sweep when heatsink or board temperatures approach the firmware trip limits (60 °C / 80 °C)
- Input-current guard: configurable supply ceiling with automatic step rejection
More than 40 firmware parameters are tunable over the serial link, covering flying capacitor (Vfly) control, the constant-current loop, MPPT step size and duty search bounds, dead-time scheduling, precharge, dithering, and ADC sampling timing.
Interfaces
Section titled “Interfaces”- CLI: scripted testing via
uv run bench ...commands - GUI (tkinter): real-time readouts, 2D sweep panel, live 100 Hz STM32 link, and automatic CSV logging
- Debug console (Textual TUI): parameter writes, keybound mode testing, and fault flag inspection
Installation
Section titled “Installation”Requirements: Python 3.12 or newer, the NI-VISA runtime, and uv.
git clone --recurse-submodules https://git.b4l.co.th/B4L/mppt-testbench.gitcd mppt-testbenchuv syncCore commands:
uv run bench identify # verify all instruments responduv run bench setup # configure the instruments for MPPT testinguv run bench sweep # 1D voltage sweep with efficiency logginguv run bench sweep-vi # 2D efficiency map (input voltage x load)uv run bench tune-param # parameter optimization with HIOKI feedbackuv run bench-gui # interactive control paneluv run bench-plot # offline analysis plots from logged CSVsData logging
Section titled “Data logging”- Sweep CSVs: setpoints plus supply/load voltage, current, and power, HIOKI input and output power, and computed efficiency per operating point
- GUI logs: instrument columns plus the latest STM32 snapshot per row (counter, flags, fault registers)
- Telemetry logs: the full 100 Hz broadcast, one row per update, with timestamps and computed power and efficiency
Results
Section titled “Results”The bench produced the measured (not simulated) efficiency data behind the LVSolarBuck development:
- At 60 V input, the LVSolarBuck reached 97.96% peak efficiency at 330 W and stayed above 97% across most of the operating range.
- At the designed full-power point (45 A into the 48 V bus at 120 V input, roughly 2.2 kW continuous), it measured 97.36% efficiency, with a mid-load peak above 98.3% at that input voltage.
Because every prototype revision gets the same automated characterization, efficiency data feeds directly back into design iteration and MPPT algorithm tuning, and the same procedures will carry over to future converters with minimal setup changes.