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) or Motion Sensor is an electronic device that detects the presence of humans or animals by sensing the infrared (IR) light emitted from their bodies. These sensors are widely used in security systems, lighting controls, and home automation systems due to their ability to detect motion through changes in heat radiation.

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
Image of Arduino UNO with PIR Sensor and Bluetooth Connectivity: A project utilizing PIR/Motion 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.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

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

Usage Instructions

How to Use the Component in a Circuit

  1. Connect the VCC pin to a 5V to 12V 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

Example Code for Arduino UNO

// PIR Motion Sensor with Arduino UNO
int PIRPin = 2;    // Connect PIR sensor's OUT pin to digital pin 2
int LEDPin = 13;   // Onboard LED connected to digital pin 13
int motionState = LOW; // Variable for reading PIR status

void setup() {
  pinMode(PIRPin, INPUT);     // Initialize PIR sensor pin as input
  pinMode(LEDPin, OUTPUT);    // Initialize LED pin as output
  Serial.begin(9600);         // Start serial communication at 9600 baud
}

void loop() {
  motionState = digitalRead(PIRPin); // Read PIR sensor's output
  if (motionState == HIGH) {         // Check if motion is detected
    digitalWrite(LEDPin, HIGH);      // Turn on LED
    Serial.println("Motion detected!");
    delay(1000);                     // Wait for 1 second
  } else {
    digitalWrite(LEDPin, LOW);       // Turn off LED
    Serial.println("No motion.");
  }
}

Troubleshooting and FAQs

Common Issues Users Might Face

Solutions and Tips for Troubleshooting

FAQs

Q: Can the PIR sensor detect motion through walls or glass? A: No, PIR sensors cannot detect motion through walls or glass as they rely on detecting changes in IR radiation from objects in their line of sight.

Q: How long does it take for the PIR sensor to stabilize after being powered on? A: It typically takes between 10 to 60 seconds for the PIR sensor to stabilize and calibrate to the ambient IR levels in the environment.

Q: Is it possible to adjust the range and sensitivity of the PIR sensor? A: Many PIR sensor modules come with potentiometers that allow you to adjust the sensitivity and time delay. Refer to the specific module's datasheet for guidance.