

The Keyestudio PIR Motion Sensor is a Passive Infrared (PIR) sensor designed to detect motion by measuring changes in infrared radiation. It is highly sensitive to human movement and is commonly used in security systems, home automation, and energy-saving applications such as automatic lighting systems. This sensor is compact, easy to use, and compatible with microcontrollers like Arduino, making it an excellent choice for both beginners and advanced users.








The Keyestudio PIR Motion Sensor has the following technical specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Operating Current | < 60 µA |
| Detection Range | Up to 7 meters |
| Detection Angle | 120° |
| Output Signal | Digital (High: 3.3V, Low: 0V) |
| Trigger Modes | Repeatable (default) |
| Warm-up Time | ~30 seconds |
| Dimensions | 32mm x 24mm x 25mm |
The Keyestudio PIR Motion Sensor has a 3-pin interface:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (5V DC) |
| 2 | OUT | Digital output signal (High when motion is detected) |
| 3 | GND | Ground connection |
VCC pin to a 5V power source and the GND pin to ground.OUT pin to a digital input pin on your microcontroller (e.g., Arduino).Below is an example of how to connect the Keyestudio PIR Motion Sensor to an Arduino UNO:
VCC pin of the sensor to the 5V pin on the Arduino.GND pin of the sensor to the GND pin on the Arduino.OUT pin of the sensor to digital pin 2 on the Arduino.Here is a sample Arduino sketch to use the Keyestudio PIR Motion Sensor:
// Define the pin connected to the PIR sensor's output
const int pirPin = 2; // Digital pin 2
const int ledPin = 13; // Built-in LED pin for indication
void setup() {
pinMode(pirPin, INPUT); // Set PIR sensor pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication for debugging
}
void loop() {
int motionDetected = digitalRead(pirPin); // Read the PIR sensor output
if (motionDetected == HIGH) { // If motion is detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Motion detected!"); // Print message to serial monitor
} else {
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No motion detected."); // Print message to serial monitor
}
delay(500); // Small delay to avoid rapid toggling
}
No Output Signal:
VCC and GND connected).OUT pin is connected to the correct digital input pin.False Triggers:
Short Detection Range:
Q: Can the detection range be adjusted?
A: No, the detection range of the Keyestudio PIR Motion Sensor is fixed at up to 7 meters. However, you can adjust the sensor's placement to optimize its coverage.
Q: Can this sensor detect stationary objects?
A: No, the PIR sensor detects motion by sensing changes in infrared radiation. It cannot detect stationary objects.
Q: Is the sensor compatible with 3.3V systems?
A: The sensor requires a 5V power supply for operation, but its output signal (3.3V HIGH) is compatible with 3.3V logic systems.
Q: How do I change the trigger mode?
A: The Keyestudio PIR Motion Sensor is set to "repeatable trigger" mode by default. Changing the trigger mode requires hardware modifications, which are not recommended for beginners.
By following this documentation, you can effectively integrate the Keyestudio PIR Motion Sensor into your projects and troubleshoot common issues with ease.