Unik Systems Logo
Unik Systems
Back to knowledge base
guides

DIY Motion-Activated Security Floodlight & Alarm Using PIR Sensor HC-SR501

Design an energy-saving motion-sensing security lighting system with ambient daylight override and adjustable delay timing using the HC-SR501 PIR sensor.

Kunal (Founder & Owner) 1 min read7 Oct 2026
DIY Motion-Activated Security Floodlight & Alarm Using PIR Sensor HC-SR501

DIY Motion-Activated Security Floodlight & Alarm Using PIR Sensor HC-SR501

Passive Infrared (PIR) sensors detect changes in thermal blackbody radiation emitted by moving warm bodies (humans and animals). In this project, we combine an HC-SR501 sensor with an ESP32 and optocoupled relay to automate exterior floodlights, firing push notifications to your phone upon unauthorized perimeter breach.


1. Tuning the HC-SR501 Potentiometers

The HC-SR501 features two onboard trimpots:

  1. Sensitivity (Distance): Clockwise increases detection range up to 7 meters.
  2. Time Delay: Clockwise increases latch duration from 3 seconds up to 5 minutes.

Parts used in this tutorial

Buy them in one click — ships from Pune across India.

3 ITEMS
Approx. total ₹523.53 (before GST)Add all to cart
#security#esp32#motion-detector
Found this useful? Tell us what you'd like to read next via our RFQ form.