Skip to content

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.

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.

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
  • 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
  • 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.

  1. CLI: scripted testing via uv run bench ... commands
  2. GUI (tkinter): real-time readouts, 2D sweep panel, live 100 Hz STM32 link, and automatic CSV logging
  3. Debug console (Textual TUI): parameter writes, keybound mode testing, and fault flag inspection

Requirements: Python 3.12 or newer, the NI-VISA runtime, and uv.

Terminal window
git clone --recurse-submodules https://git.b4l.co.th/B4L/mppt-testbench.git
cd mppt-testbench
uv sync

Core commands:

Terminal window
uv run bench identify # verify all instruments respond
uv run bench setup # configure the instruments for MPPT testing
uv run bench sweep # 1D voltage sweep with efficiency logging
uv run bench sweep-vi # 2D efficiency map (input voltage x load)
uv run bench tune-param # parameter optimization with HIOKI feedback
uv run bench-gui # interactive control panel
uv run bench-plot # offline analysis plots from logged CSVs
  • 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

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.