Skip to content

Autocalibration implemented - #8

Merged
turkmanovic merged 8 commits into
OpenEPT:masterfrom
turkmanovic:feature/calibration
Oct 3, 2026
Merged

turkmanovic merged 8 commits into
OpenEPT:masterfrom
turkmanovic:feature/calibration

Conversation

@turkmanovic

Copy link
Copy Markdown
Contributor

OpenEPT 2.1.0

Release date: 2026-10-03

This release introduces a guided automatic calibration procedure for the Energy
Profiler Probe and completes the programmable load DAC calibration.

Highlights

  • Automatic calibration wizard. A new guided procedure calibrates the voltage
    channel, the current channel and the programmable load from the real-time averaged
    measurements, computes every coefficient on its own, and writes a report of what it
    changed. Launched from the Calibration window with Start auto calibration while
    acquisition is running.
  • Programmable load DAC calibration. The load now has its own offset and gain
    correction, calibrated against the already calibrated current channel, so a requested
    load current matches the current the board actually sinks.

Added

  • Three-stage calibration wizard (voltage -> current -> load):
    • Voltage channel: disconnect the input, switch the ADC IN jumper to the
      reference, and tune the voltage correction to the reference automatically.
    • Current channel: zero the offset with the load disabled, then a multi-point
      span step that drives known currents and asks for the true reading from a
      reference meter to calibrate the current measurement, followed by a zero re-check.
    • Load channel: drives several currents (count and range derived from the shunt)
      and fits the load DAC with no user input.
  • Internal or external reference selection at start. An external reference held on
    the input skips the disconnect-and-jumper steps for a faster run.
  • Configurable point counts for the current span and the load fit, asked at start.
  • Per-channel restart on failure - a problem restarts only the affected channel and
    keeps the coefficients already found.
  • Live log panel inside the wizard with the full history of detections and tuned
    coefficients, and a final report listing only the coefficients that changed.
  • "I am ready, continue" manual confirmation for the steps that wait on the user.

Changed

  • Calibration window redesigned. No longer modal (the main Device view stays
    reachable), with the fields grouped into General ADC, Voltage channel, Current channel
    and Load calibration, plus the new Start auto calibration button. Store now also sends
    all nine coefficients, including the load DAC offset and correction, to the device.

Fixed

  • Load calibration "working mode not supported". The wizard now drives the output
    directly through the device layer instead of the Energy Control window, resets any
    tripped protection, and enables both the load and the DAC before expecting current.
  • Protections tripping during setup are now reset automatically instead of aborting
    the procedure.
  • Load current was roughly halved relative to the requested value; fixed by adding
    the load DAC offset and gain correction.
  • Store had no effect on the device; the calibration coefficients are now actually
    sent, not only applied in the application.

Firmware

  • Load DAC offset and correction calibration parameters, applied in the
    current-to-voltage conversion and stored in the file system with the rest of the
    calibration.
  • Control protocol: device param cal get reports DACOFF / DACCOR, and
    device param cal set accepts -dacoff / -daccor (both optional).
  • cmparse: parsed argument values are always NUL-terminated, fixing wrong
    prescaler/period when a handler reuses the value buffer.

Upgrade notes

  • After running the automatic calibration, open the Calibration window and press
    Store to persist the coefficients on the device - the wizard keeps them in the
    application only.
  • The automatic calibration requires acquisition to be running and, for the current
    span, a reference ammeter.

@turkmanovic
turkmanovic merged commit 18e0c13 into OpenEPT:master Oct 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant