Motion Sensor Diagram: How to Wire a PIR Motion Sensor Step by Step
This is a free printable motion sensor diagram: download the diagram as SVG or open it and print to paper or PDF.
A motion sensor diagram shows the three-wire connection of a PIR passive infrared detector — supply positive, ground, and signal output — and how it integrates with lighting or alarm circuits.
A Passive Infrared (PIR) motion sensor detects changes in infrared radiation in its field of view. It does not emit radiation — it passively detects the difference in infrared heat signature as a warm body (person or animal) moves across sensor zones formed by a Fresnel lens array. This is why the sensor is described as 'passive': it is purely a receiver.
At the circuit level, a PIR module has three connections: a positive supply (V+ or VCC), a ground (GND), and a signal output (OUT). In low-voltage logic applications (microcontrollers, alarm panels), V+ is typically 3.3 V or 5 V DC, and the output is a logic-level digital signal — HIGH when motion is detected, LOW when quiescent. In mains-connected PIR security light controllers, the internal circuit operates from a rectified mains supply, and the output triggers a relay or triac that switches the mains lighting load.
A critical operational detail is the warm-up period. When power is first applied to a PIR sensor, it requires 30–60 seconds to stabilise. During this warm-up period the output is often unstable — triggering falsely or continuously. Security and lighting systems must account for this: controllers should ignore PIR output for at least 30–60 seconds after power-on.
The detection parameters of most PIR modules are adjustable via onboard potentiometers: sensitivity (sets the threshold differential in infrared level required to trigger) and time delay (sets how long the output remains HIGH after the last motion event before returning LOW). Sensitivity is typically adjustable from a few metres to the sensor's maximum range (commonly 5–12 m). Time delay is typically adjustable from a few seconds to several minutes.
In a security lighting circuit, the PIR output drives a relay or solid-state switch that controls the mains lamp. The PIR module is powered from a permanently live mains supply via a small internal power supply, while the lamp circuit is switched by the PIR's relay output.
Any connection to mains voltage must be performed by a qualified electrician in accordance with applicable local wiring regulations.
How to wire motion sensor diagram
- Determine the application and sensor type required Identify whether you need a low-voltage PIR module (for microcontroller or alarm panel integration, typically 3.3 V or 5 V logic) or a mains-voltage PIR light controller (integrated into a luminaire or as a surface-mount controller). The wiring connections differ significantly between these two types.
- Mount the sensor at the correct height and orientation PIR sensors detect lateral movement across their detection zones most effectively. Mount the sensor at a height of 2–2.5 m for typical room or entrance detection, angled slightly downward. Avoid mounting directly above a doorway (where movement is mostly vertical, directly toward the sensor) or pointing toward windows, heat sources, or air vents.
- Connect the supply voltage (V+/VCC) For low-voltage modules: connect the VCC pin to the appropriate logic supply voltage for the module (typically 5 V DC; verify the datasheet). For mains-connected units: the line (L) and neutral (N) mains connection must be made only by a qualified electrician. Do not connect until all other wiring is complete.
- Connect the ground (GND) Connect the GND pin to the supply negative or signal ground. For mains units, this corresponds to the neutral connection of the internal power supply (neutral is not the same as earth/safety ground — do not substitute). Ensure a clean, low-impedance ground connection for reliable low-level signal operation.
- Connect the output (OUT) to the control target For logic-level integration: connect OUT to the digital input of the microcontroller or alarm panel. For mains lighting: the PIR's internal relay or triac output connects in series with the load (lamp) line conductor. The output is typically a normally open (NO) contact that closes when motion is detected.
- Apply power and allow warm-up period Apply supply voltage. Wait at least 30–60 seconds before testing — the PIR detector element and signal conditioning circuit require this period to reach thermal equilibrium. During warm-up, ignore any output activity. After warm-up, walk through the detection zone and verify the output triggers correctly.
- Adjust sensitivity and time-delay trimmers Use a small screwdriver to adjust the sensitivity potentiometer for the required detection range — reduce sensitivity if false triggers occur from background heat sources. Adjust the time-delay potentiometer to set how long the output stays triggered after the last motion event. Start with a shorter delay and extend as needed.
Specifications
| Typical PIR module supply voltage (low-voltage type) | 5 V DC (some accept 3.3–12 V — verify specific module datasheet) |
|---|---|
| Quiescent current consumption (typical) | 50–65 mA (verify against specific module) |
| Output signal (logic-level type) | Digital: HIGH ≈ VCC (motion detected); LOW ≈ 0 V (no motion) |
| Warm-up time after power-on | 30–60 seconds (ignore output during this period) |
| Typical detection range (adjustable) | 3–7 m standard; up to 12 m on high-sensitivity units |
| Typical detection angle | Horizontal: 90–120°; depends on Fresnel lens type fitted |
| Time-delay adjustment range (typical) | 3 seconds to 5 minutes (potentiometer-adjustable) |
Safety warnings
- Any connection of a PIR sensor or lighting circuit to mains voltage (120 V or 230 V AC) must be performed by a qualified electrician in accordance with applicable local wiring regulations. Mains voltage is lethal.
- Do not connect a low-voltage PIR module (rated for 5 V DC) directly to mains voltage — this will destroy the module immediately and creates a fire hazard.
- Ensure that relay contacts used to switch mains loads are rated for the actual lamp type and current. Capacitive loads (LED drivers) and inductive loads (motors) may require de-rated or snubber-protected relay contacts.
- When adjusting sensitivity and time-delay trimmers on a mains-connected unit, ensure the unit is de-energised first, or that the trimmer is accessible without contact with mains voltage parts.
- In security applications, do not rely solely on a single PIR sensor for intrusion detection — PIR sensors can be defeated by slow movement, thermal camouflage, or sensor blind spots.
Tools needed
- Digital multimeter (for supply voltage verification and output signal testing)
- Small flat-blade screwdriver (for sensitivity and time-delay potentiometer adjustment)
- Soldering iron and solder or breadboard (for low-voltage prototyping)
- Drill and masonry or wood bit (for sensor mounting)
- Cable clips (for securing signal cable runs)
- Non-contact voltage tester (for verifying mains isolation before working on mains-connected units)
Common mistakes
- Not allowing the 30–60 second warm-up period after power-on — concluding the sensor is faulty because it triggers continuously during initialisation.
- Mounting the sensor above a doorway pointing directly at the approach direction — PIR sensors detect movement across their detection zones (transversely), not directly toward them; approaching straight at the sensor is the weakest detection angle.
- Positioning the sensor in direct view of a sunny window or near an HVAC vent — thermal fluctuations from these sources mimic the infrared signature change of a moving person.
- Connecting the OUT pin of a 5 V logic PIR module directly to a 3.3 V microcontroller input without verifying that the 5 V HIGH output is within the microcontroller's absolute maximum input voltage rating.
- Using an undersized relay for the lamp load type — LED driver power supplies can have high inrush currents that exceed the contact current rating even when steady-state current is within limits.
Troubleshooting
- PIR output triggers continuously after power-on
- Cause: Normal warm-up period (first 30–60 seconds); or sensitivity set too high; or a persistent heat source (vent, direct sunlight) is in the detection field Fix: Wait 60 seconds after power-on. If still continuous, reduce sensitivity trimmer and eliminate thermal sources from the field of view. If the output is permanently HIGH with no heat source and after full warm-up, the PIR IC or pyroelectric element may be faulty.
- PIR does not trigger even when movement is clearly within the detection zone
- Cause: Sensitivity trimmer set too low; movement direction is directly toward the sensor rather than across it; obstruction (glass, plastic) is blocking the Fresnel lens Fix: Increase sensitivity trimmer. Ensure the person walks across the detection zone, not directly toward the sensor. Confirm no physical obstruction covers the lens. Verify supply voltage is within specification with a DMM.
- Output triggers, but the connected load (lamp or relay) does not respond
- Cause: Output signal level insufficient for the relay coil or microcontroller input threshold; loose connection at OUT pin; relay coil voltage mismatch Fix: Measure the OUT pin voltage with a DMM when triggered (should equal VCC within 0.5 V for most logic-output PIRs). Verify the relay module coil voltage matches the PIR supply. Check all wiring connections.
Frequently asked questions
What is the difference between a PIR sensor and a microwave motion sensor?
A PIR sensor detects changes in infrared heat signature passively — it only responds to thermal contrast as a warm body moves across its zones. A microwave sensor emits microwave radiation and detects Doppler shifts caused by movement. Microwave sensors can detect motion through walls and in areas with no line of sight, but are more prone to false triggering from mechanical movement like tree branches or fan blades.
Why does my PIR sensor trigger false alarms?
Common causes include: the sensor warming up after power-on (normal for 30–60 seconds); small animals or insects moving within the detection zone; HVAC vents blowing warm air across the sensor field; direct sunlight or radiant heat sources in the field of view; or sensitivity set too high. Adjust the sensitivity trimmer and ensure there are no intermittent heat sources in the detection zone.
How do I wire a PIR sensor to an Arduino or microcontroller?
Connect the PIR's VCC pin to the 5 V supply rail, GND to ground, and the OUT pin to any digital input pin on the microcontroller. Set the input pin to INPUT mode in your code. Read the digital state — HIGH indicates motion detected. Allow at least 60 seconds after power-on before trusting the output. Confirm the PIR module's supply voltage matches your microcontroller's logic level.
Can I use a PIR sensor outdoors?
Yes, but the PIR module or enclosure must be rated for outdoor use (minimum IP44 for sheltered locations, IP65 for exposed areas). Outdoor PIR sensors are subject to false triggering from direct sunlight, radiant heat from sun-warmed surfaces, and wind-driven changes in background temperature. Choose a sensor with adjustable sensitivity and a pet-immune or directional lens for outdoor applications.
What determines the detection range and angle of a PIR sensor?
Detection range is primarily set by the sensitivity of the pyroelectric element and the gain of the signal conditioning circuit, adjustable via the sensitivity potentiometer. The detection angle is determined by the shape of the Fresnel lens array — most PIR sensors have a horizontal coverage of 90–120° and a detection range of 5–12 m. Some sensors have interchangeable lenses for curtain, wide-angle, or long-range patterns.
Related diagrams
- 3 wire motion sensor light wiring diagram
- 3 wire motion sensor wiring diagram
- motion sensor circuit diagram
- motion sensor light switch wiring diagram
- motion sensor light wiring diagram
- pir motion sensor wiring diagram