Sabtu, 22 Oktober 2016

HC-SR501 PIR (Passive InfraRed) Motion Sensor Module

HC-SR501 PinOuts and Controls
Pin or ControlFunction
Time Delay AdjustSets how long the output remains high after detecting motion.... Anywhere from 5 seconds to 5 minutes.
Sensitivity AdjustSets the detection range.... from 3 meters to 7 meters
Trigger Selection JumperSet for single or repeatable triggers.
Ground pinGround input
Output PinLow when no motion is detected.. High when motion is detected. High is 3.3V
Power Pin5 to 20 VDC Supply input

Device Area of Detection

Time Delay Adjustment

HC-SR501 Connection to Arduino

Arduino Sketch
int ledPin = 13;  // LED on Pin 13 of Arduino
int pirPin = 7; // Input for HC-SR501
int pirValue; // Place to store read PIR Value
void setup()
{
  pinMode(ledPin, OUTPUT);
  pinMode(pirPin, INPUT);

  digitalWrite(ledPin, LOW);
}
void loop()
{
  pirValue = digitalRead(pirPin);
  digitalWrite(ledPin, pirValue);
}

Sumber
Arduino HC-SR501 Motion Sensor Tutorial

Where to buy
HC-SR501 PIR Motion Sensor Module

HC-SR501 PIR Motion Sensor Module

Tidak ada komentar:

Posting Komentar