Skip to content

What is PIR motion sensor?


A PIR (passive infrared) motion sensor is an electronic device that measures infrared light radiating from objects in its field of view to detect motion. PIR sensors are used extensively in security systems, automation, and a variety of consumer applications to sense occupancy and trigger lights, cameras, alarms and other responses. This comprehensive guide covers the working principle of PIR sensors, characteristics, interfacing circuits, and usage in various applications.

How PIR Motion Sensors Work

PIR sensors can detect motion up to 20 feet away. They are often used in security systems and automatic lighting systems. Here is an overview of how they work:

Detecting Infrared Radiation

All objects emit some low level of infrared radiation that is invisible to the human eye but can be detected by electronic devices designed for such a purpose. The term passive in PIR sensor signifies that they do not generate or radiate any energy for detection purposes. They solely work based on detecting infrared radiation emitted by occupants in the surroundings.

The human body emits infrared radiation with a wavelength between 9 and 10 micrometers known as black body radiation. Even in complete darkness, this irradiation persists.

Sensing Method

PIR sensors contain a pyroelectric sensor which can detect levels of infrared radiation. It contains a crystalline material that generates an electric charge when exposed to infrared radiation. The changes in the amount of infrared striking the element change the voltages generated, which are measured by an internal circuit.

The PIR sensor has three terminals – VCC, OUT and GND. When motion is detected, a HIGH output voltage signal is generated at OUT.

Detection Pattern

The PIR sensor has a 3-terminal IR sensing element connected to a simple signal conditioning circuit. This circuit generates a binary HIGH or LOW output when motion is detected.

PIR sensors have a wide angle range for motion detection. However, they also respond to rapid temperature changes in the field of view unrelated to motion, which can false trigger the output. To avoid this, PIR sensors use special detection methods:

  • Differential detection – Two IR sensors configured in a differential signal detection mode. Motion is detected when both sensors see a signal. Temperature shifts seen by both sensors cancel out.
  • Dual element sensor – Contains two sensing elements connected in opposite polarity. Output will be LOW when both elements see same IR level. Motion causes opposite signals as the internal shade moves back and forth over the elements when heated by a moving occupant.
  • Fresnel lens – Specially designed lens condenses distant infrared signals while filtering constant background IR sources to further improve sensitivity to human motion.

These techniques allow the PIR sensor to react only to heat and motion inconsistencies caused by human bodies while ignoring ambient temperature variations.

PIR Sensor Characteristics

Key characteristics that define the performance and usage of PIR sensors:

  • Detection range – Distance within which motion can be detected, usually 10 to 20 feet. Extended by optics.
  • Field of View (FOV) – Total volumetric angle within which motion is detected. Different lenses provide a variety of detection patterns.
  • Detection zones – Adjustable mirrors allow subdividing the FOV into discrete zones for directional sensing.
  • Sensitivity – Determines smallest detectable movement. Related to signal strength and amplification factors.
  • Time delay – Minimum time between activations to prevent multiple triggers due to the same motion. From 5 sec to 5 min.
  • Warm-up time – 15 sec to 1 min required for sensor to stabilize before active operation.
  • Operating voltage – Typically wide supply range of 5-20V DC. Low standby current consumption.
  • Output – Digital, analog, variable pulse width modulated options for direct interfacing.
  • Operating temperature – Industrially hardened versions work from -40°C to 85°C.
  • Immunity – Designed to avoid triggering due to ambient temperature shifts, indoor lighting, and EMI/RFI noise.

How to Use PIR Sensors

PIR motion sensors are easy to use. Here is a typical circuit diagram for connecting a PIR sensor:

The sensor simply connects between positive voltage and ground. A resistor limits current through the output pin which switches HIGH when motion is detected. The OUT pin can directly drive a microcontroller input or a transistor stage for toggling an external load.

A warm-up time of at least 60 seconds on power up is recommended before active motion detection for proper operation. The sensor lens should have an unobstructed view of the monitored region. Mounting height depends on the detection range – 8 to 15 feet is common.

Sensitivity can be adjusted via a potentiometer on most PIR sensors. Higher sensitivity could increase false triggers under certain conditions.

Many PIR sensors feature adjustable time delays from 5 to 300+ seconds to prevent repeated triggering of the output due to the same motion event. This helps reduce false alarms.

Interfacing PIR Sensors with Microcontrollers

PIR sensors can directly interface with microcontroller I/O pins for motion activated control. Here is an example Arduino sketch for a basic motion detector:

const byte pirPin = 3; // PIR connected to pin 3 void setup(){ pinMode(pirPin, INPUT); // Set pin as input Serial.begin(9600); // Start serial monitor } void loop(){ byte state = digitalRead(pirPin); // Read PIR sensor if (state == HIGH) { // If motion detected Serial.println("Motion detected!"); } else { Serial.println("No motion"); } delay(500); // Small delay }

The code continually checks the PIR sensor output. If motion is detected, it prints “Motion detected!” on the serial monitor. Else, it prints “No motion”. A short delay is added to avoid repeated prints.

More advanced algorithms can be implemented to detect motion only during certain times, keep a motion log, activate alarms or cameras, and conserve power using sleep modes.

Applications of PIR Motion Sensors

PIR sensors have numerous applications in home, commercial, and industrial automation systems. Some examples include:

  • Security systems – Motion activated security cameras, alarms, security lighting.
  • Home automation – Smart lighting, HVAC control, occupancy monitoring.
  • Automatic doors and gates – Open when someone approaches.
  • Traffic counters – Monitor vehicle or people traffic patterns.
  • Object detection – Detect vehicles at parking gates. Presence detection in factories.
  • Motion triggered games – Interactive displays and exhibits.
  • Energy saving – Turn on/off lights, AC based on occupancy.

Choosing a PIR Motion Sensor

With a wide range of PIR motion sensors available, here are some tips for selection:

  • For long range detection up to 20 feet, choose sensors with extended detection lenses. Consider the field of view shape.
  • Sensors with lower current draw are better for battery powered systems. Duty cycle operation helps conserve power.
  • Select adjustable time delay and sensitivity options for avoiding false triggering if needed.
  • Rugged industrial grade sensors will have higher ingress protection (IP), vibration tolerance and wide temperature operation.
  • Optical filters, dual element sensors reduce interference from ambient light and temperature changes.
  • Analog or PWM output versions allow measuring signal strength instead of just on/off control.
  • Versions with daylight blocking and pet immunity features are suitable for home use.
  • Easy mounting provisions, wiring terminals, adjustment controls should be considered for easy installation.
  • Units approved for the region, rated for safety, with manufacturer warranty give peace of mind.

Interfacing Considerations for PIR Sensors

Some tips for reliable PIR sensor interfacing:

  • Make sure the sensor has unobstructed line-of-sight to monitored region. Avoid installing behind partition walls.
  • Glass doors/windows can block infrared – install on an adjacent wall. Areas with heavy glass/metal should be avoided.
  • Mounting height between 8-15 ft is typical. Higher to cover larger areas.
  • Avoid wiring in parallel with power cables which may couple noise. Twisted pair cables are better.
  • Add filtering capacitors on voltage lines for power supply decoupling if long cables are used.
  • Ensure supply voltage is within rated range including drops due to long wiring runs.
  • For outdoor use, mount inside weatherproof housings with IR transparent window. Avoid direct rain/sun on sensor.
  • Heaters, AC ducts can cause false triggers – keep away from direct drafts and heat sources.

With good positioning and wiring practices, stable PIR sensor operation can be obtained.

Advanced PIR Sensor Circuits

While PIR sensors can directly interface to logic circuits, some additional circuitry can improve functionality:

Amplification – Adding an amplifier boosts the sensor output signal enabling longer range or smaller motion detection.

Latching – A flip flop circuit latches the output HIGH on motion detect, holding devices on until reset manually.

Timing control – Timers set triggered device on-time duration, or enforce mandatory OFF intervals.

Shut-off timer – Automatically turns the system OFF after being triggered for a set duration. Saves energy.

Creep zone detection – Detects motion very close to the sensor using a secondary IR sensing element. Improves security.

Multiple sensors – Connecting multiple PIR units provides expanded coverage with configurable trigger logic.

Wireless interface – Output drives a radio transmitter to enable monitoring remote, hard to wire locations.

PIR Sensor Module Options

PIR Motion Sensors

For easier prototyping, self-contained PIR sensor modules are available with built-in circuitry and standard interfaces:

  • 3-pin analog modules – Potentiometer sensitivity adjustment. Analog voltage output proportional to detected IR signal level.
  • 3-pin digital modules – Directly interfaces to digital I/O pins. May feature time delay and sensitivity configuration.
  • PWM output modules – Generate pulse width modulated signal proportional to detected motion.
  • I2C/SPI modules – Digital communication over I2C or SPI interfaces. Allow microcontroller configuration of module parameters.
  • Relay modules – Inbuilt electromechanical relays that close on motion detect for switching higher loads.
  • Microwave hybrids – Combine PIR and microwave radar sensors on a single board for fewer false triggers.

These modules simplify prototyping and final product integration using PIR technology.


PIR motion sensors provide an inexpensive yet effective way to detect motion for security, automation and other useful applications. Their ability to detect occupancy without physical contact allows flexibility in system design and installation. Incorporating additional circuit elements can further enhance PIR sensor capabilities. With a good understanding of working principles and characteristics, reliable motion sensing can be added to projects with PIR technology.

Frequently Asked Questions about PIR Motion Sensors

Some common questions about PIR motion sensors:

Q: How does a PIR motion sensor detect movement?

A: It uses a pyroelectric sensor to detect levels of infrared radiation. Moving occupants emit changing IR radiation which the sensor detects as motion.

Q: What is the typical detection range of a PIR sensor?

A: Most PIR sensors have a detection range of 10-15 feet. Larger range units and special optics can extend this to 20-25 feet.

Q: How wide is the field of view of a PIR?

A: Basic sensors have 100-120° FOV. Lens options like curtains and long range optics provide narrower, longer FOVs.

Q: Can PIR sensors see through glass or walls?

A: No, obstacles fully or partially block the infrared waves from reaching the sensor, preventing motion detection.

Q: How fast can a PIR sensor respond to motion?

A: Commonly between 50 to 500 milliseconds. Faster responding sensors are available using special circuitry.




                Get Fast Quote Now