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

How to Use PIR Motion Sensor (Wokwi Compatible): Examples, Pinouts, and Specs

Image of PIR Motion Sensor (Wokwi Compatible)
Cirkit Designer LogoDesign with PIR Motion Sensor (Wokwi Compatible) in Cirkit Designer

Introduction

The PIR Motion Sensor is a Passive Infrared sensor that detects motion by measuring changes in the infrared levels emitted by objects in its field of view. When a living being, such as a human or animal, enters the sensor's range, it detects the change in infrared radiation and can trigger a response. This sensor is widely used in security systems, automatic lighting control, and various automation projects due to its non-intrusive nature and ease of integration with microcontroller platforms like Arduino.

Explore Projects Built with PIR Motion Sensor (Wokwi Compatible)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered PIR Motion Sensor Alarm with Relay and Buzzer
Image of motion detector using pir motio0n sensor: A project utilizing PIR Motion Sensor (Wokwi Compatible) 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
Arduino UNO-Based GSM Motion Detector with SIM800L
Image of PIR GSM ARDUINO: A project utilizing PIR Motion Sensor (Wokwi Compatible) in a practical application
This circuit uses an Arduino UNO to interface with a PIR motion sensor and a SIM800L GSM module. The PIR sensor detects motion and sends a signal to the Arduino, which then communicates with the GSM module to potentially send alerts or notifications via SMS.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Motion-Activated Servo and LED Control System
Image of Bathroom: A project utilizing PIR Motion Sensor (Wokwi Compatible) in a practical application
This circuit uses an Arduino UNO to control a PIR motion sensor, a red LED, a relay, and a servo motor. When motion is detected by the PIR sensor, the red LED turns on, and after a delay, the relay activates and the servo motor rotates 90 degrees before returning to its original position. The green LED indicates the status of the relay.
Cirkit Designer LogoOpen Project in Cirkit Designer
PIR Motion-Activated LED Light
Image of 0: A project utilizing PIR Motion Sensor (Wokwi Compatible) 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

Explore Projects Built with PIR Motion Sensor (Wokwi Compatible)

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 motion detector using pir motio0n sensor: A project utilizing PIR Motion Sensor (Wokwi Compatible) 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
Image of PIR GSM ARDUINO: A project utilizing PIR Motion Sensor (Wokwi Compatible) in a practical application
Arduino UNO-Based GSM Motion Detector with SIM800L
This circuit uses an Arduino UNO to interface with a PIR motion sensor and a SIM800L GSM module. The PIR sensor detects motion and sends a signal to the Arduino, which then communicates with the GSM module to potentially send alerts or notifications via SMS.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Bathroom: A project utilizing PIR Motion Sensor (Wokwi Compatible) in a practical application
Arduino UNO Motion-Activated Servo and LED Control System
This circuit uses an Arduino UNO to control a PIR motion sensor, a red LED, a relay, and a servo motor. When motion is detected by the PIR sensor, the red LED turns on, and after a delay, the relay activates and the servo motor rotates 90 degrees before returning to its original position. The green LED indicates the status of the relay.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 0: A project utilizing PIR Motion Sensor (Wokwi Compatible) 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

Technical Specifications

Key Technical Details

  • Voltage: Typically 5V to 12V DC
  • Idle Current: <50uA
  • Output Current: <100mA
  • Detection Range: Up to 7 meters (23 feet)
  • Detection Angle: Up to 120 degrees
  • Output Type: Digital (High/Low signal)

Pin Configuration and Descriptions

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

Usage Instructions

Integration with 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 the Arduino.

Important Considerations and Best Practices

  • Ensure that the power supply voltage does not exceed the sensor's maximum rating.
  • Avoid placing the sensor in an area with potential for rapid temperature changes, as this may cause false triggers.
  • The sensor may take 1-2 minutes to calibrate upon initial power-up. During this time, it may trigger randomly.
  • Use a pull-up resistor if the digital input pin on the microcontroller requires it.

Example Arduino Code

// PIR Motion Sensor Example Code
int pirPin = 2; // Digital pin connected to the PIR sensor's output
int ledPin = 13; // LED connected to digital pin 13

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

void loop() {
  int pirValue = digitalRead(pirPin); // Read the value from the PIR sensor
  if (pirValue == HIGH) { // Check if the PIR sensor is detecting motion
    digitalWrite(ledPin, HIGH); // Turn on the LED
    Serial.println("Motion detected!");
  } else {
    digitalWrite(ledPin, LOW); // Turn off the LED
    Serial.println("No motion detected.");
  }
  delay(1000); // Wait for 1 second before reading again
}

Troubleshooting and FAQs

Common Issues

  • Sensor always triggers: Ensure there are no heat sources or moving objects in the sensor's field of view during the calibration period.
  • Sensor does not trigger: Check connections and ensure the sensor is powered correctly. Also, verify that the sensor's field of view is not obstructed.
  • Intermittent triggering: This can be due to electrical noise. Use a pull-up resistor and ensure proper power supply decoupling.

Solutions and Tips for Troubleshooting

  • Calibration: Allow the sensor to calibrate for 1-2 minutes after powering up.
  • Sensitivity: Adjust the sensitivity and time delay potentiometers on the sensor, if available.
  • Testing: Use a simple LED circuit to test the sensor's output before connecting it to a microcontroller.

FAQs

Q: How long does the sensor output stay high after detecting motion? A: This can vary based on the sensor model and settings of the time delay potentiometer.

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

Q: Is the sensor waterproof? A: Most PIR sensors are not waterproof unless specified by the manufacturer. It is recommended to use them indoors or in a waterproof enclosure if used outside.

Q: How can I adjust the range and sensitivity of the sensor? A: Some models come with potentiometers that allow you to adjust the sensitivity and the time the output signal stays high after detection.