CorsoApplicazioni_IoT

View on GitHub

ESP8266 Motion Detection With PIR

PIR HC-RS501

The output of the HC-SR501 PIR Motion Sensor is:

If you start the motion sensor, you must wait for 60 seconds for an initial stabilization time to get accurate measurements. We will consider this initial stabilization time in the setup function of our Arduino program code.

The HC-SR501 has in total 3 adjustment options:

  1. Single trigger (Low) where several consecutive triggers are recognized as one trigger or repeating trigger (High) where every detected trigger is computed.
  2. Delay time that defines how long the output of the HC-SR501 stays HIGH after a motion is detected between 2.5 seconds and 5 minutes. Measuring distance between 3 meters and 7 meters.

  3. The measuring angle of the HC-SR501 is 110° to be able to record movements in a wide angle in front of the sensor.

PIR HC-RS501 Pinout

Wiring

source: https://diyi0t.com/hc-sr501-pir-motion-sensor-arduino-esp8266-esp32/