PIR Description | |
---|---|
Model | MH-SR505 (HC-SR505) |
Manufacturer | |
Operating voltage | 4.5 - 20V |
Quiescent Current | 60µA |
Output level | 3.3V |
Retriggerable | Y |
Delay time | 8s |
Block time | |
Board Dimensions | 10 x 23mm |
Sensor cone angle | < 100º |
Sensor range | < 3m |
Operation Temperature | -20 to +80ºC |
Sensor lens size | 10mm |
Arduino test code:
#define PIR_MOTION_SENSOR 2 //Pin D2 is connected the module output #define LED 13 //Assume the Arduino has an LED on D13 void setup() { pinMode(PIR_MOTION_SENSOR, INPUT); pinMode(LED,OUTPUT); digitalWrite(LED,LOW); } void loop() { int sensorValue = digitalRead(PIR_MOTION_SENSOR); if(sensorValue == HIGH) digitalWrite(LED,HIGH); else digitalWrite(LED,LOW); }