50x Hc-sr501 Human Motion Sensor Infrared Pir Detection Module Arduino Adj

US $105.89

  • Thomson, Georgia, United States
  • Jan 30th
Fifty HC-SR501 Adjustable IR Pyroelectric Infrared PIR Human Motion Sensor Detection Modules TTL output goes high when it detects people, output is low when it is not detecting. When a person enters the protected area the sensor output is high. When a person leaves the protected area, after the adjustable delay, the sensor output goes low. Static power consumption: 65 microamps Detection range: 100° cone angle (within 23') Operating voltage DC: 4.5-20V Adjustable Delay: 5 - 300 Seconds Quiescent Current: <50uA Output High: 3.3V Output Low: 0V Detection Distance: (Maximum) 23' Inductive Lens Diameter: 0.9" Depth: 0.98" Height: 1.30" Width: 0.94" Product Weight: 0.23 oz The following Arduino Sketch is used to check the PIR modules: /* * PIR sensor tester */ int ledPin = 13; // choose the pin for the LED int inputPin = 2; // choose the input pin (for PIR sensor) int pirState = LOW; // we start, assuming no motion detected int val = 0; // variable for reading the pin status void setup() { pinMode(ledPin, OUTPUT); // declare LED as output pinMode(inputPin, INPUT); // declare sensor as input Serial.begin(9600); } void loop(){ val = digitalRead(inputPin); // read input value if (val == HIGH) { // check if the input is HIGH digitalWrite(ledPin, HIGH); // turn LED ON if (pirState == LOW) { // we have just turned on Serial.println("Motion detected!"); // We only want to print on the output change, not state pirState = HIGH; } } else { digitalWrite(ledPin, LOW); // turn LED OFF if (pirState == HIGH){ // we have just turned of Serial.println("Motion ended!"); // We only want to print on the output change, not state pirState = LOW; } } }

Directions

Similar products from Movement Sensors

People who viewed this item also vieved

By clicking "Accept All Cookies", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.

Accept All Cookies