Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

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

Image of PIR Motion SensorDesign 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 warm bodies. It is a low-cost, low-power device widely used in motion detection applications. PIR sensors are commonly found in security systems, automatic lighting, and energy-saving devices. They are ideal for detecting human or animal movement within a specific range.

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 PIR Motion-Activated LED Light: 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.

Open Project in Cirkit Designer

Technical Specifications

Below are the key technical details of a typical PIR Motion Sensor:

Pin Configuration and Descriptions

The PIR Motion Sensor typically has three pins. Below is the pinout description:

Pin Name Description
VCC Power supply input (4.5V to 20V DC)
OUT Digital output signal (High/Low)
GND Ground connection

Some PIR sensors may also include additional features such as sensitivity and delay time adjustment knobs.

Usage Instructions

How to Use the PIR Motion Sensor in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 5V or 12V power source and the GND pin to the ground.
  2. Connect the Output: Connect the OUT pin to a microcontroller (e.g., Arduino) or directly to a device (e.g., relay module or LED).
  3. Adjust Settings: If your PIR sensor has sensitivity and delay time adjustment knobs, tune them as needed:
    • Sensitivity: Adjusts the detection range.
    • Delay Time: Sets how long the output remains HIGH after motion is detected.
  4. Wait for Warm-up: Allow the sensor to stabilize for ~30 seconds after powering it on.

Important Considerations and Best Practices

Example: Connecting PIR Motion Sensor to Arduino UNO

Below is an example of how to connect and use a PIR Motion Sensor with an Arduino UNO:

Circuit Connections

Arduino Code

// PIR Motion Sensor Example with Arduino UNO
// This code reads the PIR sensor's output and turns on an LED when motion is detected.

int pirPin = 2;       // PIR sensor output pin
int ledPin = 13;      // Built-in LED pin on Arduino

void setup() {
  pinMode(pirPin, INPUT);  // Set PIR pin as input
  pinMode(ledPin, OUTPUT); // Set LED pin as output
  Serial.begin(9600);      // Initialize serial communication
}

void loop() {
  int motionDetected = digitalRead(pirPin); // Read PIR sensor output

  if (motionDetected == HIGH) { // If motion is detected
    digitalWrite(ledPin, HIGH); // Turn on LED
    Serial.println("Motion detected!");
  } else {
    digitalWrite(ledPin, LOW);  // Turn off LED
    Serial.println("No motion.");
  }

  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 (check VCC and GND connections).
    • Verify that the warm-up time (~30 seconds) has elapsed.
    • Check the sensitivity adjustment knob (if available) and increase the range.
  2. False Triggers:

    • Avoid placing the sensor near heat sources, reflective surfaces, or moving objects.
    • Ensure the sensor is not exposed to strong air currents.
  3. Output Signal Stuck HIGH or LOW:

    • Check the wiring and ensure the OUT pin is connected to the correct input pin on the microcontroller.
    • Verify the power supply voltage is within the sensor's operating range.

FAQs

Q1: Can the PIR sensor detect motion through glass?
A1: No, PIR sensors cannot detect motion through glass as infrared radiation does not pass through it effectively.

Q2: How do I increase the detection range?
A2: Use the sensitivity adjustment knob (if available) or ensure the sensor is mounted at an optimal height and angle.

Q3: Can I use the PIR sensor outdoors?
A3: Yes, but ensure it is housed in a weatherproof enclosure to protect it from rain and extreme temperatures.

Q4: Why does the sensor take time to stabilize after powering on?
A4: The sensor requires a warm-up period (~30 seconds) to calibrate its internal circuitry and avoid false triggers.