Sensors & Measurement · Study deck
Light and Proximity Labs: Calibrating Sensors
Picture a cupboard light that should turn on when a hand reaches inside.
Physics Phoebe is your guide for this deck.
After studying this chapter
Learning objectives
You will be able to:
- Interface light sensors: Configure BH1750 digital lux meter and LDR analog sensors
- Build proximity detection: Use PIR motion sensors and HC-SR04 ultrasonic distance sensors
- Compare touch sensing technologies: Differentiate capacitive and skin-inspired tactile sensor architectures
- Diagnose I2C communication: Scan buses, address multiple sensors, and resolve communication issues

Major section
Start With the Measurement Story
General purpose input output (GPIO) pins are simple digital connections that read or set an on-or-off state.
- Inter-integrated circuit (I2C) is a shared wired link that lets a controller talk to addressed parts.
- One short lab cannot cover every material or room.
- The BH1750 example uses an I2C interface and reports the light level in lux.

Major section
Learning Points: Light Sensing
A light reading supports different actions as the available natural illumination changes during the day.
- Street lighting can dim when natural light is sufficient, while a display adjusts backlighting for its viewing conditions.
- Smart street lights: Dim when natural light is sufficient.
- The light lab established how illumination becomes a stable decision.
Major section
Proximity & Presence Sensors
PIR (Passive Infrared) sensors detect motion by measuring changes in infrared radiation from warm bodies (humans, animals).
- The lens and housing determine optical zones, adjustment access, weather and tamper protection, and mounting repeatability; none of them changes the PIR evidence boundary examined next.
- What to Observe Before Coding: PIR sensors do not identify people.
- They detect changes in infrared energy across their detection zones.

Major section
Learning Points: PIR Sensors
A PIR motion sensor provides a digital state for a motion-triggered light or alert.
- The sensor needs a warm-up interval after power-on before the test should judge its normal behavior.
- Sensitivity and hold-time controls change detection and output persistence rather than converting the output into an illuminance reading.
- A useful test connects motion in the detection area to the expected light or security response.

Major section
Checkpoint: Presence Evidence
Ultrasonic ranging answers a different question: how far away the reflecting surface is, and whether the timing math still holds under the current air temperature.
- The HC-SR04 operates at 5V logic, but the ESP32 GPIO pins are 3.3V.
- The ECHO pin outputs a 5V HIGH signal that can damage the ESP32.
- What to Observe Before Coding: The HC-SR04 measures time, not distance directly.

Major section
Ultrasonic Measurement Flow
An ultrasonic distance measurement starts with a trigger and uses the returning echo pulse as timing evidence.
- The measured echo interval includes the outward and return travel of the sound.
- Temperature affects the speed of sound, so compensation changes the conversion from elapsed time to the reported distance.
- where d is distance, t is echo pulse duration in microseconds, and vsound is 343 m/s (0.0343 cm/µs) at 20°C.
Deck summary
Key takeaways
General purpose input output (GPIO) pins are simple digital connections that read or set an on-or-off state.
- A light reading supports different actions as the available natural illumination changes during the day.
- PIR (Passive Infrared) sensors detect motion by measuring changes in infrared radiation from warm bodies (humans, animals).
- A PIR motion sensor provides a digital state for a motion-triggered light or alert.
- Ultrasonic ranging answers a different question: how far away the reflecting surface is, and whether the timing math still holds under the current air temperature.
Retrieval practice
Recall check 1 of 2

Physics Phoebe says: answer from memory, then check your reasoning.
Q1An automatic display needs brighter backlighting in bright daylight. Which measurement fits the chapter’s example?
Show answer
Answer: D The light-sensing example connects lux measurements to display brightness.
Retrieval practice
Recall check 2 of 2

Physics Phoebe says: answer from memory, then check your reasoning.
Q2A motion-light prototype is evaluated immediately after power-on. What condition should the tester account for?
Show answer
Answer: C The section states that the sensor needs a warm-up period after power-on.
Print reference
Answers
Answer key.
- D · The light-sensing example connects lux measurements to display brightness.
- C · The section states that the sensor needs a warm-up period after power-on.