Sensors & Measurement · Study deck

Calibration Taxonomy and Zero-Span

Picture a tank probe that should read zero when the tank is empty and one hundred when it is full.

Physics Phoebe is your guide for this deck.

sensorcalibrationtaxonomy
Physics Phoebe, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Match offset, span, nonlinearity, drift, and hysteresis errors to the correction they can or cannot support.
  • Run zero-and-span arithmetic from two reference readings without hiding the zero offset.
  • Use residuals and holdout points to decide when a calibration model is overfit or out of range.
  • Record traceability, expiry, and environmental evidence so calibration coefficients remain auditable.
iotclass.org

Major section

Start With the Measurement Story

It reports five at empty and ninety at full.

  • A team can shift the line, stretch it, or fit a curve.
  • The safe choice depends on the error shown by real reference points.
  • Calibration means comparing a measurement with a known reference, then recording any correction.
  • A span error makes the change too small or too large.

Key terms

Drift
Drift means the error changes with time.
Hysteresis
Hysteresis means the result depends on whether the input rose or fell.
iotclass.org

Major section

Start With the Measurement Story (continued)

A curved error changes by a different amount across the range.

  • Drift means the error changes with time.
  • Hysteresis means the result depends on whether the input rose or fell.
  • This runway does not prove every future reading or choose a curve by itself.
  • A calibration problem is easier when the error has a name.
iotclass.org

Major section

Phoebe's Field Notes: Two Different Things Called "Gain"

The mathematical gist.: Calibration gain and antenna gain share a word but not a calculation.

  • The chapter's true span of 100 over a measured span of 96 gives a unitless correction of 1.0417.
iotclass.org

Major section

Calibration as a Toolbox

Collect Raw Measurements then calls for multiple points over the full range; only those pairs can reveal whether 3.

  • The: Calibration Curve makes the diagnosis visual by contrasting: Ideal and: Actual, while the separate: Offset Error and: Gain Error sketches show why one correction cannot substitute for the other.
Sensor calibration workflow showing reference standards, raw measurement collection, error analysis, correction model, calibration curve, common error types, and best practices.
Sensor calibration workflow showing reference standards, raw measurement collection, error analysis, correction model, calibration curve, common error types, and best practices.
iotclass.org

Major section

Calibration Span Error and Validation

A sensor can look correct at one point and fail across the working range.

  • The story here is span evidence: checking low, middle, and high values so the calibration works where the IoT system actually operates.
  • The mathematical gist.: A two-point calibration uses $m=(y_2-y_1)/(x_2-x_1)$ and $b=y_1-mx_1$.

Numbers to remember

0.1000%the slope is 0.1000% per count.
0.0909%the fitted slope becomes 0.0909% per count

Why it matters

After deployment, the sensor shows large errors at 10% and 90% moisture because small inaccuracies in the closely-spaced reference measurements were amplified across the full range.

Calibration validation workflow showing fit points, independent holdout points, residual review, and a range guard for outlier values.
Calibration validation workflow showing fit points, independent holdout points, residual review, and a range guard for outlier values.
iotclass.org

Major section

Calibration Span Error and Validation (continued)

The Sensor Calibration Lab builds the two-point equation and stores it in firmware.

  • With the chapter's 45%/55% references at raw counts 450/550, the slope is 0.1000% per count.
  • A calibration coefficient is not proof by itself.
  • Interpolation not extrapolation:: Measuring within calibration range is accurate; measuring outside it magnifies errors.
iotclass.org

Major section

Calibration Span Error and Validation (continued)

When those measurements are close together, any small error in the reference measurement or sensor reading gets amplified when extrapolating to values far from the calibration range.

  • If the high raw point is only 10 counts wrong, the fitted slope becomes 0.0909% per count, so raw 0 is reported as 4.1% and raw 1,000 as 95.0%.
  • This page tests the equation as an engineering model: the reference span, independent verification points, residual limits, and range guards decide whether the model is trustworthy enough to ship.
  • If errors at 0% and 100% exceed +/-2%, your calibration points were too close together.
iotclass.org

Major section

Calibration Span Error and Validation (continued)

The final: Range Guard prevents a value beyond the validated bracket from inheriting unjustified confidence.

  • A useful record includes the two fit references, the calculated slope and offset, at least one holdout verification point, the accepted residual limit, and the range where the correction is allowed to operate.
  • The narrow calibration range acts as a lever arm amplifying tiny reference errors into significant measurement errors.
  • Explore how the width of your calibration span affects error amplification.
iotclass.org

Major section

Calibration Span Error and Validation (continued)

Real numbers:: A 10 ADC count error (1% of full scale) in your reference point, when calibration range is only 100 counts, produces up to 5% error at the measurement extremes.

  • Industry rule of thumb:: Calibration span should be at least 1.2x your measurement range, ideally centered on your operating range.
  • Sensor nonlinearity:: Most sensors are most linear in their mid-range; calibrating near the working endpoints exposes curvature sooner.
  • The tiny reference error becomes a large endpoint error because the calibration span was too narrow.
iotclass.org

Deck summary

Key takeaways

It reports five at empty and ninety at full.

  • A curved error changes by a different amount across the range.
  • The mathematical gist.: Calibration gain and antenna gain share a word but not a calculation.
  • Collect Raw Measurements then calls for multiple points over the full range; only those pairs can reveal whether 3.
  • A sensor can look correct at one point and fail across the working range.
iotclass.org

Retrieval practice

Recall check 1 of 5

Physics Phoebe says: answer from memory, then check your reasoning.

Q1A sensor's readings are the right shape and slope but every value is shifted up by a constant amount. Which calibration correction fixes this, and how many reference points does it need?

AA zero correction, needing one reference point.
BA gain correction, needing three points.
CA polynomial linearization, needing five points.
DNo correction can fix an offset.
Show answer

Answer: A A pure constant shift is offset error, removable with one known point.

iotclass.org

Retrieval practice

Recall check 2 of 5

Physics Phoebe says: answer from memory, then check your reasoning.

Q2After a zero-and-span calibration, corrected = gain × (raw − zero) with zero = 5 and gain = 1.10. What corrected value does a raw reading of 55 give?

A55: corrected = 1.10 × (55 − 5) = 1.10 × 50 = 55.
B60.5: multiply 55 by 1.10 and ignore the zero.
C50, subtracting the zero but skipping the gain.
D66: apply the gain to 55 and then add the zero.
Show answer

Answer: A Subtract the zero first, then multiply by the gain.

iotclass.org

Retrieval practice

Recall check 3 of 5

Physics Phoebe says: answer from memory, then check your reasoning.

Q3An engineer fits a high-order (say 7th-degree) polynomial through 8 noisy calibration points to get a 'perfect' fit. Why is this risky?

AIt can overfit noise and extrapolate badly.
BHigh-order polynomials cannot be computed on a microcontroller.
CA perfect fit to the points guarantees a perfect fit everywhere.
DPolynomials cannot represent curvature, so the fit is meaningless.
Show answer

Answer: A A high-order fit can chase noise instead of the true sensor curve, then swing wildly outside the calibrated range; use the lowest order or a look-up table that meets the spec.

iotclass.org

Retrieval practice

Recall check 4 of 5

Physics Phoebe says: answer from memory, then check your reasoning.

Q4Place each calibration step where it lives so you can show that a correction fitted to known references still meets the accuracy claim at independent points.

AMeasure Known References
BCompute Error / Offset
CApply Correction Factors
DVerify Calibrated Accuracy
Show answer

Answer: A Place each calibration step where it lives so you can show that a correction fitted to known references still meets the accuracy claim at independent points.

Q5Complete the sensor calibration routine:

Aadc.atten(machine.ADC.ATTN_11DB)
Badc.atten(machine.ADC.ATTN_0DB)
Cadc.resolution(12)
Dadc.calibrate()
Show answer

Answer: A Two-point calibration maps raw ADC values to real units using a linear equation.

iotclass.org

Retrieval practice

Recall check 5 of 5

Physics Phoebe says: answer from memory, then check your reasoning.

Q6After a careful two-point calibration at the range endpoints, a sensor still shows its largest error near the middle of the range. What is the most likely cause?

AA constant zero offset remains, so the team should shift the fitted line until the middle reading matches.
BThe ADC lost resolution only in the middle codes.
CThe sensor is nonlinear, so the true curve bows away from the straight two-point line.
DAveraging more samples at the endpoints would remove the mid-range error.
Show answer

Answer: C Two points force a straight line; curvature shows up as a mid-range residual and needs a third point or a polynomial fit.

iotclass.org

Print reference

Answers 1 of 2

Answer key.

  1. A · A pure constant shift is offset error, removable with one known point.
  2. A · Subtract the zero first, then multiply by the gain.
  3. A · A high-order fit can chase noise instead of the true sensor curve, then swing wildly outside the calibrated range; use the lowest order or a look-up table that meets the spec.
  4. A · Place each calibration step where it lives so you can show that a correction fitted to known references still meets the accuracy claim at independent points.
iotclass.org

Print reference

Answers 2 of 2

Answer key.

  1. A · Two-point calibration maps raw ADC values to real units using a linear equation.
  2. C · Two points force a straight line; curvature shows up as a mid-range residual and needs a third point or a polynomial fit.
iotclass.org