Calibration is not “make the sensor show the value I expect.” It is the process of establishing how an instrument’s indication relates to a reference under defined conditions, then using that relationship with an honest statement of uncertainty and limitations.
NIST emphasizes exactly these points: the measurand must be defined, calibration is valid under stated conditions, and uncertainty, systematic error, and reproducibility matter. That mindset is more important than choosing a sophisticated curve-fitting algorithm.
1. Define the measurand
State what you are measuring and under what conditions. “Temperature” is incomplete if the sensor is affected by airflow, self-heating, immersion depth, supply voltage, or mounting. The calibration result applies to the defined measurement setup, not to every possible use of the device.
2. Use a better reference than the device under test
The reference should have known accuracy or traceability appropriate to the experiment. If your reference is no better than the sensor being calibrated, you may only be comparing two unknown errors.
3. Cover the real operating range
Take multiple points across the range you care about. A two-point calibration can correct offset and slope for a reasonably linear sensor, but it cannot reveal nonlinearity. If the sensor will operate from 0 to 80 °C, calibrating only around room temperature does not characterize the full range.
4. Let the system settle
At every point, wait for both the reference and sensor to stabilize. Record time, environmental conditions, supply voltage, and anything else that can influence the reading. Repeated samples at each point help separate random noise from systematic error.
5. Fit the simplest model justified by the data
Start with:
corrected value = a × raw value + b
Use a polynomial or piecewise fit only when residuals show that a linear model is inadequate and you have enough data to justify the extra parameters. A higher-order curve that passes perfectly through a few calibration points can behave badly between them.
6. Inspect residuals
For each calibration point, calculate:
residual = reference value − corrected sensor value
Plot residual versus reference value. A random cloud around zero suggests the model captures the main relationship. A curved pattern indicates nonlinearity; a trend with time can indicate drift; a step can indicate hysteresis or a setup change.
7. Test repeatability separately
Repeat the same point several times and, when practical, approach it from both directions. Calibration coefficients do not eliminate sensor noise, hysteresis, mounting effects, or drift.
8. Validate with points not used for fitting
Keep some measurements out of the calibration fit. Apply the coefficients to those validation points. If error increases dramatically, the model may be overfit.
9. Record uncertainty and limitations
A trustworthy result states at least:
- reference instrument and its uncertainty;
- calibration range;
- environmental conditions;
- number of points and repeats;
- fit equation and coefficients;
- maximum or RMS residual error;
- date and hardware/firmware version.
Embedded implementation mistakes
Even good calibration data can be ruined in firmware by integer truncation, unit mistakes, overflow, applying coefficients in the wrong order, or using coefficients from a different sensor serial number. Store coefficients with versioning and units, and test known raw inputs after implementation.
Calibration also cannot repair bad sampling. If the signal is changing faster than you measure it, review our sensor sampling-rate guide.
Practical validation checklist
- Reference is appropriate and documented.
- Range covers the actual application.
- Multiple points and repeats are measured.
- Settling and environmental conditions are controlled.
- Residuals are plotted.
- Independent validation points are tested.
- Firmware implementation is checked against known values.
- Uncertainty and limitations are recorded.
Primary reference
NIST’s work on the calibration concept stresses definition of the measurand, conditions of validity, uncertainty, error, systematic error, and reproducibility. Those principles are a stronger foundation than treating calibration as a spreadsheet curve-fit.
Conclusion
A calibrated sensor is not one whose graph looks smooth. It is one whose relationship to a reference is documented, whose residual error is measured, whose uncertainty is understood, and whose calibration remains valid under the conditions in which the sensor will actually be used.