Sensors & Measurement · Study deck
Common Sensor Mistakes
Picture a room sensor that suddenly reports zero degrees.
Physics Phoebe is your guide for this deck.
After studying this chapter
Learning objectives
You will be able to:
- Diagnose the top 10 sensor mistakes using a systematic debugging checklist
- Construct voltage divider circuits and pull-up resistor configurations that prevent hardware damage
- Validate sensor readings with a three-layer error-checking pattern (NaN, range, rate-of-change)
- Calculate the cost impact of sensor deployment failures and justify prevention investments
Major section
Start With the Measurement Story
The room may be cold, but the same number can also mean a loose wire, wrong power, blocked data line, or reading taken too soon.
- A safe design keeps those states separate.
- A sampling rate means how often a sensor takes a reading.
- GPIO means general purpose input and output pins on a controller.
Major section
Phoebe's Field Notes: Two Different "Sampling Rate" Limits
The mathematical gist: Three limits must not be confused.
- Its BMP280 example's 157 Hz output rate gives a 78.5 Hz Nyquist ceiling.
- The DHT22's 0.5 Hz rating instead means one completed conversion every 2 s; faster polling repeats stale codes rather than creating an alias spectrum.
- Working with sensors can be frustrating when things do not work, but most problems come from the same handful of mistakes.
Major section
Voltage Mismatch Damage
Why it works initially then fails: The protection circuit can handle brief overvoltage spikes (ESD events), but continuous overvoltage causes cumulative thermal stress.
- After minutes to hours, the junction fails permanently.
- Why: I2C and 1-Wire use open-drain outputs - resistors "pull" the line HIGH when not driven LOW.
- After voltage is safe, the next group of mistakes is about trust over time.
Major section
Try It: Sampling Rate vs Sensor Limits
Different sensors have different maximum sampling rates.
- Explore what happens when your code polls faster than the sensor can respond, and see how many valid vs stale readings you get.
- Mistake: Using default I2C address when sensor has address pin.
- Prevention cost is roughly $424 for pull-ups, decoupling capacitors, and ventilated enclosures.
Major section
Accuracy, Precision, Drift
The mistake checklist above keeps sensors alive and communicating.
- The companion page separates the measurement-quality errors that often remain after wiring is correct: accuracy, precision, drift, hysteresis, resolution, and uncertainty.
- Hint: The code compiles and the logic looks correct, but readings are garbage.
- Problem: HC-SR04 ECHO pin outputs 5V logic, but ESP32 GPIO18 is only 3.3V tolerant.
Major section
Check Max Ratings
Recommended operating conditions describe the specified functional range; absolute maximum ratings mark stress levels beyond which permanent damage can occur, with the gap depending on the device.
- Exceeding absolute maximum ratings, even briefly during power-up transients, can permanently damage the sensor.
- Some sensors have separate DGND and AGND pins, both of which must be connected.
- Connecting only one causes incorrect measurements or communication failures.
Deck summary
Key takeaways
The room may be cold, but the same number can also mean a loose wire, wrong power, blocked data line, or reading taken too soon.
- The mathematical gist: Three limits must not be confused.
- Why it works initially then fails: The protection circuit can handle brief overvoltage spikes (ESD events), but continuous overvoltage causes cumulative thermal stress.
- Different sensors have different maximum sampling rates.
- The mistake checklist above keeps sensors alive and communicating.
Retrieval practice
Recall check 1 of 4

Physics Phoebe says: answer from memory, then check your reasoning.
Q1Which habit prevents many common sensor-selection mistakes?
Show answer
Answer: B Most sensor mistakes come from selecting hardware before matching requirements and operating conditions.
Retrieval practice
Recall check 2 of 4

Physics Phoebe says: answer from memory, then check your reasoning.
Q2Your HC-SR04 ultrasonic sensor outputs a 5V signal on the ECHO pin. You connect it directly to an ESP32 GPIO input (3.3V max). What happens?
Show answer
Answer: D see answers page
Retrieval practice
Recall check 3 of 4

Physics Phoebe says: answer from memory, then check your reasoning.
Q3Your MQ-135 air quality sensor gives wildly inaccurate readings for the first hour of operation. What is the most likely cause?
Show answer
Answer: C MQ-series gas sensors use a heated sensing element that requires an extended burn-in period (24-48 hours for initial use, 5-10 minutes for subsequent power-ons) to stabilize.
Retrieval practice
Recall check 4 of 4

Physics Phoebe says: answer from memory, then check your reasoning.
Q4An I2C scanner finds no devices. Power and SDA/SCL wiring have been verified, but the open-drain lines have no confirmed pull-ups. What should you check next?
Show answer
Answer: D see answers page
Q5What startup mistake produces a nonrepresentative reading when a sensor needs time to stabilise?
Show answer
Answer: D Warm-up belongs to startup timing because some sensors need stabilisation before a reading is representative.
Print reference
Answers 1 of 3
Answer key.
- B · Most sensor mistakes come from selecting hardware before matching requirements and operating conditions.
- D · ESP32 GPIO pins are rated for a maximum of 3.3V. Applying 5V directly will likely damage the GPIO pin (and potentially the entire chip). The fix is to use a voltage divider (e.g., 2k and 3.3k resistors) to step down the ECHO signal, or use a dedicated 3.3V-compatible ultrasonic sensor variant.
Print reference
Answers 2 of 3
Answer key.
- C · MQ-series gas sensors use a heated sensing element that requires an extended burn-in period (24-48 hours for initial use, 5-10 minutes for subsequent power-ons) to stabilize.
- D · I2C uses open-drain outputs that require external pull-up resistors (typically 4.7kohm) to work. Without pull-ups, the bus cannot transition to HIGH state, and communication fails silently. Many breakout boards include pull-ups, but generic modules often do not. Always check for pull-ups before assuming hardware failure.
Print reference
Answers 3 of 3
Answer key.
- D · Warm-up belongs to startup timing because some sensors need stabilisation before a reading is representative.