Creators
Rojony Khatun Author
Rojony Khatun
CalculatorToolsProjectExpert
Reviewers
Małgorzata Koperska, MD Steven Wooding
Last updated: November 30, 2025

PIR Motion Sensor Circuit for Home Automation DIY

🇺🇸
English
Default
🇪🇸
Español
Spanish
🇫🇷
Français
French
🇩🇪
Deutsch
German

*Please note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

PIR Motion Sensor at Home Circuit

Build a DIY PIR motion sensor circuit for home security. Step-by-step guide with components, working principle, schematic, and installation tips.

What Is a PIR Motion Sensor Circuit?

A PIR motion sensor circuit is an electronic circuit on which the movement of a human being or an animal is detected by a Passive Infrared sensor and used to control an output device. PIR sensors have pyroelectric materials that produce a voltage after being hit by infrared radiation from a moving object. This signal is processed in the circuit and causes a load, including home automation devices, lights, and alarms.

pir sensor connection for beginners

The PIR motion sensor is a home circuit device that is crucial to DIY home automation and security systems. PIR (Passive Infrared) is a sensor that can sense the infrared radiation released by a human or animal and activate electronic circuits in alarms, lights, or some other device.

The PIR motion sensor circuit used in home functions in such a way that it detects the heat of moving bodies in its area. On the detection of motion, the PIR module sends a high signal to the associated trigger circuit, which can trigger a relay, buzzer, or light. This is a basic, though powerful, system that improves the security of homes, conserves energy through the use of automated lights, and can be expanded as part of a larger smart home system. We are going to provide in this guide the parts, the working principle, circuit diagram, step-by-step construction, and solutions to problems that you may encounter during the process of constructing a PIR motion sensor circuit that can be implemented in your home.

Advantages of Using PIR Sensors at Home

  • Energy Saving: Automatically turns off lights when no motion is detected.
  • Enhanced Security: Detects intruders and triggers alarms.
  • Easy Installation: Simple circuit with low component count.
  • Microcontroller Compatible: Works with Arduino, Raspberry Pi, ESP8266, ESP32, and more.
  • Cost-Effective: Budget-friendly automation solution.

Components Required for DIY Circuit

Component Quantity Purpose
PIR Sensor Module (HC-SR501)1Detects infrared motion
NPN Transistor (BC547)1Amplifies PIR output
Relay (5V/12V)1Controls AC/DC load
Diode (1N4007)1Back-EMF protection
Resistors (1kΩ–10kΩ)2–3Biasing & limiting
Capacitor (10µF–100µF)1Stabilization
LED1Motion indication
Power Supply (5V–12V)1Powers sensor & relay
Breadboard / PCB1Assembly

Working Principle of PIR Motion Sensor

Detection Stage: PIR detects infrared radiation changes from moving bodies.

Amplification Stage: PIR output drives an NPN transistor to control relay.

Output Stage: Relay switches lights, alarms, or appliances; LED shows detection.

Delay & Sensitivity: Adjustable potentiometers control detection distance & hold time.

Circuit Diagram Explanation

  • PIR Output → Base of transistor via 1kΩ resistor
  • Transistor Collector → Relay Coil
  • Diode (1N4007) → Across relay coil for protection
  • LED → Parallel with relay using a limiting resistor
  • Power Supply → 5V–12V DC

Step-by-Step Construction Guide

  1. Connect PIR Sensor: VCC, GND, and output to transistor base.
  2. Amplifier Stage: Connect transistor with relay coil; add diode across coil.
  3. Connect Load: Use relay to switch AC/DC loads; add LED for indication.
  4. Power Supply: Use 5–12V depending on relay & PIR rating.
  5. Testing & Adjustment: Move in front of sensor; tune delay and sensitivity.

Applications of PIR Sensor Circuits

  • Automatic home lighting
  • Security alarm systems
  • Smart energy-saving systems
  • Home automation controls
  • Garage, stairway, corridor lighting

Troubleshooting Tips

  • Relay not triggering → Check transistor biasing & PIR output voltage.
  • False triggers → Reduce sensitivity or reposition sensor.
  • LED not lighting → Check polarity & limiting resistor.
  • Load not switching → Use relay rated for load voltage/current.
  • Sensor not detecting → Ensure correct power supply and positioning.

Frequently Asked Questions - PIR Motion Sensor at Home Circuit:

What is a PIR motion sensor circuit?

A circuit using a PIR sensor to detect movement and activate a load like lights or alarms.

Which PIR module is commonly used?

HC-SR501 is commonly used for home DIY projects.

What voltage does PIR sensor require?

Typically 5V–12V DC depending on the module.

Can it control AC lights?

Yes, using a relay to isolate the AC load from the sensor.

How to adjust sensitivity?

Use the potentiometer on the PIR module to change detection range.

How long does output stay on?

Most modules have a delay adjustment from a few seconds to several minutes.

Can I add LED indicator?

Yes, connect LED with current-limiting resistor parallel to relay.

Is the PIR safe for beginners?

Yes, low-voltage DC circuit makes it beginner-friendly.

What is typical detection range?

Usually 5–12 meters, adjustable by module sensitivity.

Can it be used with microcontrollers?

Yes, PIR output can be interfaced with Arduino, Raspberry Pi, etc.

Comments

Please login to comment.

Rojony Khatun

Rojony Khatun

Calculator Tools Project

Rojony Khatun is the creator of a free online tools website designed to simplify everyday and engineering-related calculations for students, professionals, and hobbyists. The platform offers a wide variety of basic and advanced calculators across key categories, including Electrical Calculators, Electronic Calculators, and Time & Date Calculators, helping users solve problems quickly and accurately.