17 Sensor Specifications
Key Concepts
- Full-Scale Output (FSO): The algebraic difference between the minimum and maximum output values when the sensor is exposed to the minimum and maximum of its specified measurement range
- Nonlinearity: The maximum deviation of the sensor’s actual transfer function from the ideal straight line connecting the two endpoint calibration values; expressed as +-% FSO; cannot be corrected by simple two-point calibration
- Hysteresis: The difference in sensor output when approaching the same measurand value from above versus below; caused by mechanical or magnetic memory effects; important for pressure and position sensors
- Long-Term Stability (Drift): The change in sensor output over time under constant input conditions; expressed as % FSO per year; critical for sensors deployed years without recalibration
- Zero-Point Offset: The non-zero output produced when the measurand is at zero or the minimum of the range; corrected by one-point calibration by subtracting the offset from all readings
- Span: The algebraic difference between the highest and lowest values in the sensor’s measurement range; a temperature sensor with range -40 C to +125 C has a span of 165 C
- Repeatability: The closeness of agreement between successive measurements under identical conditions within a short period; high repeatability is necessary but not sufficient for accuracy — the sensor may consistently repeat a biased value
- Time Constant (tau): For first-order sensor dynamics, the time to reach 63.2% of the final value after a step input change; a sensor with tau = 10 s reaches 99% of its final value in approximately 46 s
Learning Objectives
After completing this chapter, you will be able to:
- Interpret sensor datasheet specifications correctly
- Distinguish between accuracy, precision, and resolution using real sensor examples
- Calculate battery life based on sensor power consumption
- Match sensor specifications to application requirements
- Detect specification traps and select cost-effective sensor configurations
For Beginners: Sensor Specifications
Sensor specifications are like the nutrition labels on food – they tell you exactly what you are getting. The most important ones are accuracy (how close to the true value), resolution (the smallest change it can detect), and range (the minimum and maximum values it can measure). A common beginner trap is confusing resolution with accuracy: a sensor can show many decimal places (high resolution) while still being far from the true value (low accuracy).
17.1 Prerequisites
- Sensor Introduction: Basic sensor concepts
- Biomimetic Sensing: Multi-scale sensing principles
17.2 Accuracy: How Close to Reality?
When you look at a sensor datasheet, you will see specifications like “+/-0.5C accuracy” or “2 second response time.” But what do these actually mean for your project? Let us start with the most important one: accuracy.
What it means: If the real temperature is 25.0C, a sensor with +/-0.5C accuracy might read anywhere from 24.5C to 25.5C.
When accuracy matters:
| Application | Required Accuracy | Why | Real-World Impact |
|---|---|---|---|
| Home thermostat | +/-1C | HVAC deadband is typically 1-2C | Reading 22C vs 23C does not change comfort |
| Food storage monitoring | +/-0.5C | Health regulations require specific ranges | 4C vs 5C could mean spoilage |
| Medical/laboratory | +/-0.1C | Small variations affect experiments/diagnoses | 37.0C vs 37.2C matters for fever detection |
| Industrial process control | +/-0.1C | Chemical reactions sensitive to temperature | Precision manufacturing requires tight control |
Real cost of accuracy:
Different accuracy levels come with dramatically different price tags:
- +/-2C sensor (DHT11): $2 - Good for basic home automation
- +/-0.5C sensor (DHT22): $5 - Standard for IoT environmental monitoring
- +/-0.2C sensor (SHT31): $15 - Industrial and scientific applications
- +/-0.1C sensor (PT100 RTD Class AA): $50+ - Laboratory and precision manufacturing
Don’t Overpay for Accuracy You Don’t Need
Rule of thumb: Match sensor accuracy to your application’s decision threshold. A $50 precision sensor in a home thermostat is wasted money – the HVAC system itself has a 1-2C deadband, making sub-degree accuracy meaningless.
Decision Factors: Choose high-accuracy sensors when regulatory compliance requires documented calibration (cold chain, medical), or when process control decisions depend on 0.5C differences. Choose low-cost sensors for hobby projects, comfort-only applications with 2-3C deadband, or deployments with 50+ nodes where aggregate data matters more than individual precision.
17.3 Resolution: How Precise Are the Readings?
What it means: The smallest change the sensor can detect and report. Often specified in bits (8-bit, 10-bit, 12-bit, 16-bit).
| Bits | Steps | Example: 0-100C Range | Temperature Resolution |
|---|---|---|---|
| 8-bit | 256 steps | 100C / 256 = 0.39C | Can see 25.0C vs 25.4C |
| 10-bit | 1,024 steps | 100C / 1024 = 0.098C | Can see 25.0C vs 25.1C |
| 12-bit | 4,096 steps | 100C / 4096 = 0.024C | Can see 25.00C vs 25.02C |
| 16-bit | 65,536 steps | 100C / 65536 = 0.0015C | Can see 25.000C vs 25.002C (rounded) |
Try it: ADC Resolution Calculator
Resolution Does Not Equal Accuracy!
A sensor can have high resolution but low accuracy:
- DHT22: 0.1C resolution (appears precise) but +/-0.5C accuracy (actual error)
- Reading might show: 25.3C
- Actual temperature could be: 24.8C to 25.8C
High resolution just means the sensor reports many decimal places – it does not guarantee those decimals are correct!
17.4 Accuracy vs Precision: The Target Analogy
Minimum Viable Understanding: Accuracy vs Precision
Core Concept: Accuracy measures how close a reading is to the true value (systematic error), while precision measures how repeatable readings are (random error).
Why It Matters: A high-precision but low-accuracy sensor can be fixed with calibration. A low-precision sensor produces unreliable data that no amount of calibration can fix.
Key Takeaway: Prioritize precision over raw accuracy – you can calibrate out systematic errors, but you cannot eliminate random measurement noise without hardware changes.
The Four Scenarios:
| Scenario | Accuracy | Precision | Fix |
|---|---|---|---|
| High Accuracy, High Precision | Excellent | Excellent | No fix needed |
| Low Accuracy, High Precision | Poor (offset) | Excellent | Calibrate in software |
| High Accuracy, Low Precision | Excellent (average) | Poor (noisy) | Hardware fix or averaging |
| Low Accuracy, Low Precision | Poor | Poor | Replace sensor |
17.5 Response Time: How Fast Does It React?
What it means: How quickly the sensor detects a change in the environment. Often specified as “time to 63% of final value” (one time constant, tau).
The Coffee Cup Test:
Imagine moving a temperature sensor from room air (22C) into hot coffee (80C). The temperature change is 58C. The response time specification (tau) is the time to reach 63% of this change:
- 2-second response time (tau = 2s): Shows ~59C after 2 seconds (63% of 58C change), ~72C after 4 seconds (86%), ~77C after 6 seconds (95%), settles near 80C after ~10 seconds
- 30-second response time (tau = 30s): Shows ~59C after 30 seconds, ~72C after 60 seconds, settles near 80C after ~150 seconds (2.5 minutes)
When response time matters:
| Application | Required Response | Why | Consequence of Slow Response |
|---|---|---|---|
| Fire detection | <1 second | Every second counts in emergencies | Delayed alarm = loss of life/property |
| Smart oven control | <10 seconds | Temperature changes in minutes | Overshoot/undershoot cooking temperature |
| HVAC control | <30 seconds | Room temperature changes slowly | Slight comfort lag, minimal impact |
| Weather station | <5 minutes | Weather changes over hours | Historical logging, trends not affected |
Try it: Response Time Calculator
17.6 Operating Range: Where Can It Work?
What it means: The environmental conditions where the sensor functions correctly and provides accurate readings.
Example: DHT22 Temperature/Humidity Sensor
- Operating temperature range: -40C to 80C
- Storage range: -40C to 80C (same, but not measuring)
- Humidity range: 0-100% RH (relative humidity)
Works great for:
- Indoor climate control (15-30C, 30-70% RH)
- Outdoor weather stations (-20 to 50C in most climates)
- Refrigerator monitoring (0-8C)
- Greenhouse automation (10-35C)
Will FAIL for:
- Oven monitoring (200C) – far exceeds 80C maximum
- Cryogenic storage (-196C liquid nitrogen) – below -40C minimum
- Industrial steam systems (>100C)
Common Gotcha: Out-of-Range Operation
A sensor operating outside its range might not fail catastrophically – it often just reports wrong data. A DHT22 exposed to 90C will not explode, but it will report garbage readings or freeze at its maximum value.
17.7 Power Consumption: Battery Life Impact
Understanding sensor power consumption is critical for battery-powered IoT devices. Most sensors have two power states:
| Sensor | Active Power | Sleep Power | Reading Time | Total Energy per Reading |
|---|---|---|---|---|
| DHT22 | 1.5 mA @ 3.3V | 50 uA | 2 seconds | 3 mA-s (active only) |
| BME280 | 0.34 mA @ 3.3V | 0.1 uA | 0.5 seconds | 0.17 mA-s active |
| DS18B20 | 1 mA @ 3.3V | 1 uA | 0.75 seconds | 0.75 mA-s active |
| MQ-2 Gas | 150 mA @ 5V | 150 mA | Continuous | No sleep mode! |
Battery life calculation example:
Scenario: Environmental monitoring node
- Battery: 1500 mAh (CR123A lithium)
- Reading interval: Every 5 minutes (288 readings/day)
With DHT22:
- Active time/day: 288 readings x 2 sec = 576 seconds = 9.6 minutes = 0.16 hours
- Active consumption: 0.16 hours x 1.5 mA = 0.24 mAh/day
- Sleep consumption: 23.84 hours x 0.05 mA = 1.19 mAh/day
- Total: ~1.43 mAh/day -> 1,049 days (2.9 years) battery life
With BME280:
- Active time/day: 288 readings x 0.5 sec = 144 seconds = 0.04 hours
- Active consumption: 0.04 hours x 0.34 mA = 0.014 mAh/day
- Sleep consumption: 23.96 hours x 0.0001 mA = 0.002 mAh/day
- Total: ~0.016 mAh/day -> 93,750+ days (theoretical; battery self-discharge limits real life to ~10 years)
Try it: Battery Life Calculator
Low-Power Sensor Selection Tips
- Avoid continuous-operation sensors (like many gas sensors) for battery applications
- Prioritize sensors with sleep modes – look for uA (microamp) not mA (milliamp) sleep current
- Digital sensors often beat analog – they can power down completely
- Consider reading frequency – do you really need readings every minute?
17.8 Worked Example: Cold Chain Monitoring
Scenario: A pharmaceutical distributor needs to monitor temperature during vaccine transport. Vaccines must stay between 2-8C. Regulatory requirement: continuous logging with alarms if temperature leaves the 2-8C range for more than 30 minutes.
Step 1 – Accuracy requirement: The 2-8C window is only 6C wide. If your sensor has +/-2C accuracy, a reading of 5C could mean anything from 3C to 7C. That is usable but gives only 2C of margin on each side. With +/-0.5C accuracy, a reading of 5C means 4.5-5.5C – much safer. Decision: Need +/-0.5C accuracy minimum.
Step 2 – Response time requirement: A vaccine cooler losing power warms at roughly 0.5-1C per hour. To detect a breach 30 minutes before the 8C limit, the sensor must detect a 0.5C change. With +/-0.5C accuracy, you need readings every 5 minutes to reliably distinguish a 0.5C/30-min trend from sensor noise. Decision: 5-minute reading interval or faster.
Step 3 – Operating range: Transport temperatures range from -20C (winter truck) to 45C (summer loading dock). The sensor must function across this range even though the monitored range is 2-8C. Decision: -40C to 80C operating range – DHT22 or DS18B20 both qualify.
Step 4 – Battery life: Transport duration is typically 1-3 days. With readings every 5 minutes, a CR2032 coin cell (225 mAh) powers a DS18B20 (1 mA active x 0.75s per reading, 1 uA sleep) for:
- Active: 288 readings/day x 0.75s x 1mA = 0.06 mAh/day
- Sleep: 23.94 hours x 0.001 mA = 0.024 mAh/day
- Total: 0.084 mAh/day – 2,678 days theoretical (battery self-discharge is the limit, not sensor power)
Step 5 – Cost at scale: 500 shipments/month x 2 sensors each = 1,000 units.
| Sensor | Unit Cost | Accuracy | Interface | Total (1,000 units) |
|---|---|---|---|---|
| DS18B20 | $2.50 | +/-0.5C | 1-Wire | $2,500 |
| SHT31 | $12 | +/-0.2C | I2C | $12,000 |
| PT100 RTD | $45 | +/-0.1C | Analog | $45,000 |
Decision: DS18B20 at $2.50 per unit. Its +/-0.5C accuracy meets the regulatory requirement, 1-Wire interface allows daisy-chaining multiple sensors in one cooler, and the ultra-low sleep current means disposable units are practical. The SHT31 offers better accuracy but at 5x the cost – unnecessary when the regulatory window is 6C wide.
17.9 Worked Example: Smart Agriculture Soil Monitoring
Scenario: A vineyard deploys 500 soil moisture sensors across 50 hectares. Each sensor node runs on solar power with a backup coin cell. The agronomist needs to detect when soil moisture drops below 25% volumetric water content (VWC) to trigger irrigation.
Step 1: Define what “good enough” means
The irrigation system has a 5% deadband (triggers at 25%, stops at 30%). This means the sensor only needs to reliably distinguish “below 25%” from “above 30%.” A sensor with +/-3% VWC accuracy could read 28% when the true value is 25% – missing the irrigation trigger. With +/-1% VWC accuracy, a reading of 26% reliably means “between 25-27%.”
Decision: Need +/-2% VWC accuracy or better.
Step 2: Evaluate candidates
| Spec | Capacitive ($8) | TDR ($120) | Resistive ($3) |
|---|---|---|---|
| Accuracy | +/-2% VWC | +/-0.5% VWC | +/-5% VWC |
| Response time | 2 seconds | 0.1 seconds | 10 seconds |
| Soil contact req. | Good contact | Probe insertion | Probe insertion |
| Calibration needed | Per soil type | Factory calibrated | Per soil type |
| Lifespan (in soil) | 3-5 years | 10+ years | 6-12 months (corrosion) |
| Power consumption | 15 mA active, 5 uA sleep | 50 mA active, 10 uA sleep | 20 mA active, 0 uA (off) |
Step 3: Hardware and Calibration Cost over 5 years (500 sensors)
| Cost Component | Capacitive | TDR | Resistive |
|---|---|---|---|
| Hardware (500 units) | $4,000 | $60,000 | $1,500 |
| Replacements (5 years) | $0 | $0 | $6,000 (replace yearly x4) |
| Per-soil calibration labor | $2,500 (once) | $0 | $12,500 ($2,500/year x5) |
| 5-year total | $6,500 | $60,000 | $20,000 |
Note: This table covers hardware and calibration only. Field visit labor adds significantly to resistive sensor costs – see the detailed TCO analysis below.
Decision: Capacitive sensors at $8 each. The +/-2% accuracy is sufficient for a 5% irrigation deadband, and the 3-5 year lifespan avoids the recurring replacement cost of resistive sensors. TDR offers superior accuracy but at 15x the hardware cost – unnecessary when the irrigation system cannot act on sub-2% differences anyway.
Why NOT resistive? Despite being cheapest per unit, corrosion in wet soil means annual replacement. With 500 sensors, that is 500 field visits per year. Even at a modest $5 labor per visit, that adds $2,500/year in field labor on top of $1,500/year in replacement hardware. The “cheap” option costs over 3x more than capacitive over 5 years when you include calibration.
17.11 Summary
Key takeaways for sensor specifications:
- Match accuracy to application – do not overpay for precision you do not need
- Resolution is not accuracy – high resolution with poor accuracy gives false confidence
- Bias (accuracy error) can be calibrated out; poor precision cannot – prioritize repeatable hardware
- Response time matters for control loops – fast for safety, slow is acceptable for logging
- Operating range must cover all conditions – including environmental extremes
- Power consumption dominates battery life – check sleep current, not just active current
- Total cost of ownership beats unit price – field visits dominate deployment costs at scale
17.12 Try It Yourself
Common Pitfalls
1. Not Distinguishing % Reading from % Full Scale
Accuracy expressed as +-1% of full scale on a 0-100 C sensor means +-1 C anywhere in the range. Accuracy as +-1% of reading means +-0.1 C at 10 C but +-1.0 C at 100 C. These are fundamentally different error models — clarify which interpretation applies before error budgeting.
2. Ignoring Hysteresis in Threshold-Based Control
A sensor with 0.5% FSO hysteresis produces different outputs when heating versus cooling through the same set-point temperature. A thermostat using this sensor without software deadband will oscillate around the set-point. Add a deadband at least as wide as the sensor’s hysteresis specification.
3. Extrapolating Specifications Beyond the Rated Range
A sensor specified as accurate +-1% from 0-60 C has no accuracy guarantee outside that range, even if the output appears reasonable. Operating outside rated conditions may produce plausible-looking values that are actually far outside specification. Design appropriate out-of-range alarms.
4. Confusing Response Time with Sampling Rate
Response time is how quickly the sensor’s physical element tracks a change. Sampling rate is how fast the MCU reads the output. Sampling at 10 Hz with a sensor time constant of 30 s captures 10 readings per second of a slowly-changing signal — but you still cannot detect events faster than the sensor’s physical response, regardless of sampling rate.
17.13 What’s Next
Now that you can interpret sensor specifications and match them to application requirements:
| Chapter | Description |
|---|---|
| Signal Processing | Apply filtering and noise reduction to raw sensor readings |
| Calibration Techniques | Correct systematic errors using calibration procedures |
| Common IoT Sensors | Explore popular sensors and MEMS devices with real datasheets |
| Sensor Interfacing Protocols | Connect sensors using analog, I2C, SPI, and UART interfaces |
| Sensor Selection Guide | Apply a structured decision framework for choosing sensors |
| Datasheets | Read and interpret real-world sensor datasheets |