PIR Sensor Wiring Diagram: 3-Wire Connection and Circuit Integration

Pir Wiring Diagram — circuit diagram showing component connections+12V/24V SupplyPIRPIR Motion SensorPull-up RARDUINOUNOMCU / ReaderIndicatorPIR Motion Sensor Circuit
PIR Sensor Wiring Diagram: 3-Wire Connection and Circuit Integration — interactive diagram. Open it in the editor to customise components and wiring.

This is a free printable pir wiring diagram: download the diagram as SVG or open it and print to paper or PDF.

A PIR (Passive Infrared) sensor typically has three wires — positive supply (V+), ground (GND), and signal output (OUT) — and detects human motion by sensing changes in infrared radiation emitted by moving warm bodies.

A PIR (Passive Infrared) sensor detects motion by measuring changes in infrared radiation across its sensing zone. The sensor contains a pyroelectric element (typically lithium tantalate or similar) split into two halves. When a warm body moves across the field of view, it sequentially warms one half of the element and then the other, generating a differential signal that the sensor's built-in comparator interprets as motion.

The three-wire interface is standard across virtually all module-type PIR sensors: V+ (supply, typically 5V or 3.3V DC for module types, or 5–20V for standalone sensors), GND (supply negative), and OUT (signal output, typically logic-level active high during detection). Some standalone PIR sensors designed for mains-powered security lighting use a different interface — they contain a triac or relay output and are wired into the load circuit rather than a microcontroller.

The signal output on module PIR sensors is generally an open-drain or push-pull digital output that goes high (to V+) when motion is detected and returns low after a configurable hold-off time. Two key adjustments are common on module PIR boards: sensitivity (a potentiometer adjusting the detection threshold and therefore range, typically 3–7 metres) and time delay (a potentiometer adjusting how long the output remains high after the last motion event, typically 0.3 seconds to several minutes). Some modules also offer a retriggering jumper: non-retriggering mode holds the output high for a fixed period regardless of continued motion; retriggering mode restarts the timer with each detected motion event.

PIR sensors have a detection angle of approximately 90–120 degrees horizontal and 90 degrees vertical. They cannot see through glass (glass blocks infrared). They also produce false triggers from heat sources — air conditioning vents, heaters, or sunlight patches moving across the floor — which must be considered when positioning the sensor.

For mains-voltage security lighting applications, the PIR unit contains an internal relay or triac rated to switch the lamp load directly and is wired in series with the live conductor feeding the luminaire — a licensed electrician must install and connect mains-voltage PIR units.

How to wire pir wiring diagram

  1. Identify the three PIR sensor pins Consult the specific sensor or module datasheet to identify V+, GND, and OUT pin positions — pin order varies between manufacturers and module types. Never assume pin order from position alone.
  2. Connect the supply voltage Connect V+ to the appropriate regulated supply voltage for your sensor (typically 5V DC for HC-SR501 type modules, or 3.3V for low-voltage variants). Connect GND to the supply negative. Ensure the supply can provide the sensor's quiescent current (typically 50–65mA during detection, less while idle).
  3. Connect the signal output to your controller Connect the OUT pin to a digital input on your microcontroller, relay module, or control circuit. For a direct LED indicator, connect OUT through a 470Ω series resistor to an LED, with the LED cathode returning to GND.
  4. Allow the sensor warm-up period After power-on, PIR sensors require 30–60 seconds to stabilise thermally before producing reliable output. During this period, the output may pulse randomly. Design your system to ignore the sensor output for at least 60 seconds after power-on.
  5. Adjust sensitivity and time-delay With the sensor mounted in its intended position, walk through the detection zone and use a small screwdriver to adjust the sensitivity potentiometer until reliable detection occurs at the desired range. Adjust the time-delay potentiometer to the required hold-on time.
  6. Select retriggering mode if required Set the retriggering jumper to H (retriggering) if the output should remain high during continuous motion. Set it to L (non-retriggering) for a fixed output pulse duration regardless of continued motion.
  7. Test and refine sensor placement Walk through the full intended detection zone and verify consistent triggering. Check for false triggers by leaving the area clear for several minutes while the sensor runs. Reposition or shade the sensor if false triggers from heat sources occur.

Specifications

Typical supply voltage (HC-SR501 module type)4.5V – 20V DC
Quiescent current (idle, no detection)< 60µA (module-level, supply-dependent)
Output voltage (logic high)3.3V (some modules) or ~V+ (others) — check datasheet
Detection range (adjustable)3m – 7m typical
Detection angle (horizontal)Approximately 120°
Warm-up time after power-on30–60 seconds
Output hold-on time (adjustable)~0.3 seconds – 5 minutes (potentiometer-controlled)
Operating temperature range (typical)-20°C to +80°C

Safety warnings

Tools needed

Common mistakes

Troubleshooting

PIR output never goes high — no detection
Cause: Insufficient supply voltage, reversed supply polarity, or sensor in warm-up phase; alternatively, sensitivity set too low or detection zone misaligned Fix: Verify supply voltage at the V+ pin with a multimeter. Confirm GND is connected. Wait 60 seconds after power-on. Walk slowly through the sensor's field of view. Increase sensitivity potentiometer by one-quarter turn and retest.
PIR output triggers continuously with no one present
Cause: Heat sources (HVAC vent, heater, sunlight) in the detection zone, or sensitivity set too high, or RFI interference Fix: Identify and shield or reorient the sensor away from heat sources. Reduce sensitivity potentiometer. Move sensor away from Wi-Fi routers or high-power RF sources. Add a 100nF decoupling capacitor between V+ and GND at the sensor.
Output goes high but immediately drops without holding for the expected time
Cause: Time-delay potentiometer set to minimum (fast reset) or sensor in non-retriggering mode with a very short time setting Fix: Increase the time-delay potentiometer clockwise. If retriggering is needed, change the jumper to the H (retriggering) position.

Frequently asked questions

What are the three wires on a PIR sensor and what does each do?

V+ (or VCC) is the positive supply voltage, typically 5V or 3.3V for module types. GND is the supply negative and signal reference. OUT (or SIGNAL or DATA) is the digital output — it goes to a logic-high voltage when motion is detected and returns to logic-low when detection times out. Always check your specific sensor's datasheet as pin order varies.

Why does my PIR sensor trigger repeatedly even with no one present?

Common causes are heat sources in the detection zone (HVAC vents, direct sunlight, heaters), which cause infrared changes that mimic motion. Radio frequency interference can also cause false triggers on some modules. Shield the sensor from direct sunlight, reposition away from heat sources, and reduce the sensitivity potentiometer setting.

Can I connect a PIR sensor directly to a 5V Arduino or Raspberry Pi GPIO?

Most HC-SR501-type PIR modules operate on 5V supply and output a 3.3V or 5V logic signal, making them compatible with Arduino GPIO directly. For 3.3V GPIO systems (Raspberry Pi), use a 3.3V-supply PIR module or a level-shifting resistor divider on the output to avoid exceeding the 3.3V GPIO input maximum.

How do I wire a PIR sensor to switch a mains lamp directly?

Do not use a module PIR for mains switching — module PIRs output a low-voltage logic signal only. For mains lamp switching, use a dedicated mains PIR security sensor designed for the purpose. These contain an internal relay or triac, connect to the mains supply, and switch the lamp live conductor. A licensed electrician must install mains-voltage PIR units.

What is the difference between the sensitivity and time-delay potentiometers on a PIR module?

The sensitivity potentiometer adjusts the threshold of the pyroelectric comparator, effectively controlling detection range — turning it down reduces sensitivity and range, which helps eliminate false triggers from distant heat sources. The time-delay potentiometer controls how long the output remains high after the last motion event before returning to low, from fractions of a second up to several minutes.

Related diagrams

Free electrical calculators

Edit this diagram free in the online editor