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.

sensorproximitylight
iotclass.org

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

Major section

Light Sensors

The BH1750 example uses an I2C interface and reports the light level in lux.

  • Automatic displays can increase brightness in daylight and use a more moderate setting indoors.
  • The useful decision connects the measured lighting condition to the display or lamp behavior instead of treating a bus address as a light measurement.
iotclass.org

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.
  • They detect changes in infrared energy across their detection zones.
Exposed PIR development module with Fresnel lens and adjustment controls
Exposed PIR development module with Fresnel lens and adjustment controls
iotclass.org

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

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.

Numbers to remember

5VThe HC-SR04 operates at 5V logic
3.3Vbut the ESP32 GPIO pins are 3.3V.
HC-SR04 ultrasonic distance-sensor board with two round metal transducers and four labeled connection pins
HC-SR04 ultrasonic distance-sensor board with two round metal transducers and four labeled connection pins
iotclass.org

Deck summary

Key takeaways

The BH1750 example uses an I2C interface and reports the light level in lux.

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

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?

AAmbient illuminance from the digital light sensor
BA PIR motion output as a daylight measurement
CA sensor’s I2C address as the brightness level
DThe power-down current as a proxy for daylight
Show answer

Answer: A The light-sensing example connects lux measurements to display brightness.

iotclass.org

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?

AThe assumption that HIGH represents a lux reading
BThe light sensor’s address as PIR readiness proof
CThe hold-time setting as a replacement for warm-up
DThe PIR sensor’s warm-up interval
Show answer

Answer: D The section states that the sensor needs a warm-up period after power-on.

iotclass.org

Print reference

Answers

Answer key.

  1. A · The light-sensing example connects lux measurements to display brightness.
  2. D · The section states that the sensor needs a warm-up period after power-on.
iotclass.org