Calibration is the moment a sensor reading becomes accountable. Start with a known reference, measure the error, adjust the relationship between raw value and real quantity, and keep evidence that the correction still holds.
17.2 In 60 Seconds
Sensor calibration corrects manufacturing variations so readings match reality. One-point calibration fixes constant offset errors (sensor always reads 2.3°C high). Two-point calibration fixes both offset and scale errors using two reference values (ice water at 0°C, boiling water at 100°C). Store calibration coefficients in non-volatile memory and recalibrate periodically since sensors drift over time.
Phoebe’s Field Notes: Two Different Things Both Called “Gain”
Phoebe’s Why
Antenna gain in dBi describes how tightly a radiated beam is focused against an isotropic reference – real electromagnetic-wave physics. Nothing in a temperature or humidity calibration circuit radiates anything, so that formula has no home here. The “gain” this chapter actually computes, scale = (ref_high - ref_low) / (raw_high - raw_low), is a completely different idea: the slope of a straight line fit through two data points, a unitless correction factor born from curve-fitting, not from a radiation pattern. Forcing the antenna-gain equations onto a calibration circuit would be a misleading calculation about a physical process – radiation – that is not present. The physics that is present in every one of this chapter’s raw readings is quantization: a digital sensor reports one rung on a finite ladder, and no offset-and-scale correction can put back information that rounding already threw away.
The Derivation
Quantization step for an \(N\)-level reading over full-scale range \(\mathrm{FSR}\):
\[q = \frac{\mathrm{FSR}}{2^N}\]
Quantization error is uniform on \([-q/2, q/2]\), with standard deviation:
\[\sigma_q = \frac{q}{\sqrt{12}}\]
A linear calibration acts on the already-quantized raw value and cannot recover resolution lost between steps:
so a validation residual is evidence of real nonlinearity or drift only when it is much larger than \(\sigma_q\).
Worked Numbers: This Chapter’s Own DHT22 Greenhouse Example
DHT22 datasheet temperature resolution (catalog-typical): \(q = 0.100^\circ\)C, so \(\sigma_q = 0.100/\sqrt{12} = 0.0289^\circ\)C
This chapter’s own two-point scale for that example (from raw 2.20/43.80 against reference 0.0/45.0): \(\mathrm{scale} = 1.0817\); stretching the quantization step by that factor gives an effective step of \(0.100\times1.0817 = 0.108^\circ\)C – calibration barely moves the floor because the scale factor sits close to 1
This chapter’s own Step 4 validation residual: \(1.68^\circ\)C. Ratio to the quantization floor: \(1.68/0.0289 = 58.1\times\) – far too large to be quantization noise, matching this chapter’s own conclusion that the residual “exposes nonlinearity”
Against the stated \(0.5^\circ\)C greenhouse HVAC tolerance:\(\sigma_q = 0.0289^\circ\)C is about \(17.3\times\) smaller, so quantization is a non-issue for this application – the two-point method’s real limit is the sensor’s own nonlinearity, which no amount of offset/scale calibration removes
Chapter Roadmap
This chapter has four practical stops:
First identify the error shape: offset, gain, nonlinearity, noise, or drift.
Then choose the lightest defensible correction: one-point, two-point, or multi-point calibration.
Next store the coefficients with evidence, schedule recalibration, and account for drift.
Finally validate on an ESP32-style greenhouse example and use the quizzes to check the workflow.
Checkpoints recap the decision points. Deep-dive calculators are useful once the basic workflow is clear.
17.3 Key Concepts
Calibration: the process of comparing a sensor’s output against a known reference standard and applying correction factors to make readings accurate
Offset Error: a constant additive error where the sensor always reads too high or too low by the same amount regardless of the measured value; corrected by one-point calibration
Gain (Scale) Error: a proportional error where the sensor’s reading diverges from truth at a rate proportional to the measured value; requires at least two reference points to correct
One-Point Calibration: a calibration technique using a single reference value to correct offset error; appropriate when the sensor’s gain is known to be accurate
Two-Point Calibration: a calibration technique using two reference values to simultaneously correct offset and gain errors across a defined measurement range
Reference Standard: a known, traceable measurement source (ice-water bath at 0°C, boiling water at 100°C, certified weights) used as ground truth during calibration
Drift: the gradual change in a sensor’s calibration over time due to ageing, mechanical stress, or environmental exposure; requires periodic recalibration to maintain accuracy
Non-Volatile Memory (NVM): storage (EEPROM, flash) that retains calibration coefficients after power-off so the sensor does not need to be recalibrated every time it starts up
Learning Objectives
After completing this chapter, you will be able to:
Justify why sensor calibration is necessary for production IoT systems and identify which error type each technique corrects
Execute one-point and two-point calibration procedures using reference standards
Implement calibration routines in MicroPython on ESP32 and store coefficients in non-volatile memory
Design a calibration maintenance schedule for deployed sensors based on sensor type and environment
17.4 For Beginners: Sensor Calibration
Calibration is like setting your bathroom scale to zero before weighing yourself. Every sensor has small manufacturing differences, so two identical temperature sensors might give slightly different readings in the same room. Calibration corrects these differences by comparing the sensor’s reading against a known reference value and applying a simple correction formula to get accurate results.
Even the best sensors have manufacturing variations. Two DHT22 sensors from the same batch might read 0.5°C apart when measuring the same temperature. Calibration corrects these individual differences.
Low-cost deployments need this discipline because variation arrives from several places at once. Production spread can make devices from the same run disagree. Different sensing principles can respond differently under similar conditions. Shipping, storage, assembly, shock, humidity, heat, cold, and ageing can change a response after the bench test. Analog sensors also inherit ADC reference and quantization errors, while inertial sensors add mounting and axis-alignment error. Treat recalibration as part of the release plan, not as a one-time lab activity.
Types of Sensor Errors:
Error Type
Description
Fixable with Calibration?
Offset (Bias)
Constant error at all values
Yes - one-point calibration
Gain (Scale)
Error proportional to reading
Yes - two-point calibration
Nonlinearity
Curved error across range
Partially - multi-point calibration
Noise
Random variation
No - requires filtering
Drift
Error changes over time
Requires periodic recalibration
Checkpoint: Error Shape First
You now know:
Offset, gain, nonlinearity, noise, and drift are different failure modes, so they should not all receive the same correction.
A 0.5°C disagreement between two DHT22 sensors is a calibration problem; random noise still needs filtering.
Calibration starts with a trusted reference and ends with evidence that the correction still holds.
17.7 One-Point Offset Calibration
When to use: Sensor reads consistently high or low by a fixed amount.
Method:
Measure a known reference value
Calculate the offset: offset = sensor_reading - true_value
Subtract offset from all future readings
One-point calibration is a zero-shift correction:
Put the sensor at one trusted reference value, such as ice water at 0°C.
This fixes both a zero offset and a gain/span error.
17.9 Putting Numbers to It
Two-point calibration corrects both gain and offset errors. Let \(R\) = reference (true) value and \(M\) = measured (raw sensor) value. Given ice water (0°C) reads 1.8°C and boiling water (100°C) reads 98.5°C:
The scale is (100 - 0) / (98.5 - 1.8) = 1.034.
The offset is 0 - 1.8 * 1.034 = -1.86.
The corrected formula is corrected = raw * 1.034 - 1.86. At room temperature, a raw reading of 24.5°C becomes 23.5°C. Without calibration, the 1.0°C error would violate many HVAC control requirements.
17.9.1 Two-Point Calibration Calculator
Enter your sensor’s raw readings at two known reference points to compute the calibration coefficients and test a correction.
Show code
viewof ref_low_val = Inputs.range([-50,50], {value:0,step:0.1,label:"Reference Low (°C)"})viewof ref_high_val = Inputs.range([0,200], {value:100,step:0.1,label:"Reference High (°C)"})viewof raw_low_val = Inputs.range([-50,50], {value:1.8,step:0.1,label:"Raw Reading at Low Ref (°C)"})viewof raw_high_val = Inputs.range([0,200], {value:98.5,step:0.1,label:"Raw Reading at High Ref (°C)"})viewof test_raw = Inputs.range([-50,200], {value:24.5,step:0.1,label:"Test Raw Reading (°C)"})
Show code
cal_denom = raw_high_val - raw_low_valcal_valid =Math.abs(cal_denom) >0.001cal_scale = cal_valid ? (ref_high_val - ref_low_val) / cal_denom :1cal_offset = cal_valid ? ref_low_val - (raw_low_val * cal_scale) :0corrected_test = test_raw * cal_scale + cal_offsethtml`<div style="background: var(--bs-light, #f8f9fa); padding: 1rem; border-radius: 8px; border-left: 4px solid #3498DB; margin-top: 0.5rem;">${cal_valid ?html`<p><strong>Scale factor:</strong> ${cal_scale.toFixed(4)}</p><p><strong>Offset:</strong> ${cal_offset.toFixed(2)}°C</p><p><strong>Correction formula:</strong> corrected = raw × ${cal_scale.toFixed(4)} + (${cal_offset.toFixed(2)})</p><hr style="margin: 0.5rem 0;"><p><strong>Test result:</strong> Raw ${test_raw.toFixed(1)}°C → Corrected <strong>${corrected_test.toFixed(2)}°C</strong></p>`:html`<p style="color: #E74C3C;"><strong>Error:</strong> Raw low and raw high readings must differ. Two-point calibration requires two distinct measurement points.</p>`}</div>`
17.10 Practical Calibration References
Measurement
Reference
Accuracy
Notes
Temperature
Ice water (0°C)
+/-0.1°C
Use crushed ice, stir
Temperature
Boiling water (100°C*)
+/-0.5°C
*Altitude dependent
Temperature
Room thermometer
+/-0.5°C
Use NIST-traceable reference
Humidity
Saturated salt (75.3% RH)
+/-0.5%
Sodium chloride (NaCl) solution
Humidity
Saturated salt (32.8% RH at 25°C)
+/-0.5%
Magnesium chloride (MgCl₂)
Pressure
Weather station data
+/-1 hPa
Compare with local airport
Distance
Tape measure
+/-1mm
Fixed distance reference
We just used one and two reference points to correct simple errors. The next question is what to do when the error curve bends between those points.
17.11 Multi-Point Calibration
When to use: Sensor has nonlinear response that two-point calibration cannot correct (as demonstrated in the worked example below).
The following example uses NumPy for polynomial fitting. On resource-constrained microcontrollers, compute the coefficients on a PC and hard-code them, or use a simple lookup table with linear interpolation between points.
For nonlinear sensors, fit the correction curve on a laptop first:
Record several pairs: known reference value and raw sensor reading.
Fit a polynomial or create a lookup table from those pairs.
Copy only the final coefficients or table into the microcontroller.
Verify the correction at points that were not used to create the fit.
On small IoT devices, avoid doing the full polynomial fitting at runtime.
17.12 Polynomial Calibration Explorer
Enter 3–5 calibration points (reference vs raw) and see how a quadratic polynomial fits the data. Adjust individual points to observe how nonlinearity affects the correction curve.
Use stable conditions: Allow sensor to warm up (30 min for gas sensors), avoid drafts
Average multiple readings: Take 10–20 readings at each calibration point to reduce noise
Use accurate references: Your reference must be more accurate than your sensor
Verify after calibration: Validate against a third reference NOT used in calibration
Recalibrate periodically: Follow the schedule guidelines below for your sensor type
Store coefficients safely: Non-volatile memory (EEPROM/flash) with backup
Avoid overfitting: Too many polynomial terms can amplify noise between calibration points
17.15 Calibration Schedule Guidelines
Sensor Type
Recommended Interval
Trigger Events
Temperature
Every 6 months
After shipping, extreme temps
Humidity
Every 3 months
After high humidity exposure
Pressure
Every 12 months
After altitude changes
Gas sensors
Every 3-6 months
After contamination
pH sensors
Before each use
After storage
Load cells
Every 12 months
After overload events
Checkpoint: Linear Calibration Math
You now know:
One-point calibration corrects a constant offset such as 2.3°C.
Two-point calibration uses two references, such as 0°C and 100°C, to compute both scale and offset.
In the worked example, raw readings of 1.8°C and 98.5°C produce scale 1.034 and offset -1.86.
17.16 Try It: Calibration Drift Estimator
Sensors drift over time due to aging, contamination, and environmental stress. Estimate when your sensor will exceed its accuracy tolerance and needs recalibration.
This example walks through a real calibration procedure for a DHT22 temperature sensor deployed in a greenhouse monitoring system. We cover the physical setup, the math, the code, and how to validate the result.
Scenario: You are deploying 20 DHT22 sensors in a commercial greenhouse. Each sensor will trigger HVAC adjustments, so accuracy matters – a 2°C error could stress plants or waste energy. Your reference instrument is a NIST-traceable digital thermometer accurate to +/-0.1°C.
Step 1: Prepare Reference Points
Reference
Setup
Expected Reading
Notes
Low point
Crushed ice + water slurry in insulated container
0.0°C +/- 0.1°C
Stir continuously, wait 5 min for equilibrium
High point
Warm water bath at greenhouse max temp
45.0°C (from reference thermometer)
Use 45°C, not 100°C – closer to operating range gives better results
Why 45°C instead of 100°C? The DHT22 operates between 0–50°C in a greenhouse. Calibrating at 100°C (outside operating range) introduces extrapolation error. Always calibrate within or near the expected operating range.
Step 2: Collect Raw Readings
The schedule and drift tools above tell you when to recalibrate. Now we will walk through one complete calibration record for a sensor that actually affects greenhouse control.
Place the DHT22 and reference thermometer side by side in each bath. Wait 3 minutes for the sensor to stabilize, then take 20 readings over 2 minutes:
Data collection should be slow and repeatable:
Put the sensor and reference thermometer in the low bath.
Wait for thermal equilibrium.
Collect 10-20 readings and average them.
Repeat the same process in the high bath.
Example averages: low bath raw value 2.20°C, high bath raw value 43.80°C.
Step 3: Calculate Calibration Coefficients
Using the averaged readings:
scale = (45.0 - 0.0) / (43.80 - 2.20) = 1.0817
offset = 0.0 - 2.20 * 1.0817 = -2.38
Final correction: corrected = raw * 1.0817 - 2.38
Step 4: Apply and Validate
Validate with a third reference point that was not used for calibration:
Room reference: 22.5°C.
Raw average: 21.45°C.
Corrected value: 21.45 * 1.0817 - 2.38 = 20.82°C.
Validation error: 1.68°C, which fails a 0.5°C greenhouse tolerance.
This exposes nonlinearity, so the sensor needs multi-point calibration or a better sensor.
The Validation Catch: This is why Step 4 matters. Two-point calibration assumes the sensor error is linear. When validation at a third point reveals significant residual error (>0.5°C for DHT22), you need multi-point calibration instead.
Checkpoint: Production Evidence
You now know:
A calibration record needs the sensor ID, date, scale, offset, reference instrument, validation error, and next calibration date.
The greenhouse example uses 20 DHT22 sensors and chooses 45.0°C because it is inside the operating range.
Validation is separate from fitting: 21.45 * 1.0817 - 2.38 = 20.82°C, which misses 22.5°C by 1.68°C.
17.18 Try It: Calibration Validation Checker
After calibrating a sensor, test it against a third reference point to verify accuracy. Enter your calibration coefficients and a validation measurement to determine if your calibration is adequate or if you need a different approach.
Show code
viewof val_scale = Inputs.range([0.5,1.5], {value:1.0817,step:0.0001,label:"Calibration scale factor"})viewof val_offset = Inputs.range([-10,10], {value:-2.38,step:0.01,label:"Calibration offset"})viewof val_raw_reading = Inputs.range([-20,120], {value:21.45,step:0.05,label:"Raw sensor reading at validation point (°C)"})viewof val_true_value = Inputs.range([-20,120], {value:22.5,step:0.1,label:"True reference value at validation point (°C)"})viewof val_app_tolerance = Inputs.select( ["+/-0.2°C (Laboratory)","+/-0.5°C (HVAC/Greenhouse)","+/-1.0°C (General monitoring)","+/-2.0°C (Rough estimate)"], {value:"+/-0.5°C (HVAC/Greenhouse)",label:"Application tolerance"})
Save the calibration record, not just the two numbers:
Sensor ID: DHT22_GH_014.
Date: 2026-02-07.
Scale: 1.0817.
Offset: -2.38.
Reference instrument ID.
Validation error and next calibration date.
This makes deployed readings auditable and repeatable.
17.19 Lesson from This Example
The validation step (Step 4) caught a problem that two-point calibration alone would have missed. In production, always validate against a reference point that was NOT used for calibration. If the validation error exceeds your application’s tolerance (here, 0.5°C for greenhouse HVAC), switch to multi-point calibration or select a more linear sensor (e.g., the SHT31 has better linearity than the DHT22).
17.20 Common Calibration Pitfall
Temperature and humidity affect many sensor types beyond the one you are calibrating. A pressure sensor calibrated in a heated lab may behave differently at outdoor deployment temperatures. Always note the ambient conditions during calibration and recalibrate if the deployment environment differs significantly from the calibration environment.
17.21 For Kids: Meet the Sensor Squad!
Sammy the Sensor was feeling embarrassed. “I keep saying it is 2.3 degrees when it should be zero!” he told the Squad while sitting in a bowl of ice water.
“Do not worry, Sammy!” said Max the Microcontroller. “That is totally normal. Every sensor is a little bit different from the factory. We just need to calibrate you!”
“Cali-what?” asked Lila the LED.
Max explained: “We dip Sammy in ice water – we KNOW that is 0 degrees. If Sammy says 2.3, we learn his offset. Then we dip him in boiling water – we KNOW that is 100 degrees. If Sammy says 98.5, we learn his scale. Now I can do math to fix every future reading!”
Bella the Battery pulled out a notebook. “We write down today’s date, what references we used, and the calibration numbers. In six months, we do it again because sensors can drift over time – like a clock that slowly gets behind.”
“And ALWAYS use a reference that is MORE accurate than the sensor you are calibrating,” Max added. “Otherwise, it is like asking someone who is MORE lost for directions!”
17.22 Check: Calibration Errors and Storage
17.23 Try It: Calibration Method Advisor
Describe your sensor scenario and get a recommended calibration approach.
Show code
viewof adv_error_type = Inputs.checkbox( ["Constant offset (reads high/low by same amount everywhere)","Scale error (error grows with reading)","Nonlinear (error varies unpredictably across range)"], {label:"Error characteristics observed"})viewof adv_accuracy_needed = Inputs.radio( ["Low (<2°C / 5%)","Medium (<0.5°C / 1%)","High (<0.1°C / 0.2%)"], {value:"Medium (<0.5°C / 1%)",label:"Required accuracy"})viewof adv_num_sensors = Inputs.range([1,100], {value:5,step:1,label:"Number of sensors to calibrate"})viewof adv_has_references = Inputs.radio( ["One reference point available","Two reference points available","Three or more reference points"], {value:"Two reference points available",label:"Reference standards available"})
Show code
adv_has_offset = adv_error_type.includes("Constant offset (reads high/low by same amount everywhere)")adv_has_scale = adv_error_type.includes("Scale error (error grows with reading)")adv_has_nonlinear = adv_error_type.includes("Nonlinear (error varies unpredictably across range)")adv_high_acc = adv_accuracy_needed ==="High (<0.1°C / 0.2%)"adv_med_acc = adv_accuracy_needed ==="Medium (<0.5°C / 1%)"adv_refs = adv_has_references ==="Three or more reference points"?3: adv_has_references ==="Two reference points available"?2:1adv_method = adv_has_nonlinear || (adv_high_acc && adv_refs >=3)?"multi": (adv_has_scale || (adv_has_offset && adv_med_acc && adv_refs >=2))?"two":"one"adv_methods = ({one: {name:"One-Point Calibration",color:"#16A085",desc:"Corrects constant offset error using a single reference measurement.",time:"2--5 min per sensor",math:"corrected = raw - offset",limitations:"Cannot correct scale or nonlinear errors." },two: {name:"Two-Point Calibration",color:"#3498DB",desc:"Corrects both offset and scale (gain) errors using two reference measurements.",time:"10--15 min per sensor",math:"corrected = raw × scale + offset",limitations:"Assumes linear sensor response. May miss nonlinear behavior between calibration points." },multi: {name:"Multi-Point Calibration",color:"#9B59B6",desc:"Fits a polynomial curve through 3+ reference points to correct nonlinear sensor response.",time:"20--30 min per sensor",math:"corrected = a×raw² + b×raw + c (or higher order)",limitations:"Requires more reference standards and computation. Risk of overfitting with too many terms." }})adv_chosen = adv_methods[adv_method]adv_total_time_min = adv_method ==="one"?2: adv_method ==="two"?10:20adv_total_time_max = adv_method ==="one"?5: adv_method ==="two"?15:30html`<div style="background: var(--bs-light, #f8f9fa); padding: 1rem; border-radius: 8px; border-left: 4px solid ${adv_chosen.color}; margin-top: 0.5rem;"><h4 style="color: ${adv_chosen.color}; margin-top: 0;">Recommended: ${adv_chosen.name}</h4><p>${adv_chosen.desc}</p><table style="width: 100%; border-collapse: collapse; margin: 0.5rem 0; font-size: 0.9em;"><tr><td style="padding: 4px 8px; font-weight: bold; color: #2C3E50; width: 35%;">Formula</td><td style="padding: 4px 8px; font-family: monospace;">${adv_chosen.math}</td></tr><tr style="background: rgba(0,0,0,0.03);"><td style="padding: 4px 8px; font-weight: bold; color: #2C3E50;">Time per sensor</td><td style="padding: 4px 8px;">${adv_chosen.time}</td></tr><tr><td style="padding: 4px 8px; font-weight: bold; color: #2C3E50;">Fleet estimate (${adv_num_sensors} sensors)</td><td style="padding: 4px 8px;">${adv_total_time_min * adv_num_sensors}--${adv_total_time_max * adv_num_sensors} min (${((adv_total_time_min * adv_num_sensors) /60).toFixed(1)}--${((adv_total_time_max * adv_num_sensors) /60).toFixed(1)} hours)</td></tr><tr style="background: rgba(0,0,0,0.03);"><td style="padding: 4px 8px; font-weight: bold; color: #2C3E50;">Limitations</td><td style="padding: 4px 8px;">${adv_chosen.limitations}</td></tr></table>${adv_refs <2&& adv_method !=="one"?html`<p style="color: #E67E22; margin-top: 0.5rem;"><strong>Note:</strong> ${adv_chosen.name} requires ${adv_method ==="two"?"2":"3+"} reference points, but you indicated only ${adv_refs}. Consider obtaining additional reference standards.</p>`:""}${adv_error_type.length===0?html`<p style="color: #7F8C8D; margin-top: 0.5rem;"><em>Tip: Select at least one error characteristic above for a more specific recommendation.</em></p>`:""}</div>`
17.24 Match: Calibration Concepts
17.25 Order: Two-Point Calibration Steps
17.26 Label the Diagram
17.27 Code Challenge
17.28 Calibration Decision Guide
Checkpoint: Choose the Smallest Defensible Method
You now know:
One-point calibration is a 2–5 min per sensor fix when only offset is present.
Two-point calibration takes 10–15 min per sensor and handles offset plus gain.
Multi-point calibration takes 20–30 min per sensor and is justified when nonlinear residuals remain after validation.
17.29 Calibration and Zero-Span
The calculators above show one-point, two-point, and multi-point calibration in the main workflow. Continue to Calibration Taxonomy and Zero-Span Correction when you need to decide which error model is defensible before storing coefficients. That page separates the deeper material: offset versus gain versus curvature, zero-and-span arithmetic, residual checks, overfitting, traceability, hysteresis, and calibration expiry.
17.30 Summary
Key calibration takeaways:
All sensors benefit from calibration - Even factory-calibrated ones
One-point for offset - Simple constant correction
Two-point for offset + gain - Linear correction
Multi-point for nonlinearity - Polynomial or lookup table
Recalibrate regularly - Sensors drift over time
17.31 Key Takeaway
Sensor calibration should be treated as lifecycle evidence: define the reference, range, correction, uncertainty, drift, and retest trigger before relying on readings.
17.32 Try It Yourself
Beginner: You have a DHT22 that reads 23.8°C while your reference thermometer reads 22.0°C. Calculate the offset and write one line of code to apply it. Then check: if the DHT22 reads 30.5°C, what is the corrected temperature?
Intermediate: Using the MicroPython code from the worked example above, calibrate a sensor with ice water (0°C) and a warm bath (40°C). Your raw readings average 1.5°C at the low point and 38.9°C at the high point. Calculate the scale and offset, then predict the corrected reading if the sensor outputs 25.0°C.
Advanced: An MQ-135 gas sensor gives these readings at known CO₂ concentrations: (400 ppm, raw=120), (800 ppm, raw=280), (1200 ppm, raw=390), (1600 ppm, raw=460), (2000 ppm, raw=505). Plot these points – is the relationship linear? Fit a quadratic polynomial and calculate the predicted concentration when the sensor outputs raw=350.
17.33 Concept Relationships
Core Concept
Related Concepts
Why It Matters
Offset Error
Bias, Zero Point
Constant shift at all values
Gain Error
Scale Factor, Span
Proportional error increasing with reading
Nonlinearity
Polynomial Fit, Lookup Tables
Cannot be fixed with two-point calibration
Drift
Aging, Temperature, Recalibration Schedule
Calibration degrades over time
Common Pitfalls
17.33.1 1. Using Unstable Reference Standards
Calibrating a sensor against a reference that has not been verified against a primary standard propagates the reference’s error into the calibrated sensor. Always trace reference standards to national measurement standards (NIST/NPL) or use certified reference materials.
17.33.2 2. Calibrating Only at One Temperature
A one-point offset calibration at 25 C assumes the offset is constant across the sensor’s range. Many sensors have temperature-dependent offset. Perform calibration at the actual expected operating temperature, or characterize and compensate for the temperature coefficient in firmware.
17.33.3 Allow Warm-Up Before Calibration
Many sensors require a warm-up period (2-30 minutes) for internal electronics to stabilize. Calibrating during warm-up captures an unstable reference reading and produces incorrect coefficients. Always wait for the manufacturer’s recommended stabilization time before taking calibration reference readings.
17.33.4 Reference-Only Validation Risk
Verifying calibration only at the two reference points used to derive the coefficients provides false confidence. Linearity errors are not visible at calibration endpoints. Always verify the calibrated output at 3-5 intermediate values spanning the measurement range.