How the IV sweep works
The measurement principle behind every Voc, Isc and Vop/Iop reading this dashboard shows for PV1–PV6: the shared circuit, the relay sequence, and how a wireless link between two boards turns a simple on/off relay into a curve tracer.
- Hardware
- ECM50 controller + LILYGO T-Relay-S3 × 3
- Panels
- PV1–PV6
- Scope
- measurement principle, not a source listing
- Updated
- 2026-10-23 (ECM50 v2.7.0, T-Relay v1.0.4)
1System overview
Four physical pieces, one of which is shared by all six panels. That shared piece shapes everything else here.
Each of the six panels connects to the T-Relay boards: three relay boards, two panels each. The T-Relay's only job is to switch relays on command and report back when it has. All the electrical measurement happens through a single shared energy meter, read over RS485/Modbus by the ECM50 controller. A per-panel select relay decides which one panel, out of six, is patched through to that meter.
The T-Relay sits close to the panels to keep relay wiring short; the ECM50 sits with the meter and the rest of the sensor bus. The two talk over ESP-NOW, a direct wireless link that needs no WiFi router or internet connection (§5).
2The measurement cycle
Each panel is driven through four relay states in order. Each state is a deliberate equivalent circuit.
Phase 1
Voc
S, I on · L off
No load connected. Terminal voltage settles at the open-circuit voltage; current is ~0.
holds ~1.5 s
Phase 2
Isc
S, I, L on
A dead short closes across the terminals. Voltage collapses toward 0; current rises to the short-circuit current.
holds ~1.5 s
Phase 3
Load (Vop/Iop)
S, L on · I off
The short is removed; current flows through a fixed load resistor. The panel settles at the point it would deliver into that load.
holds ~1.5 s
Phase 4
Break
S, L off
Panel released from the bus before the next one's turn: break-before-make, so two panels are never connected at once.
holds ~0.1 s
Why four phases, not one reading
A single resistor only ever shows one point on a panel's curve. Visiting open-circuit and short-circuit as well brackets the whole curve, and the firmware also captures what happens between those two states (§3).
Each held phase lasts about 1.5 s and the break about 0.1 s, so one panel takes roughly 4.6 s and a full six-panel sweep about 27.6 s.
3Where the curve comes from
There is no continuously variable electronic load anywhere in this system.
Relay contacts don't switch instantly. Between the Voc phase ending and the Isc phase beginning there is a real electromechanical transition, measured on the bench at roughly 120–150 ms. During that window the panel's terminal voltage and current pass through every intermediate value between Voc and Isc, as a slow sweep would.
The firmware samples the meter as fast as the RS485 bus allows during that window, instead of at its normal background rate. Those samples, typically 10–15 per panel, are the IV curve. The relay's own switching transient does the sweeping; the firmware only has to listen fast enough to catch it.
| Regime | Sample spacing | Why |
|---|---|---|
| Steady state (Voc / Isc / Load plateaus) | every 50 ms | Only a stable average is needed; no benefit to sampling faster. |
| Voc → Isc transition (the curve) | ~1 mains cycle (20 ms) | The only window where the operating point is moving; resolution matters here. |
What the curve registers hold (since ECM50 v2.6.0)
The curve points published per panel are now the first 18 samples of the Isc phase, sent unfiltered. Before 2026-10-22 they were the Voc → Isc transition samples, so curves from before and after that date are not directly comparable.
The same window yields Vmp/Imp/Pmax: the firmware scans every transition sample for the highest V×I product. It is a genuine point on the measured curve, not an estimate.
4From samples to numbers
Values published per panel per sweep, and where each comes from.
| Value | Source phase | Derivation |
|---|---|---|
| Voc | Voc plateau | Average of the stable run of samples |
| Isc | Isc plateau | Average of the stable run of samples |
| Vmp/Imp / Pmax | Voc → Isc transition | Highest V×I sample in the transition |
| Vop/Iop / Pop | Load plateau | Average of the stable run of samples |
A plateau isn't accepted as-is: the firmware finds the longest contiguous stretch where the reading holds within a tight tolerance, discarding the settling edges. A plateau that never settles (too short, too noisy) is rejected rather than averaged into a misleading number.
Fallback when the main analysis rejects a panel (since ECM50 v2.6.0)
If the main analysis rejects a panel, a simpler fallback works out Voc, Isc, Vop/Iop, Vmp/Imp and Pmax from the samples T-Relay tagged with each phase, and publishes them as valid. That's why all-zero sweeps became much rarer from 2026-10-22. Which sweeps used the fallback is recorded only in the controller's SD-card log, not in the published data. In v2.7.0, two checks that were rejecting the small lab cells were also loosened.
Vop/Iop vs Vmp/Imp: not the same point
Vmp/Imp is where the panel could deliver the most power, found on the measured curve. Vop/Iop is where it actually operates on a fixed load resistor. A fixed resistor can't track the maximum power point as conditions change, so the two are expected to diverge; the gap is itself useful (the MPP ratio on each panel page).
5ECM50 ↔ T-Relay link
Five ESP-NOW message types are the entire vocabulary the two boards need to stay in sync.
ECM50 and T-Relay run on independent clocks with no shared wiring beyond the wireless link. ECM50 only knows which meter samples belong to which panel and phase because T-Relay tells it, in real time, every time a relay state changes.
MSG_SWEEP_ACK arrives within 2 s, ECM50 retries the start command up to 5 times before abandoning that sweep.MSG_START_QUICK_LOAD is the fifth message: a lighter variant (§7) that reuses the same ack / marker / done exchange.
6Sweep orchestration
ECM50's side of a sweep is a small state machine, so a stalled or dropped sweep can never lock the RS485 bus.
Automatic sweeps fire three ways: on a 15-minute clock-aligned schedule, when irradiance crosses a bright-sun threshold, or manually from the console (SWEEPNOW). Automatic triggers are suppressed after dark, since V and I read ~0 with no light and every sweep wears the relays for no usable data.
Night gate
Checked first against the weather station's lux reading (below a low threshold means too dark). If that sensor isn't answering, it falls back to a fixed clock window, currently 19:00–06:30. Manual sweeps always bypass the gate.
7Keeping Vop/Iop fresh between full sweeps
The full four-phase cycle is slow and wears six sets of relays. Most of the time only Vop/Iop needs refreshing.
A quick load poll skips straight to the Load relay state on each panel in turn (the phase 3 circuit, set directly), takes one reading, and moves on. It reuses the same messages and the same ECM50 state machine as a full sweep, so the two can never run at once or collide on the shared bus.
| Full sweep | Quick load poll | |
|---|---|---|
| Phases visited | Voc → Isc → Load → Break | Load → Break |
| Values refreshed | Voc, Isc, Vmp/Imp/Pmax, Vop/Iop/Pop, curve | Vop/Iop/Pop |
| Default schedule | every 15 min | every 5 min |
| Relay cycles per run (6 panels) | 6 × full sequence | 6 × one step |
