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

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

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

Introduction

A Passive Infrared (PIR) Motion Sensor detects motion by measuring changes in infrared radiation, typically emitted by objects in its field of view. These sensors are widely used in security systems, automatic lighting, and home automation due to their ability to detect human or animal movement efficiently. PIR sensors are cost-effective, low-power, and easy to integrate into various electronic projects.

Explore Projects Built with PIR Motion 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!
PIR Motion-Activated LED Light
Image of 0: A project utilizing PIR Motion Sensor in a practical application
This circuit is a simple motion-activated LED light system. The HC-SR505 Mini PIR Motion Sensing Module is powered by a 9V battery and detects motion, upon which it sends an output signal to turn on the red LED. The LED and the PIR sensor share a common ground with the battery, completing the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Motion Detector with PIR Sensor and LED Indicator
Image of PIR: A project utilizing PIR Motion Sensor in a practical application
This circuit is a motion detection system using an Arduino UNO, a PIR sensor, and an LED. The PIR sensor detects motion and sends a signal to the Arduino, which then turns on the LED to indicate motion has been detected.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Motion-Activated LED Light with PIR Sensor
Image of EIMS: A project utilizing PIR Motion Sensor in a practical application
This circuit uses a PIR motion sensor to detect movement and subsequently light up a red LED. The PIR sensor is powered by a 9V battery, and its output is connected to the LED through a 10k Ohm resistor to limit the current.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered PIR Motion Sensor Alarm with Relay and Buzzer
Image of motion detector using pir motio0n sensor: A project utilizing PIR Motion Sensor in a practical application
This circuit is a motion-activated alarm system. It uses a PIR motion sensor to detect movement, which triggers a relay module to activate a buzzer powered by a 9V battery, providing an audible alert.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with PIR Motion 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 0: A project utilizing PIR Motion Sensor in a practical application
PIR Motion-Activated LED Light
This circuit is a simple motion-activated LED light system. The HC-SR505 Mini PIR Motion Sensing Module is powered by a 9V battery and detects motion, upon which it sends an output signal to turn on the red LED. The LED and the PIR sensor share a common ground with the battery, completing the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of PIR: A project utilizing PIR Motion Sensor in a practical application
Arduino UNO Motion Detector with PIR Sensor and LED Indicator
This circuit is a motion detection system using an Arduino UNO, a PIR sensor, and an LED. The PIR sensor detects motion and sends a signal to the Arduino, which then turns on the LED to indicate motion has been detected.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of EIMS: A project utilizing PIR Motion Sensor in a practical application
Battery-Powered Motion-Activated LED Light with PIR Sensor
This circuit uses a PIR motion sensor to detect movement and subsequently light up a red LED. The PIR sensor is powered by a 9V battery, and its output is connected to the LED through a 10k Ohm resistor to limit the current.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of motion detector using pir motio0n sensor: A project utilizing PIR Motion Sensor in a practical application
Battery-Powered PIR Motion Sensor Alarm with Relay and Buzzer
This circuit is a motion-activated alarm system. It uses a PIR motion sensor to detect movement, which triggers a relay module to activate a buzzer powered by a 9V battery, providing an audible alert.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Security systems (e.g., motion-activated alarms)
  • Automatic lighting systems
  • Smart home automation
  • Energy-saving devices
  • Robotics and interactive systems

Technical Specifications

Below are the key technical details of a typical PIR motion sensor:

Parameter Value
Operating Voltage 3.3V to 5V
Current Consumption < 60 µA (standby)
Detection Range 3 to 7 meters (adjustable)
Detection Angle 110° to 120°
Output Signal Digital (High: 3.3V/5V, Low: 0V)
Warm-up Time 30 to 60 seconds
Operating Temperature -20°C to 50°C

Pin Configuration and Descriptions

Pin Name Description
1 VCC Power supply pin. Connect to 3.3V or 5V.
2 OUT Digital output pin. Outputs HIGH (3.3V/5V) when motion is detected, LOW (0V) otherwise.
3 GND Ground pin. Connect to the ground of the circuit.

Usage Instructions

How to Use the PIR Motion Sensor in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground.
  2. Connect the Output: Connect the OUT pin to a microcontroller's digital input pin or directly to a device (e.g., an LED or buzzer) for simple applications.
  3. Adjust Sensitivity and Delay: Many PIR sensors have two potentiometers:
    • Sensitivity: Adjusts the detection range.
    • Delay Time: Sets how long the output remains HIGH after motion is detected.
  4. Warm-up Period: Allow the sensor to stabilize for 30-60 seconds after powering it on.

Important Considerations and Best Practices

  • Avoid Direct Sunlight: PIR sensors can be affected by direct sunlight or heat sources, leading to false triggers.
  • Placement: Install the sensor at an appropriate height and angle to maximize its detection range.
  • Power Supply: Use a stable power source to avoid erratic behavior.
  • Interference: Keep the sensor away from RF-emitting devices to prevent interference.

Example: Connecting to an Arduino UNO

Below is an example of how to connect and use a PIR motion sensor with an Arduino UNO to control an LED:

Circuit Connections

  • PIR Sensor:
    • VCC → 5V on Arduino
    • GND → GND on Arduino
    • OUT → Digital Pin 2 on Arduino
  • LED:
    • Positive leg → Digital Pin 13 on Arduino (with a 220Ω resistor in series)
    • Negative leg → GND on Arduino

Arduino Code

// PIR Motion Sensor with Arduino Example
// This code turns on an LED when motion is detected by the PIR sensor.

const int pirPin = 2;  // PIR sensor output pin connected to digital pin 2
const int ledPin = 13; // LED connected to digital pin 13

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 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."); // Print message to serial monitor
  }

  delay(100); // Small delay to stabilize readings
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Sensor Not Detecting Motion:

    • Ensure the sensor is powered correctly (3.3V or 5V).
    • Check the connections, especially the OUT pin.
    • Verify that the sensor is not obstructed or placed in a poor location.
  2. False Triggers:

    • Avoid placing the sensor near heat sources, such as heaters or direct sunlight.
    • Reduce sensitivity using the potentiometer if the detection range is too high.
  3. Output Stays HIGH or LOW Constantly:

    • Allow the sensor to complete its warm-up period (30-60 seconds).
    • Check for loose or incorrect wiring.
  4. Interference with Other Devices:

    • Ensure the sensor is not placed near RF-emitting devices or strong electromagnetic fields.

FAQs

Q: Can the PIR sensor detect stationary objects?
A: No, PIR sensors detect motion by sensing changes in infrared radiation. Stationary objects will not trigger the sensor.

Q: How do I increase the detection range?
A: Adjust the sensitivity potentiometer on the sensor. Note that increasing sensitivity may also increase false triggers.

Q: Can I use the PIR sensor outdoors?
A: Yes, but ensure it is protected from direct sunlight, rain, and extreme temperatures for reliable operation.

Q: What is the warm-up time, and why is it needed?
A: The warm-up time (30-60 seconds) allows the sensor to stabilize and calibrate to its environment after powering on.