PIR Sensor Wiring Diagram
This is a free printable pir sensor diagram: download the diagram as SVG or open it and print to paper or PDF.
A PIR sensor wiring diagram shows how to connect a passive infrared motion detector to a lighting circuit, alarm system, or microcontroller to trigger a load when movement is detected.
A passive infrared (PIR) sensor detects motion by measuring changes in infrared radiation in its field of view. The 'passive' in the name means the sensor does not emit any radiation of its own — it only receives and measures the infrared energy emitted by warm objects (including people and animals) as they move across its detection zone. When the infrared pattern seen by the sensor's pyroelectric detector changes — indicating a warm body has moved — the sensor's output is activated.
PIR sensors are used in three main application categories. Mains-voltage security lighting uses a PIR with an integral relay output rated for the connected lamp load — the sensor switches the full mains voltage to the luminaire. Alarm and security systems use PIR sensors with a low-voltage output (typically 12 V DC) that signals an alarm control panel when motion is detected. Microcontroller and electronics projects (Arduino, Raspberry Pi, and similar) use small 3.3 V or 5 V logic-level PIR modules that output a high logic signal when motion is present.
All PIR sensors have three key terminals: power supply positive, power supply negative (or ground), and output. Mains-voltage units additionally have line and neutral terminals for the switched load circuit. Most PIR modules also expose two adjustable potentiometers: a sensitivity adjustment (controls the detection range, typically 3–12 m) and a time-delay adjustment (controls how long the output remains active after motion stops, typically 5 seconds to 10 minutes).
False triggering — the sensor activating without a person being present — is a common issue. Causes include direct sunlight or vehicle headlight illumination of the sensor lens, airflow from HVAC vents, heat from nearby appliances, and small animals. Sensor placement must avoid these triggers.
For mains-voltage PIR installations, all wiring must comply with the applicable electrical code (BS 7671, AS/NZS 3000, NEC/NFPA 70, or IEC 60364) and must be installed by or inspected by a licenced electrician.
How to wire pir sensor diagram
- Determine the application type and sensor specification Identify whether the PIR will switch mains-voltage loads (lighting), interface with a low-voltage alarm panel, or interface with a microcontroller. Select a PIR sensor rated for the application: mains-voltage PIR security lights are rated in watts (maximum lamp load); alarm PIR sensors are rated in volts and milliamps (panel supply); microcontroller modules are rated by logic voltage (3.3 V or 5 V). Do not use a logic-level PIR module to switch mains-voltage loads directly — the output is not rated for mains voltage.
- Plan sensor placement Mount the sensor at the recommended height (typically 2.0–2.5 m for security lighting, 2.0–3.0 m for alarm applications) with the detection zone covering the area of interest. Orient the sensor so that intruders or users cross the detection zone laterally — PIR sensors detect motion across their field of view more reliably than motion directly toward or away from them. Avoid positions where the sensor lens will receive direct sunlight, vehicle headlights, or heat from HVAC outlets.
- Isolate power before wiring (mains-voltage installations) For mains-voltage PIR installations, switch off and lock out the circuit breaker. Verify all conductors at the installation point are de-energised with a non-contact voltage tester. Never work on mains-voltage PIR wiring with the circuit live. For low-voltage and microcontroller applications, disconnect the power supply to the system before making connections.
- Connect the supply terminals For a mains-voltage PIR: connect the incoming line (live) conductor to the sensor's LINE IN terminal, and the incoming neutral conductor to the sensor's NEUTRAL terminal. Connect the earth conductor to the sensor's earth terminal (mandatory for all mains-voltage installations in a metal or earthed plastic enclosure). For a logic-level module: connect VCC to the supply positive (5 V or 3.3 V as specified), and GND to the supply negative.
- Connect the switched load (mains-voltage) or output signal (logic-level) For mains-voltage PIR: connect the switched line terminal (LOAD or LAMP terminal on the PIR) to the line terminal of the luminaire. Connect the neutral directly from the incoming neutral through to the neutral terminal of the luminaire — the neutral is not switched. For logic-level: connect the OUT pin to the digital input of the microcontroller or to the input of the alarm panel zone. Pull the input to the correct logic level per the receiving device's requirements.
- Adjust sensitivity and time-delay potentiometers Most PIR sensors have two adjustable potentiometers accessible through a cover or on the module body. The sensitivity (range) potentiometer adjusts the detection distance — turn clockwise to increase range, anti-clockwise to reduce. The time-delay potentiometer sets how long the output remains active after motion stops — adjust to the required hold time for the application. Set to minimum initially and increase as needed to avoid nuisance long-on periods during commissioning.
- Commission and test the detection zone Restore power. Walk through the detection zone at different positions and angles to confirm the sensor activates correctly throughout the intended coverage area. Move to positions where false triggering is possible (near HVAC outlets, near reflective windows, in animal access paths) and confirm the sensor does not activate. Adjust orientation, sensitivity, and placement until the sensor reliably detects the intended subjects and ignores false trigger sources.
Specifications
| PIR sensor detection angle (typical) | 90°–180° horizontal; 15°–45° vertical (varies by model) |
|---|---|
| PIR sensor detection range (adjustable) | 3–12 m depending on model and sensitivity setting |
| Logic-level module supply voltage (typical) | 4.5–20 V DC (HC-SR501 and similar modules) |
| Logic-level module output voltage | 3.3 V or VCC logic HIGH when motion detected |
| Mains PIR relay maximum load (typical domestic unit) | 1000–2400 W resistive — verify against manufacturer specification |
| Time-delay adjustment range (typical) | 5 seconds to 10 minutes |
| Operating temperature range (typical outdoor PIR) | -20°C to +50°C |
| Minimum IP rating for outdoor installation | IP44 (sensor); IP65 (cable junction box) |
Safety warnings
- Mains-voltage PIR sensor installations involve line (live), neutral, and earth connections at mains voltage (230 V or 120 V AC). Always isolate and lock out the circuit breaker and verify conductors are dead before making any connections. Mains-voltage electrical installation must comply with BS 7671 (UK), AS/NZS 3000 (AU/NZ), NEC/NFPA 70 (USA), or IEC 60364, and must be performed by or inspected by a licenced electrician.
- The earth conductor must be connected to the earth terminal of every mains-voltage PIR sensor housed in a conductive enclosure. An unearthed conductive enclosure that develops a fault to the housing becomes a shock hazard for anyone who touches it. Never omit the earth connection.
- Never connect a logic-level PIR module output (3.3 V or 5 V) directly to a mains-voltage load. The module's output transistor is rated for low-voltage DC only and will be destroyed immediately by mains voltage. Use an appropriately rated relay, solid-state relay, or triac to interface between a logic-level output and a mains load.
- Outdoor PIR installations must use weatherproof enclosures, cable entry grommets, and cable rated for outdoor UV exposure. Water ingress into a mains-voltage connection is a fire and electrocution hazard. Ensure all outdoor enclosures are rated IP65 or higher.
- PIR sensors connected to burglar alarm systems are part of the security infrastructure. Incorrect wiring — particularly tamper circuits — can leave the system incapable of detecting a fault or intrusion. Follow the alarm panel manufacturer's installation instructions and have the system commissioned by a certified security installer where required by local regulations.
Tools needed
- Non-contact voltage tester (for mains-voltage installations)
- Multimeter (for supply voltage verification and output signal testing)
- Screwdrivers (flat and Phillips)
- Wire strippers (appropriate for cable gauge)
- Drill and masonry bit (for wall mounting)
- Rawlplugs and screws for mounting
- Cable clips or conduit for outdoor cable runs
- Small flat-head screwdriver for adjusting sensitivity and time-delay potentiometers
Common mistakes
- Mounting the sensor where it will receive direct sunlight on the lens — infrared from sunlight can saturate the pyroelectric detector and cause false triggering or the sensor to remain permanently active.
- Positioning the sensor so that HVAC air outlets blow across its field of view — warm air currents cause rapid changes in the infrared scene that the sensor interprets as motion.
- Connecting the mains neutral to the load through the PIR relay (switching the neutral instead of the line) — this leaves the load at mains potential even when the PIR relay is open, creating a shock hazard when changing lamps.
- Ignoring the minimum load specification of a mains PIR relay — very low-wattage LED lamps may not meet the relay's minimum load, causing flickering or relay chattering. Add a parallel resistive load or choose a PIR designed for LED loads.
- Using a logic-level PIR module outdoors without a weatherproof enclosure — moisture destroys the unprotected module circuitry and can cause shorts.
- Setting the time-delay potentiometer to maximum during initial installation and then not finding the adjustment again — always set time delay to minimum at the start of commissioning and increase it to the required value progressively.
Troubleshooting
- PIR-controlled light stays on continuously
- Cause: Sensor is receiving a continuous infrared trigger from a heat source, or the time-delay potentiometer is at maximum, or the sensor is in manual override mode Fix: Switch off the luminaire at the manual override (if fitted) to confirm the sensor is in auto mode. Reduce the time-delay potentiometer to minimum and observe whether the light switches off after a period with no motion. If it stays on permanently even at minimum time delay, identify the infrared source causing the trigger — check for sunlight on the lens, an HVAC vent in the field of view, or a nearby heat source. Reposition the sensor.
- PIR does not activate when a person walks through the zone
- Cause: Sensitivity set too low, detection zone poorly oriented, or the sensor is pointed at a wall with no clear field of view Fix: Increase the sensitivity potentiometer incrementally. Confirm the sensor is pointing into the open area where motion occurs, not at a nearby wall or ceiling. Verify the sensor is not in the blocked or obscured by a structural element. Test at the correct height — walking below the sensor's minimum vertical angle will not trigger it.
- Logic-level PIR module output stays HIGH permanently
- Cause: Sensor is continuously detecting a heat source, or the re-trigger mode is set to continuous, or the module has failed Fix: Cover the PIR lens to block all infrared input. If the output goes LOW with the lens covered, a heat source is triggering the sensor — identify and remove it or relocate the sensor. If the output remains HIGH with the lens covered, the module has likely failed and should be replaced.
- Mains PIR relay chatters (light flickers rapidly)
- Cause: Connected LED lamp load is below the PIR relay's minimum load specification Fix: Check the PIR sensor's minimum load specification in the datasheet. If the LED lamp wattage is below the minimum, connect an additional resistive load in parallel with the lamp to bring the total load within specification, or replace the PIR with a model designed for low-load LED switching.
Frequently asked questions
What is the difference between a PIR sensor and a microwave motion sensor?
A PIR sensor is passive — it detects changes in infrared radiation from warm bodies without emitting any signal. A microwave sensor is active — it emits microwave radiation and detects the Doppler shift when that radiation reflects off a moving object. PIRs are more common for lighting and general security. Microwave sensors can detect motion through glass and thin walls and are less affected by temperature extremes, but cost more and can trigger false positives through walls.
How far can a PIR sensor detect motion?
Detection range depends on the sensor model and the sensitivity adjustment. Most domestic PIR security light sensors have a range of 8–12 m at standard sensitivity. The detection angle is typically 90°–180° horizontally and 15°–45° vertically. The sensor is most sensitive to motion across its field of view (a person walking laterally) and least sensitive to motion directly toward or away from it.
Why does my PIR-activated light stay on all the time?
The most common causes are: the time-delay potentiometer is set to maximum; the sensor is in continuous 'on' override mode (many sensors have a separate photocell or manual override function); or the sensor is receiving a continuous trigger signal from a heat source such as an air conditioning unit, a reflective surface that catches sunlight, or an animal. Adjust the time delay, check for a manual override switch, and reposition the sensor away from false trigger sources.
Can I connect a PIR sensor to an LED light?
Yes. Mains-voltage PIR sensors with a relay output can switch LED loads. Ensure the LED lamp's total wattage is within the PIR's rated minimum and maximum load — some PIR relays have a minimum load requirement that may not be met by very low-wattage LEDs, causing the relay to chatter or the light to flicker. Check the PIR datasheet for its minimum load specification.
How do I wire a PIR sensor to an Arduino?
A 5 V logic-level PIR module (such as the HC-SR501) has three pins: VCC (connect to 5 V), GND (connect to ground), and OUT (connect to a digital input pin on the Arduino). When motion is detected, OUT goes HIGH (typically 3.3 V or VCC). No resistors are required in this basic configuration. Read the digital input pin in your code and respond when it reads HIGH. Adjust the onboard potentiometers for sensitivity and time delay before finalising placement.
Related diagrams
- pir motion sensor wiring diagram
- pir sensor circuit diagram
- pir sensor pin diagram
- 2 wire crank sensor wiring diagram
- 2 wire speed sensor wiring diagram
- 2 wire temp sensor coolant temperature sensor wiring diagram