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
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

Calibration as a Toolbox

Collect Raw Measurements then calls for multiple points over the full range; only those pairs can reveal whether error analysis finds offset, gain, or non-linearity.

  • 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.
  • The final correction-model stage offers a polynomial fit or lookup table, and the displayed y_cal equation records what firmware will apply.
  • That sequence turns the section's toolbox metaphor into a rule: select the smallest model justified by the reference data, then retain the conditions and validation evidence.
Sensor calibration flow pairs raw measurements with a traceable reference, diagnoses offset, span and nonlinearity, chooses the smallest correction model, then validates it on holdout points before accepting coefficients.
Sensor calibration flow pairs raw measurements with a traceable reference, diagnoses offset, span and nonlinearity, chooses the smallest correction model, then validates it on holdout points before accepting coefficients.
iotclass.org

Major section

Calibration Span Error and Validation

A calibration coefficient is not proof by itself.

  • 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.
  • Explore how the width of your calibration span affects error amplification.

Why it matters

After deployment, the sensor shows large errors at 10% and 90% on that index 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.

  • The mathematical gist: A two-point calibration uses m=(y2−y1)/(x2−x1)m=(y_2-y_1)/(x_2-x_1)m=(y2​−y1​)/(x2​−x1​) and b=y1−mx1b=y_1-mx_1b=y1​−mx1​.
  • With the chapter's 45%/55% references at raw counts 450/550, the slope is 0.1000% per count.
  • In this scenario, percentages are a normalized 0–100% soil-moisture index, not volumetric water content (VWC).
iotclass.org

Major section

Calibration Span Error and Validation (continued)

The index is useful for comparing the sensor's calibrated response; soil reference samples must use independently measured VWC.

  • 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.
  • The narrow calibration range acts as a lever arm amplifying tiny reference errors into significant measurement errors.
iotclass.org

Major section

Calibration Span Error and Validation (continued)

Industry rule of thumb: Calibration span should be at least 1.2× your normalized index range, ideally centered on your operating range.

  • 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.
  • 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.
  • Interpolation not extrapolation: Measuring within calibration range is accurate; measuring outside it magnifies errors.
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.

  • Sensor nonlinearity: Most sensors are most linear in their mid-range; calibrating near the working endpoints exposes curvature sooner.
  • A saturated sample has VWC equal to its porosity, not 100% VWC, and requires a suitable reference method.
  • If holdout errors exceed the specified tolerance, check the references, calibration span, and sensor model before assigning the cause.
  • The tiny reference error becomes a large endpoint error because the calibration span was too narrow.
iotclass.org

Major section

Calibration Span Error and Validation (continued)

Their errors feed: Residual Review, where the +4 kPa mid-range result in this section would expose curvature despite perfect endpoints.

  • The final: Range Guard prevents a value beyond the validated bracket from inheriting unjustified confidence.
  • That loop connects the worked example to the following choice among more points, piecewise linearization, and explicit operating limits.
  • After deployment, the sensor shows large errors at 10% and 90% on that index because small inaccuracies in the closely-spaced reference measurements were amplified across the full range.
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.
  • Collect Raw Measurements then calls for multiple points over the full range; only those pairs can reveal whether error analysis finds offset, gain, or non-linearity.
  • A calibration coefficient is not proof by itself.
  • The Sensor Calibration Lab builds the two-point equation and stores it in firmware.
iotclass.org

Retrieval practice

Recall check 1 of 6

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?

AApply a zero-offset correction using one reference point.
BApply a gain correction fitted from three reference points.
CFit a polynomial correction using five reference points.
DUse no correction because a constant offset cannot be fixed.
Show answer

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

iotclass.org

Retrieval practice

Recall check 2 of 6

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 6

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?

AA degree-seven fit may overfit noise and extrapolate badly.
BA microcontroller cannot compute any high-order polynomial.
CExact fit at eight points guarantees exact values between them.
DA polynomial cannot represent sensor curvature at any degree.
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 6

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

Q4An engineer performs a two-point calibration on a soil moisture sensor using a normalized 0–100% soil-moisture index, not volumetric water content. They choose reference points at 45% and 55%. After deployment, the sensor shows large errors at both 10% and 90% on that index. What was the calibration mistake?

AThe sensor was not powered on long enough before calibration
BTwo-point calibration cannot be used for soil moisture sensors
CThe two reference points were too close together.
DThe EEPROM storage corrupted the calibration coefficients
Show answer

Answer: C Two-point calibration calculates a linear gain and offset from two reference measurements.

iotclass.org

Retrieval practice

Recall check 5 of 6

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

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 6 of 6

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 remaining zero offset shifts every reading, including both calibrated endpoints.
BSensor nonlinearity bows the true response away from the endpoint line.
CADC resolution disappears only for codes near the middle of its range.
DMore endpoint averaging would remove an error confined to mid-range.
Show answer

Answer: B 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. C · Two-point calibration calculates a linear gain and offset from two reference measurements.
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. B · 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