PIR Motion Sensor
Introduction¶
This is a highly integrated module popularly used for human-being entry detection, it can simplely and easily to adopt in system. There are two adjustable potentiometer on the module, you can use them to change the trigger sensitivity and the duration of the trigger signal.Besides,The module can also be set as retriggerable or un- retriggerable. When the switch is in the H position, the module is retriggerable and is unretrigerred when the switch is in L position.
Model: SOD00101S
Specification¶
- Input Voltage: DC 4.5-20V
- Static current: 50uA
- Output signal: 0,3V or 5V (Output high when motion detected)
- Sentry Angle: 110 degree
- Sentry Distance: max 7 m
- Shunt for setting overide trigger: H - Yes, L - No
Interface¶
Usage¶
Hardware¶
Connect this sensor to your Arduino/Crowduino digital pins( D2 for example). Adjust the RT&CDS to change trigger sensitivity and duration of the trigger signal.Set the module as retriggerable or un- retriggerable with the switch, when the H position, the module is retriggerable and is unretrigerred when the switch is in L position.
Programming¶
1.Copy and paste code below to a new Arduino sketch.
const int PIRPin = 2;// the number of the PIR Motion sensor pin
const int ledPin=13;//The led to indicate the motion
int PIRState = 0; // variable for reading the PIR Motion sensor status
void setup(){
pinMode(PIRPin, INPUT);//Use pin 2 to receive the signal outputted by the module
pinMode(ledPin, OUTPUT);
}
void loop() {
PIRState=digitalRead(PIRPin);
if(PIRState==HIGH)
{
digitalWrite(ledPin,HIGH);
}
else
{
digitalWrite(ledPin,LOW);
}
}
2.Upload the code,When someone moves before the sensor, the led on the arduino board light.