PIR Sensor Motion Detector Circuit Design
A passive infrared detector responds to a change in the infrared radiation reaching it, and that single sentence explains most of its behaviour: it detects movement, it ignores a stationary person, and it can be triggered by anything that changes the temperature of what it is looking at, including a draught or a patch of sunlight.
What a PIR Sensor Detects
The element responds to a difference in the radiant power falling on it. A person at body temperature radiates infrared, and when that person moves across the field of view the power at the element changes, which produces a charge.
A stationary person produces no change and therefore no signal, however warm they are. A detector that is claimed to sense presence has to add another principle, such as ultrasonic or microwave sensing, to cover the stationary case.
The response is to change rather than to absolute level, which is why the detector does not need a calibrated infrared measurement. It needs a stable reference and enough gain, and it must not respond to the slow drift of the ambient temperature.
The Pyroelectric Element and Its Two Halves
A pyroelectric crystal produces a charge when its temperature changes. The charge leaks away through the element and its load, so the device behaves as a differentiator with a time constant of seconds rather than as a thermometer.
Almost every PIR element is split into two opposing halves connected in series. A change in the ambient temperature affects both halves equally and produces no net output, while a warm body crossing the field affects one half first and produces a differential signal. That differential construction is the reason the sensor is so insensitive to a slow temperature rise.
The element is also the origin of the polarity of the output. A body moving from left to right produces a positive then a negative pulse, and one moving the other way reverses the order. The processing electronics can use that asymmetry, though most designs simply detect either polarity.
Fresnel Lens and Detection Zones
The Fresnel lens in front of the element breaks the field of view into alternating zones of high and low sensitivity. A person walking through the zones produces a train of pulses, which is much easier to distinguish from drift than a single slow change.
The lens also sets the range and the beam pattern. A long range corridor detector uses narrow zones, while a wide angle room detector uses many zones arranged in a fan. The pattern is a property of the lens moulding, so it is fixed at the design stage.
A detector that has to be aimed needs a lens with a visible aiming pattern or a built in spirit level. The same lens design also determines the minimum detectable movement, because a person has to cross at least one zone boundary to be seen.

The Analog Front End
The element is a capacitor of a few picofarads with an extremely high source impedance, so the first stage is a junction field effect transistor working as a source follower, usually built into the package. The signal at that point is a few microvolts.
The amplifier that follows needs a high input impedance, a gain of several thousand and a band pass response from about a tenth of a hertz to about ten hertz. The low corner rejects the slow drift of the ambient and the high corner rejects the mains hum and the noise of the amplifier.
A two stage design is typical, with the first stage providing gain and the second providing the band pass shape. The coupling capacitors set the low corner, and their values have to be large, which for small packages means a high leakage type is not suitable.
detection threshold and the Comparator
detection threshold is the level at which the output is declared to be a detection. It must sit above the noise of the front end and above the residual drift, and below the smallest pulse that a real intruder produces at the edge of the range.
A window comparator, or a pair of comparators with opposite polarities, detects pulses of either sign. That doubles the number of events that trigger a detection without lowering the threshold, which is a better trade than making the threshold more sensitive.
Some designs use an adaptive threshold that follows the ambient noise. It sounds attractive and it introduces a failure mode: in a very quiet environment the threshold falls so far that the detector responds to its own noise. A floor value under the adaptive part prevents it.

false triggering and Its Causes
false triggering comes from the environment far more often than from the circuit. Sunlight moving across a floor, a hot air vent, a radiator switching on and a cold draught under a door all produce a change in infrared power at the element.
Air movement inside the enclosure is a second cause. A detector with a poorly sealed housing has a slow flow of air across the element, and the resulting signal is indistinguishable from a slowly moving target. A sealed window and a stable internal temperature solve it.
Radio frequency pickup is the third. A mobile transmitter close to the detector rectifies in the front end and produces a low frequency pulse. Short input leads, a ground plane and a small capacitor across the input limit the effect.
Digital Filtering and Timing
A pulse count is the simplest and most effective digital filter. The detector requires two or three pulses within a window before it declares an alarm, which rejects single events caused by a draught or a light change while keeping the response to a person walking.
The window has to match the zone crossing rate at the expected walking speed. Too short a window and a person walking slowly is missed, too long a window and two unrelated events are combined into a false alarm. The timer settings in a commercial detector are exactly this trade made explicit.
A hold time keeps the output active for a minimum period after the last pulse, which prevents a lamp from switching off while a person is still moving slowly. A photocell that disables the output in daylight is often added for the same reason, and its own hysteresis prevents it from oscillating at dusk.
Housing, Window and Optics
The housing is part of the optical design. The window must pass the far infrared, it must not distort the lens pattern, and it must not become a path for air to move across the element. A moulding that is polished on the inside and textured on the outside usually meets all three requirements.
A white plastic window that is translucent in the visible range also passes a large part of the near infrared, and the marketing claim of a white lens that hides the sensor has to be balanced against the extra sensitivity to light and heat sources. The general board level measures that keep a small analogue signal clean are set out in our guide to mixed signal board design.
Layout, Light and Verification
Keep the element and the first stage away from any heat source on the board, including the regulator and the relay that the output drives. A few tenths of a degree of local temperature change at the element is enough to produce a signal.
Shield the element from visible light. The window material passes some visible radiation, and a bright light that switches on suddenly produces a thermal transient in the element. A filter that passes only the far infrared costs a little sensitivity and removes a common false trigger.
Verify the detector by walking through the coverage at several angles and distances and recording which zones trigger. Then repeat with the heating or the air conditioning running, which is where the difference between a design that works on the bench and one that works in a building becomes obvious. The release checks that keep these units consistent are collected in our PCB design release checklist, and the board quality points we inspect are in judging PCB quality.
FAQ
Why does my PIR detector trigger with nobody in the room? A change in infrared power from a draught, a vent or moving sunlight is the usual cause. Seal the housing and check the aim.
Can a PIR sensor detect a person who is standing still? No. The element responds to change, so a stationary person produces no signal once the initial movement has settled.
How do I stop false alarms from a single event? Require two or three pulses inside a time window, which is the pulse count setting on most commercial detectors.



