HC-SR501 PIR Motion Detector – With Arduino & Raspberry Pi
More info at https://dronebotworkshop.com
Code & Article at https://dbot.ws/hcsr501
The HC-SR501 is a PIR (Passive Infrared) motion sensor that is very inexpensive and extremely versatile. This device can be used all on its own or with a microcontroller or microcomputer for additional functionality.
The HC-SR501 has a built-in voltage regulator so it can run on anywhere from 4.5 to 20 volts, making it ideal for battery powered applications. The device has a sensitivity that can be adjusted from 3 to 7 meters and it can hold its output from 23 to 300 seconds.
With the addition of a light dependent resistor (LDR) it can be set to only operate in the dark making it ideal for an emergency lighting project.
In this video I will explain how Passive Infrared Sensors work and how to hook up the HC-SR501 to a relay to control external devices when motion from humans or animals is detected. I’ll also show you how to hook up the optional light sensor to make an effective nightlight.
We will then add an Arduino to the HC-SR501 give it some additional functionality
.
After that I’ll bring out a Raspberry Pi Zero W and a Raspberry Pi Camera to construct an intruder detector that can take a picture or a video of the sneaky person who is trying to steal our jelly beans!
The video is laid out as follows:
How PIR Sensors Work – 1:58
Look at HC-SR501 – 3:02
Demo 1 – HC-SR501 on its Own – 6:06
Demo 2 – Adding a Light Detector – 10:47
Demo 3 – HC-SR501 with an Arduino – 14:11
Demo 4 – HC-SR501 with Raspberry Pi & Camera – 22:36
Project – Motion sensor taking picture – 31:15
Project – Motion Sensor taking video – 41:37
As always you’ll find a detailed article and all of the code you need (including in downloadable format) on the website at https://dbot.ws/hcsr501
Let me know what you think in the comments and if you haven’t already PLEASE SUBSCRIBE!
Now let’s get moving!
source