• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » PIR Motion Detector Circuit using Arduino

PIR Motion Detector Circuit using Arduino

Last updated on 19 September 2025 by Admin-Lavi Leave a Comment

Turn Arduino into a motion spy!

With just a PIR sensor, buzzer and LED we can detect movement easily.

Whenever someone passes it spots movement and warns us with light and sound.

This PIR Motion Detector Circuit using Arduino is for beginners and makers.

It is fast to build, fun to use and full of learning.

Circuit Coding:

int pirPin = 2;
int buzzer = 3;
int led = 4;
int pirState = LOW;
int val = 0;

void setup() {
pinMode(pirPin, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(led, OUTPUT);
Serial.begin(9600);
}

void loop() {
val = digitalRead(pirPin);
if (val == HIGH) {
digitalWrite(buzzer, HIGH);
digitalWrite(led, HIGH);
if (pirState == LOW) {
Serial.println("Motion detected!");
pirState = HIGH;
}
} else {
digitalWrite(buzzer, LOW);
digitalWrite(led, LOW);
if (pirState == HIGH) {
Serial.println("Motion ended!");
pirState = LOW;
}
}
}

Coding Explanation:

  • pinMode set input or output pins.
  • loop read PIR pin.
  • If PIR is HIGH then buzzer and LED is ON.
  • If PIR is LOW then buzzer and LED goes OFF.
  • pirState is used to print message only once on change.

Circuit Working:

PIR Motion Detector Circuit Diagram using Arduino

Parts List:

ComponentQuantity
Resistor 220Ω 1/4 watt1
Arduino UNO1
PIR Sensor Module1
Any LED 5mm 20mA1
Buzzer1

The above circuit diagram shows the Arduino motion detector using PIR sensor, LED and buzzer.

PIR sensor detect infrared from human body.

If motion detects it send HIGH signal to Arduino pin 2.

Arduino then turn ON buzzer and LED.

After some seconds it turn them OFF again.

If there is no motion then buzzer and LED stays OFF.

Formula:

Below is the formula for PIR Motion Detector Circuit:

Use Ohm Law formula : R = V/I

where,

  • R is the resistance in ohms Ω
  • V is the voltage in volts V
  • I is the current in amperes A

How to Build:

To build a PIR Motion Detector Circuit using Arduino follow the below steps for connections:

  • Gather all the parts as shown in circuit diagram.
  • PIR VCC pin is connected to Arduino 5V.
  • PIR GND pin connects to Arduino GND.
  • PIR OUT pin connects to Arduino digital pin 2.
  • Buzzer positive connect to Arduino pin 3.
  • Buzzer negative connect to GND.
  • LED positive connect to Arduino pin 4 through resistor R1 220 ohm.
  • LED negative connect to GND.
  • Arduino 5V and GND connect to breadboard power rails.

Conclusion:

This project is simple PIR Motion Detector Circuit using Arduino.

It uses PIR to sense human movement.

Arduino control buzzer and LED alarm.

It is good for home security and for automation.

References:

Arduino Based Security System using Passive Infrared (PIR) Motion Sensor

Filed Under: Arduino Projects, Sensors and Detectors

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « LDR Light Sensor Circuit with Arduino
Next Post: Arduino Based Electronic Voting Machine Circuit »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (34)
  • Amplifier Circuits (67)
  • Arduino Projects (52)
  • Audio Circuits (97)
  • Automobile Circuits (19)
  • Battery Charger Circuits (48)
  • Free Energy (13)
  • Heater and Temperature Controllers (10)
  • High Voltage (1)
  • Indicator Circuits (40)
  • Inverter Circuits (13)
  • LDR Circuits (16)
  • LED and Lamps (116)
  • Meters and Testers (28)
  • Motor Controllers (18)
  • Oscillator Circuits (34)
  • Power Supply Circuits (92)
  • Remote Control Circuits (7)
  • Security and Protection (26)
  • Sensors and Detectors (92)
  • Solar Circuits (17)
  • Timer Circuits (30)
  • Transistor Circuits (57)
  • Transmitter Circuit (13)
  • Tutorials (5)
  • Water Level Controller (4)

Recent Posts

  • Arduino Based Electronic Voting Machine Circuit
  • PIR Motion Detector Circuit using Arduino
  • LDR Light Sensor Circuit with Arduino
  • Arduino Text to Speech Voice Generator Circuit
  • Smart Table to Kitchen Order Circuit with Arduino

Recent Comments

  1. Admin-Lavi on Constant Voltage, Constant Current Battery Charger Circuit
  2. Bill on Constant Voltage, Constant Current Battery Charger Circuit
  3. Admin-Lavi on Long Range FM Transmitter Circuit (2km)
  4. Sina on Long Range FM Transmitter Circuit (2km)
  5. Admin-Lavi on Long Range FM Transmitter Circuit (2km)

Copyright © 2025 | New Circuit Ideas