Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use PIR Sensor: Examples, Pinouts, and Specs

Image of PIR Sensor
Cirkit Designer LogoDesign with PIR Sensor in Cirkit Designer

Introduction

The Keyestudio Passive Infrared Sensor (PIR Sensor) is an electronic sensor that detects motion by measuring changes in the infrared light radiating from objects within its field of view. It is commonly used in security systems, lighting controls, and home automation systems to detect the presence of a human or animal.

Explore Projects Built with PIR Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO with PIR Sensor and Bluetooth Connectivity
Image of smart home security system: A project utilizing PIR Sensor in a practical application
This circuit features an Arduino UNO connected to a PIR (Passive Infrared) sensor and an HC-05 Bluetooth module. The PIR sensor detects motion and sends a signal to the Arduino, which then communicates via Bluetooth using the HC-05 module. The embedded code on the Arduino is configured to send a specific message over serial when motion is detected by the PIR sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based Motion Detection System with PIR Sensor
Image of pir: A project utilizing PIR Sensor in a practical application
This circuit consists of an Arduino UNO microcontroller connected to a PIR sensor. The PIR sensor is powered by the Arduino's 5V and GND pins, and its signal output is connected to the Arduino's digital pin D2. The setup is likely intended for motion detection applications.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO PIR Motion Sensor Interface
Image of Interfacing PIR Sensor With Arduino UNO To Detect Motion: A project utilizing PIR Sensor in a practical application
This circuit connects a PIR (Passive Infrared) sensor to an Arduino UNO microcontroller to detect motion. When the PIR sensor detects motion, the Arduino activates an LED on pin D13 and sends a notification to the serial monitor. The circuit is designed for applications requiring motion detection, such as security systems or automated lighting.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based Motion Detection System with Bluetooth Connectivity
Image of iot: A project utilizing PIR Sensor in a practical application
This circuit features an Arduino UNO connected to a PIR (Passive Infrared) sensor and a Bluetooth module. The PIR sensor's signal pin is connected to the Arduino's digital pin D7 to detect motion, and the Bluetooth module is interfaced through the Arduino's serial pins D0 (RX) and D1 (TX) for wireless communication. The Arduino is programmed to send a specific signal over Bluetooth when motion is detected by the PIR sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with PIR Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of smart home security system: A project utilizing PIR Sensor in a practical application
Arduino UNO with PIR Sensor and Bluetooth Connectivity
This circuit features an Arduino UNO connected to a PIR (Passive Infrared) sensor and an HC-05 Bluetooth module. The PIR sensor detects motion and sends a signal to the Arduino, which then communicates via Bluetooth using the HC-05 module. The embedded code on the Arduino is configured to send a specific message over serial when motion is detected by the PIR sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of pir: A project utilizing PIR Sensor in a practical application
Arduino UNO-Based Motion Detection System with PIR Sensor
This circuit consists of an Arduino UNO microcontroller connected to a PIR sensor. The PIR sensor is powered by the Arduino's 5V and GND pins, and its signal output is connected to the Arduino's digital pin D2. The setup is likely intended for motion detection applications.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Interfacing PIR Sensor With Arduino UNO To Detect Motion: A project utilizing PIR Sensor in a practical application
Arduino UNO PIR Motion Sensor Interface
This circuit connects a PIR (Passive Infrared) sensor to an Arduino UNO microcontroller to detect motion. When the PIR sensor detects motion, the Arduino activates an LED on pin D13 and sends a notification to the serial monitor. The circuit is designed for applications requiring motion detection, such as security systems or automated lighting.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of iot: A project utilizing PIR Sensor in a practical application
Arduino UNO-Based Motion Detection System with Bluetooth Connectivity
This circuit features an Arduino UNO connected to a PIR (Passive Infrared) sensor and a Bluetooth module. The PIR sensor's signal pin is connected to the Arduino's digital pin D7 to detect motion, and the Bluetooth module is interfaced through the Arduino's serial pins D0 (RX) and D1 (TX) for wireless communication. The Arduino is programmed to send a specific signal over Bluetooth when motion is detected by the PIR sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Motion-activated lighting
  • Security alarms
  • Automatic door openers
  • Presence detection for energy-saving systems

Technical Specifications

Key Technical Details

  • Operating Voltage: 5V DC
  • Idle Current: <50uA
  • Output Voltage: High 3.3V (motion detected), Low 0V (no motion)
  • Detection Range: Up to 7 meters
  • Detection Angle: < 100 degrees
  • Delay Time: Adjustable from 0.3 seconds to 5 minutes
  • Operating Temperature: -20°C to +70°C

Pin Configuration and Descriptions

Pin Number Name Description
1 VCC Connect to 5V power supply
2 OUT Output signal (High/Low)
3 GND Connect to ground

Usage Instructions

How to Use the Component in a Circuit

  1. Connect the VCC pin to a 5V power supply.
  2. Connect the GND pin to the ground of the power supply.
  3. Connect the OUT pin to a digital input pin on a microcontroller, such as an Arduino UNO.

Important Considerations and Best Practices

  • Ensure that the sensor is not exposed to direct sunlight or placed near heating devices to avoid false triggers.
  • Avoid placing the sensor in an area with frequent temperature fluctuations.
  • The sensor requires a warm-up time of approximately 20-60 seconds to calibrate to the infrared energy of the room.
  • Adjust the delay time and sensitivity knobs according to the specific application needs.

Example Arduino UNO Code

// Define the PIR sensor pin
const int PIRPin = 2; // Connect PIR sensor output to digital pin 2

void setup() {
  pinMode(PIRPin, INPUT); // Initialize the PIR sensor pin as an input
  Serial.begin(9600);     // Start serial communication at 9600 baud rate
}

void loop() {
  int motionState = digitalRead(PIRPin); // Read the state of the PIR sensor

  // Check if the sensor detected motion
  if (motionState == HIGH) {
    // Motion detected
    Serial.println("Motion detected!");
    // Add your code here to handle motion detection event
  } else {
    // No motion detected
    Serial.println("No motion detected.");
  }

  // Wait for a short period to avoid flooding the serial output
  delay(100);
}

Troubleshooting and FAQs

Common Issues Users Might Face

  • False Positives: The sensor may trigger without the presence of motion. This can be due to environmental factors such as moving curtains, changes in lighting, or HVAC systems.
  • No Response: If the sensor does not detect motion, ensure it is properly powered and the pins are correctly connected.

Solutions and Tips for Troubleshooting

  • Adjust Sensitivity: Use the sensitivity adjustment knob on the sensor to reduce the range and prevent false positives.
  • Check Connections: Verify that all connections are secure and the sensor is receiving power.
  • Allow Warm-Up Time: Give the sensor time to calibrate upon initial power-up.

FAQs

Q: Can the PIR sensor detect motion through glass or walls? A: No, the PIR sensor cannot detect motion through solid barriers like glass or walls.

Q: How can I extend the detection range of the PIR sensor? A: The detection range is fixed and cannot be extended beyond the sensor's specifications.

Q: Is the PIR sensor waterproof? A: No, the Keyestudio PIR sensor is not waterproof and should be used indoors or in a weather-protected area.

Q: How do I adjust the delay time for the sensor? A: Use the delay time adjustment knob on the sensor to set the duration for which the output remains high after detecting motion.

For further assistance, please refer to the Keyestudio PIR Sensor datasheet or contact technical support.