Sensors & Measurement · Study deck

Common Sensor Mistakes

Picture a room sensor that suddenly reports zero degrees.

Physics Phoebe is your guide for this deck.

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

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
iotclass.org

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.

Key terms

Warm-up time
Warm-up time means the delay before a sensor can make a useful claim.
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

Major section

Start With the Measurement Story (continued)

Inter-integrated circuit (I2C) means a short shared wired link between chips.

  • A pull-up resistor keeps a shared wire at a known high level when no part is pulling it low.
  • Warm-up time means the delay before a sensor can make a useful claim.
  • This runway does not diagnose every sensor fault.
iotclass.org

Major section

Phoebe's Field Notes: Two Different "Sampling Rate" Limits

The mathematical gist.: Three limits must not be confused.

  • The chapter's 3.6 V, 12-bit ADC has a 0.879 mV code step, a 0.254 mV RMS floor, and a 74.0 dB ideal ceiling.

Numbers to remember

3.6 VThe chapter's 3.6 V, 12-bit ADC has a 0.879 mV code step
0.879 mV12-bit ADC has a 0.879 mV code step
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

Major section

For Beginners: Common Sensor Mistakes

Working with sensors can be frustrating when things do not work, but most problems come from the same handful of mistakes.

  • The most dangerous is using the wrong voltage -- connecting a 5-volt sensor to a 3.3-volt microcontroller pin is like plugging a European appliance into an American outlet without an adapter.
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

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.
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

Major section

Putting Numbers to It

Prevention cost is roughly $424 for pull-ups, decoupling capacitors, and ventilated enclosures.

  • A 30-minute pre-deployment review of this checklist would have prevented $6,500 in losses.
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

Major section

For Kids: Meet the Sensor Squad!

Temperature Terry had a terrible day.

  • He got connected to 5 volts when he only handles 3.3 volts, and POOF -- magic smoke! "My GPIO pin is FRIED!" cried the microcontroller.
  • Most problems are in step 1 or 2!".
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

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.
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

Major section

Check Max Ratings

The recommended operating conditions describe safe limits; absolute maximum ratings describe destruction thresholds — often just 10-20% above operating conditions.

  • Exceeding absolute maximum ratings, even briefly during power-up transients, can permanently damage the sensor.
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

Major section

Connect Every Ground Pin

Some sensors have separate DGND and AGND pins, both of which must be connected.

  • Connecting only one causes incorrect measurements or communication failures.
  • Both ground pins must be tied to circuit ground — separate labels refer to internal routing, not separate external nets.
${yMax.toFixed(0)} ${yMin.toFixed(0)}
iotclass.org

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.

  • Inter-integrated circuit (I2C) means a short shared wired link between chips.
  • The mathematical gist.: Three limits must not be confused.
  • Working with sensors can be frustrating when things do not work, but most problems come from the same handful of mistakes.
  • Different sensors have different maximum sampling rates.
iotclass.org

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?

AMatch range, accuracy, environment, interface, power, calibration.
BChoose the cheapest sensor first and define requirements afterward
CSelect from typical accuracy figures measured at room temperature.
DChoose the finest resolution within the available budget.
Show answer

Answer: A Most sensor mistakes come from selecting hardware before matching requirements and operating conditions.

iotclass.org

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?

AThe ESP32 correctly reads the signal since it can handle up to 5V
BThe reading will be slightly inaccurate but otherwise fine
CThe ESP32 GPIO pin may be damaged because it cannot handle voltages above 3.3V
DThe ultrasonic sensor will be damaged by the ESP32
Show answer

Answer: C

iotclass.org

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?

AThe sensor is defective and should be returned
BWait for MQ warm-up before trusting readings.
CThe ADC reference voltage is incorrect
DThe sensor needs calibration with a reference gas
Show answer

Answer: B 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.

iotclass.org

Retrieval practice

Recall check 4 of 4

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

Q4Your I2C sensor scanner finds NO devices on the bus. What should you check first?

AReplace the sensor immediately
BVerify pull-up resistors on SDA and SCL.
CChange the I2C clock speed to 100kHz
DSwap SDA and SCL wire connections
Show answer

Answer: B

Q5Place each sensor mistake at its failure boundary so you can diagnose the cause before changing code or replacing a healthy device.

AIncorrect Wiring
BMissing Pull-Up Resistors
CRaw ADC Without Calibration
DIgnoring Warm-Up Time
Show answer

Answer: A Place each sensor mistake at its failure boundary so you can diagnose the cause before changing code or replacing a healthy device.

iotclass.org

Print reference

Answers

Answer key.

  1. A · Most sensor mistakes come from selecting hardware before matching requirements and operating conditions.
  2. C
  3. B · 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.
  4. B
  5. A · Place each sensor mistake at its failure boundary so you can diagnose the cause before changing code or replacing a healthy device.
iotclass.org