Rename CLI entry points from mppt/mppt-gui to bench/bench-gui
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
56
README.md
56
README.md
@@ -47,16 +47,16 @@ uv sync
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Check all bench instruments respond
|
# Check all bench instruments respond
|
||||||
uv run mppt identify
|
uv run bench identify
|
||||||
|
|
||||||
# Check STM32 responds (reads params + telemetry)
|
# Check STM32 responds (reads params + telemetry)
|
||||||
uv run mppt stm32-read --stm32-port COM28
|
uv run bench stm32-read --stm32-port COM28
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Configure instruments for MPPT testing
|
### 2. Configure instruments for MPPT testing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run mppt setup
|
uv run bench setup
|
||||||
```
|
```
|
||||||
|
|
||||||
This sets wiring mode (1P2W), DC coupling, auto-ranging, efficiency formula (EFF1 = P6/P5), and display layout on the HIOKI.
|
This sets wiring mode (1P2W), DC coupling, auto-ranging, efficiency formula (EFF1 = P6/P5), and display layout on the HIOKI.
|
||||||
@@ -65,16 +65,16 @@ This sets wiring mode (1P2W), DC coupling, auto-ranging, efficiency formula (EFF
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Single reading from all instruments
|
# Single reading from all instruments
|
||||||
uv run mppt measure
|
uv run bench measure
|
||||||
|
|
||||||
# Continuous text monitoring with CSV export
|
# Continuous text monitoring with CSV export
|
||||||
uv run mppt monitor --interval 1.0 --output data.csv
|
uv run bench monitor --interval 1.0 --output data.csv
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. Launch the GUI
|
### 4. Launch the GUI
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run mppt-gui
|
uv run bench-gui
|
||||||
```
|
```
|
||||||
|
|
||||||
The GUI provides:
|
The GUI provides:
|
||||||
@@ -92,7 +92,7 @@ The GUI provides:
|
|||||||
#### Voltage sweep (1D)
|
#### Voltage sweep (1D)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run mppt sweep \
|
uv run bench sweep \
|
||||||
--v-start 30 --v-stop 100 --v-step 5 \
|
--v-start 30 --v-stop 100 --v-step 5 \
|
||||||
--current-limit 20 \
|
--current-limit 20 \
|
||||||
--load-mode CP --load-value 200 \
|
--load-mode CP --load-value 200 \
|
||||||
@@ -102,7 +102,7 @@ uv run mppt sweep \
|
|||||||
#### Load sweep at fixed voltage (1D)
|
#### Load sweep at fixed voltage (1D)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run mppt sweep-load \
|
uv run bench sweep-load \
|
||||||
--voltage 60 --current-limit 20 \
|
--voltage 60 --current-limit 20 \
|
||||||
--i-start 0.5 --i-stop 15 --i-step 0.5 \
|
--i-start 0.5 --i-stop 15 --i-step 0.5 \
|
||||||
--settle 2.0 -o load_sweep.csv
|
--settle 2.0 -o load_sweep.csv
|
||||||
@@ -112,14 +112,14 @@ uv run mppt sweep-load \
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Constant Power mode
|
# Constant Power mode
|
||||||
uv run mppt sweep-vi \
|
uv run bench sweep-vi \
|
||||||
--v-start 60 --v-stop 100 --v-step 5 \
|
--v-start 60 --v-stop 100 --v-step 5 \
|
||||||
--l-start 50 --l-stop 500 --l-step 50 \
|
--l-start 50 --l-stop 500 --l-step 50 \
|
||||||
--load-mode CP --current-limit 20 \
|
--load-mode CP --current-limit 20 \
|
||||||
--settle 2.0 -o map_cp.csv
|
--settle 2.0 -o map_cp.csv
|
||||||
|
|
||||||
# Constant Current mode
|
# Constant Current mode
|
||||||
uv run mppt sweep-vi \
|
uv run bench sweep-vi \
|
||||||
--v-start 35 --v-stop 100 --v-step 5 \
|
--v-start 35 --v-stop 100 --v-step 5 \
|
||||||
--l-start 0.5 --l-stop 15 --l-step 0.5 \
|
--l-start 0.5 --l-stop 15 --l-step 0.5 \
|
||||||
--load-mode CC --current-limit 20 \
|
--load-mode CC --current-limit 20 \
|
||||||
@@ -130,10 +130,10 @@ uv run mppt sweep-vi \
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Generate efficiency overlay, heatmap, and power loss plots (no instruments needed)
|
# Generate efficiency overlay, heatmap, and power loss plots (no instruments needed)
|
||||||
uv run mppt plot-sweep map_cp.csv
|
uv run bench plot-sweep map_cp.csv
|
||||||
|
|
||||||
# Save plots without displaying
|
# Save plots without displaying
|
||||||
uv run mppt plot-sweep map_cp.csv --no-show -o plots/
|
uv run bench plot-sweep map_cp.csv --no-show -o plots/
|
||||||
```
|
```
|
||||||
|
|
||||||
Produces three PNG files:
|
Produces three PNG files:
|
||||||
@@ -148,13 +148,13 @@ The tuning commands combine the testbench instruments (ground truth efficiency f
|
|||||||
#### Read current STM32 state
|
#### Read current STM32 state
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run mppt stm32-read
|
uv run bench stm32-read
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Write a single parameter
|
#### Write a single parameter
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run mppt stm32-write --param dt_10_20A --value 20
|
uv run bench stm32-write --param dt_10_20A --value 20
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Sweep a parameter to find the optimum
|
#### Sweep a parameter to find the optimum
|
||||||
@@ -163,14 +163,14 @@ Sweeps a parameter from start to stop, measuring HIOKI efficiency + STM32 teleme
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Optimize deadtime for the 10-20A bracket at 300W
|
# Optimize deadtime for the 10-20A bracket at 300W
|
||||||
uv run mppt tune-param \
|
uv run bench tune-param \
|
||||||
--param dt_10_20A --start 14 --stop 40 --step 1 \
|
--param dt_10_20A --start 14 --stop 40 --step 1 \
|
||||||
--voltage 60 --current-limit 20 \
|
--voltage 60 --current-limit 20 \
|
||||||
--load-mode CP --load-value 300 \
|
--load-mode CP --load-value 300 \
|
||||||
--settle 3.0 -o dt_tune.csv
|
--settle 3.0 -o dt_tune.csv
|
||||||
|
|
||||||
# Tune Vfly proportional gain
|
# Tune Vfly proportional gain
|
||||||
uv run mppt tune-param \
|
uv run bench tune-param \
|
||||||
--param vfly_kp --start -2 --stop 2 --step 0.1 \
|
--param vfly_kp --start -2 --stop 2 --step 0.1 \
|
||||||
--voltage 60 --current-limit 20 \
|
--voltage 60 --current-limit 20 \
|
||||||
--load-mode CP --load-value 200 \
|
--load-mode CP --load-value 200 \
|
||||||
@@ -183,13 +183,13 @@ Automatically sweeps deadtime for each of the 6 current brackets (0-3A, 3-5A, 5-
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Sweep and report best values
|
# Sweep and report best values
|
||||||
uv run mppt tune-deadtime \
|
uv run bench tune-deadtime \
|
||||||
--voltage 60 --current-limit 20 --load-mode CP \
|
--voltage 60 --current-limit 20 --load-mode CP \
|
||||||
--dt-start 14 --dt-stop 50 --dt-step 1 \
|
--dt-start 14 --dt-stop 50 --dt-step 1 \
|
||||||
-o deadtime_results.csv
|
-o deadtime_results.csv
|
||||||
|
|
||||||
# Sweep, report, and apply best values to STM32
|
# Sweep, report, and apply best values to STM32
|
||||||
uv run mppt tune-deadtime \
|
uv run bench tune-deadtime \
|
||||||
--voltage 60 --current-limit 20 --load-mode CP \
|
--voltage 60 --current-limit 20 --load-mode CP \
|
||||||
--load-values 20,50,100,250,400,600 \
|
--load-values 20,50,100,250,400,600 \
|
||||||
--apply
|
--apply
|
||||||
@@ -200,7 +200,7 @@ uv run mppt tune-deadtime \
|
|||||||
Simulate cloud passing or partial shading with a CSV-driven sequence:
|
Simulate cloud passing or partial shading with a CSV-driven sequence:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run mppt shade-profile \
|
uv run bench shade-profile \
|
||||||
--profile samples/cloud_pass.csv \
|
--profile samples/cloud_pass.csv \
|
||||||
--settle 2.0 -o shade_results.csv
|
--settle 2.0 -o shade_results.csv
|
||||||
```
|
```
|
||||||
@@ -222,23 +222,23 @@ Keybindings: `p` ping, `r` read params, `f` toggle EMA filter, `l` show log path
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Supply
|
# Supply
|
||||||
uv run mppt supply set --voltage 48 --current 10
|
uv run bench supply set --voltage 48 --current 10
|
||||||
uv run mppt supply on
|
uv run bench supply on
|
||||||
uv run mppt supply off
|
uv run bench supply off
|
||||||
|
|
||||||
# Load
|
# Load
|
||||||
uv run mppt load set --mode CP --value 200
|
uv run bench load set --mode CP --value 200
|
||||||
uv run mppt load on
|
uv run bench load on
|
||||||
uv run mppt load off
|
uv run bench load off
|
||||||
|
|
||||||
# Emergency shutdown (load first, then supply)
|
# Emergency shutdown (load first, then supply)
|
||||||
uv run mppt safe-off
|
uv run bench safe-off
|
||||||
```
|
```
|
||||||
|
|
||||||
## CLI Reference
|
## CLI Reference
|
||||||
|
|
||||||
```
|
```
|
||||||
uv run mppt [-h] [--supply-address ADDR] [--load-port PORT] [--load-baud BAUD]
|
uv run bench [-h] [--supply-address ADDR] [--load-port PORT] [--load-baud BAUD]
|
||||||
[--meter-address ADDR] [--timeout MS]
|
[--meter-address ADDR] [--timeout MS]
|
||||||
[--stm32-port PORT] [--stm32-baud BAUD]
|
[--stm32-port PORT] [--stm32-baud BAUD]
|
||||||
{command}
|
{command}
|
||||||
@@ -337,7 +337,7 @@ mppt-testbench/
|
|||||||
| +-- debug_console/ Textual TUI for live debugging
|
| +-- debug_console/ Textual TUI for live debugging
|
||||||
| +-- pyproject.toml uv-compatible package config
|
| +-- pyproject.toml uv-compatible package config
|
||||||
+-- samples/ shade profile CSV examples
|
+-- samples/ shade profile CSV examples
|
||||||
+-- pyproject.toml package config, entry points: mppt, mppt-gui
|
+-- pyproject.toml package config, entry points: bench, bench-gui
|
||||||
```
|
```
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ packages = ["testbench"]
|
|||||||
"HIOKI-3193-10/hioki3193" = "hioki3193"
|
"HIOKI-3193-10/hioki3193" = "hioki3193"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
mppt = "testbench.cli:main"
|
bench = "testbench.cli:main"
|
||||||
mppt-gui = "testbench.gui:main"
|
bench-gui = "testbench.gui:main"
|
||||||
|
|||||||
Reference in New Issue
Block a user