Device Dialog — Calibration
The Calibration tab is where you configure what your device measures (Role) and how raw hardware values are converted into real-world units (Strategy). Without calibration, sensor readings are meaningless raw numbers.
Concepts
Role
A Role defines what the device measures. For example, an ultrasonic sensor can measure either distance (mm) or volume (L) from the same raw data. The role determines:
- Which unit the sensor reports in
- Which strategies are available for calibration
- Which display units are offered
Strategy
A Strategy defines the mathematical method used to convert raw hardware values to real-world values.
Calibration Key
Calibration data is stored per role:strategy combination (e.g., ph:multi_point). This means you can switch between roles without losing calibration data — each combination keeps its own record.
Section 1: Role Selection
Shown when the device template defines multiple roles. Click a role card to select it:
- The default strategy for that role is automatically applied
- The strategy selector updates to show only strategies allowed by this role
- If the role allows only one strategy, it is auto-locked
Section 2: Strategy Selection
Shows available calibration strategies as cards.
| Element | Description |
|---|---|
| Radio button | Green filled circle = Active strategy. Click to set as active. |
| ”Cal” badge | Green — shown if this strategy has existing calibration data |
| ”No Cal” badge | Orange pulsing — active strategy but no calibration data yet |
| ”Set as Active” button | Makes a non-active strategy the active one used by the system |
You can view and calibrate a strategy without making it active — allowing you to prepare calibration data before switching.
Available Strategies
For Sensors
| Strategy | ID | Description |
|---|---|---|
| Offset | offset | Adds a fixed correction value to every reading. Simplest calibration. |
| Linear (2-Point) | linear | Maps two known raw→real pairs to create a linear equation (y = mx + b). Good for sensors with linear response. |
| Multi-Point | multi_point | Maps 3+ reference points for polynomial interpolation. Most accurate for non-linear sensors. |
| pH Smart | ph_smart | Specialized wizard for pH sensors using standard buffer solutions (pH 4.0, 7.0, 10.0). |
| EC Smart | ec_smart | Specialized wizard for EC/TDS sensors using standard calibration solutions. |
For Actuators
| Strategy | ID | Description |
|---|---|---|
| Volumetric Flow | volumetric_flow | Measures the flow rate of a pump (ml/s) by running it for a set time and measuring the output. Used for precise dosing calculations. |
Section 3: Calibration Wizard
When you select a strategy card, the calibration area appears below.
If calibration data already exists:
| Element | Description |
|---|---|
| ✓ Calibrated | Green status indicator |
| Last Calibrated | Date and time of most recent calibration |
| Recorded Data | Shows the stored calibration points |
| Recalibrate | Opens the wizard to overwrite with fresh data |
| Delete | Removes the calibration data |
Calibration Wizards
Offset Wizard
- Read the current sensor value (or enter manually)
- Enter the known correct value
- The system calculates the offset = known − measured
- Save
Linear Wizard (2-Point)
- Place the sensor in solution #1 → click Read → enter the known value
- Place the sensor in solution #2 → click Read → enter the known value
- Save — the system calculates slope (m) and intercept (b)
Multi-Point Wizard (3+ Points)
- For each reference point: click Read → enter the known real-world value → click Add Point
- Review all captured points
- Save — the system performs polynomial interpolation
pH Smart Wizard
- Place sensor in pH 7.0 buffer → Read
- Place sensor in pH 4.0 buffer → Read
- (Optional) Place sensor in pH 10.0 buffer → Read
- Save
EC Smart Wizard
- Similar guided wizard for EC calibration solutions
- Step-by-step with known standard values
- Save
Volumetric Flow Wizard
- Enter the test duration (seconds)
- Click Run Pump — the system activates the actuator for the specified time
- Measure the output volume (ml) and enter it
- Save — this rate is used for all future dose calculations