Skip to content
Adaptive AgroTech NetworkUniversity of Southern Denmark · SDU Drone Center
Cover for ESP32 Motion & Daylight Lighting | PIR Sensor and Timer

Video by Adaptive AgroTech. If the embedded player is unavailable, open the original video ↗.

ESP32 Motion & Daylight Lighting | PIR Sensor and Timer

An ESP32 can combine a PIR motion event with a daylight measurement to decide when lighting is needed. A timer controls how long the light remains on.

Understand the concept

The key idea

The PIR detects changes within its field of view, while the daylight input indicates whether extra illumination is useful. The controller can extend the on-time after a new motion event.

What to remember

  • Treat motion and darkness as separate input conditions.
  • Define when a fresh motion event restarts the delay.
Pause & think

Check your understanding

Why might a PIR-controlled light switch off while someone is still present?

Show the explanation

A stationary person may produce too little change for a fresh motion event.