0% found this document useful (0 votes)
51 views

HC-SR501 PIR Motion Sensor On Arduino

The HC-SR501 PIR motion sensor is easy to connect to an Arduino and can detect motion. It has adjustable sensitivity and output timing controls. The sensor outputs either 3.3V or 0V on its middle pin to indicate motion detection. It has an auto-reset or no-reset mode selected via solder pads or a jumper. In auto-reset mode, the output stays high until motion stops, while in no-reset mode the output stays high for a preset time after triggering.

Uploaded by

Susyana Srip
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

HC-SR501 PIR Motion Sensor On Arduino

The HC-SR501 PIR motion sensor is easy to connect to an Arduino and can detect motion. It has adjustable sensitivity and output timing controls. The sensor outputs either 3.3V or 0V on its middle pin to indicate motion detection. It has an auto-reset or no-reset mode selected via solder pads or a jumper. In auto-reset mode, the output stays high until motion stops, while in no-reset mode the output stays high for a preset time after triggering.

Uploaded by

Susyana Srip
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

HC-SR501 PIR motion sensor

on Arduino
HC-SR501

The HC-SR501 PIR motion sensor is one of


the easiest to connect to an Arduino -or any
other microcontroller for that matter- and can
also be used as a stand alone motion detector.

The HC-SR501 board has 2 variable resistors:


looking at the back, with the connections facing
upwards and the variable resistors at the bottom,
the left resistor is for sensitivity and the right one
is for output timing.
for the sensitivity goes: Clockwise=>High
sensitivity CCW=> low sensitivity (3-7 m). for the
Output timing it is CW=>long, CCW=> short (3-300 sec)
The right prong of the connector is for Vcc (+5-20V), the middle one is
signal out and the left one is ground. The output is either high (3.3V) or
low (0v)

There are two versions of the board. One with a 3 prong jumper and one
with solder pads instead of a jumper. If the jumper is put in its bottom
position (with the board still facing as described) there is no reset. If it is
in its top position (H) it is in auto reset mode. If set to Auto-reset the
sensor will stay high until the motion stops. After motion is no longer
detected the output will go low. If set to No reset (L) the sensor will stop
sensing once it has triggered, and stays high for the preset time period.
To choose one of these settings, simply create a solder-bridge between
the labelled pad and the pad in the middle. the default as i understand is
‘L’
If you search internet for info about this module, you may come across
contradicting info about which is ‘L’ and which is ‘H’ On my board it is as
described: if the solder pads are in the lower-left corner, ‘L’ is the bottom
one and ‘H’ the top one.

The Logic in the sensor is the known BISS0001

/* ---------------------------------------------------
using an HC-SR501 PIR sensor
Sensor on D2
LED on D13
----------------------------------------------------*/

void setup(){
pinMode(13,OUTPUT);
pinMode(2,INPUT);
}

void loop(){
digitalWrite(13,digitalRead(2));
}

You might also like