How to Use a PIR Sensor with Arduino for Motion Detection A Step-by-Step Guide
How to Use a PIR Sensor with Arduino for Motion Detection: A Step-by-Step Guide Motion detection is an essential feature in many security systems, home automation projects, and smart devices. The Passive Infrared (PIR) sensor is widely used to detect motion in such applications. When combined with Arduino, it can be used to trigger events based on the detection of movement in a specified area. This step-by-step guide will walk you through how to use a PIR sensor with Arduino to build a simple motion detection system. What is a PIR Sensor? A PIR (Passive Infrared) sensor detects motion by measuring changes in infrared radiation. It detects heat signatures from objects, such as humans or animals, that move within its detection range. PIR sensors are commonly used in security systems, lighting control systems, and automation projects. They are easy to integrate with microcontrollers like Arduino, providing an effective way to detect motion. What You Will Need Before you begin, gather the following components: Arduino Uno (or any Arduino board) PIR Motion Sensor Jumper Wires Breadboard (optional) LED (for visual indication of motion detection) 220-ohm Resistor (for the LED) USB Cable (to connect Arduino to your computer) Arduino IDE (for writing and uploading the code) Understanding the PIR Sensor Pins A typical PIR sensor has three pins: