A Passive Infrared (PIR) sensor detects motion by measuring changes in the infrared radiation (heat) emitted by surrounding objects (such as humans or animals) moving across its field of view. In Open Maker Studio, the PIR sensor is the primary module for security systems, occupancy detection, and motion-activated devices.
1. Hardware Specifications & Pinout
- Operating Voltage: Real HC-SR501 module accepts 5–20V VCC — an onboard LDO regulates the OUT pin's HIGH level to a fixed 3.3V regardless of input voltage (confirmed via a real HC-SR501 datasheet citation in the component's own code).
- Output Signal: 3.3V digital logic (HIGH = motion detected, LOW = clear/idle).
- Detection Angle & Range: 110° cone (confirmed exactly), from 0.3m to 7m depending on the Sensitivity setting.
- Onboard Adjustment Potentiometers:
- Sensitivity (SENS): Adjusts the detection range from 0.3m to 7m.
- Delay Time (TIME): Adjusts how long the output stays HIGH after motion stops, from 0.3s to 60s.
- Pin Configuration:
- VCC: Connect to power (5–20V real range; simulated here).
- GND: Connect to common Ground.
- OUT: Connect to any digital input pin (supporting external interrupts for instant triggers).
2. How it Works (Theory of Operation)
The PIR sensor contains a pyroelectric sensor chip split into two halves behind a Fresnel lens.
- Ambient Calibration: When powered on, the sensor needs up to 60 seconds to sample the background infrared profile of the room.
- Motion Detection: When a warm body moves in front of the sensor, it first cuts one half of the sensor and then the other. The differential change in IR voltage triggers the internal comparator, driving the OUT pin HIGH.
- Trigger Modes: A yellow jumper on the back selects between:
- Single Trigger (L) — the real OMS default: Output goes HIGH on motion, stays HIGH for the set delay, then goes LOW, even if motion continues (re-entering the detection zone while the delay timer is counting does NOT reset it).
- Repeat Trigger (H): Stays HIGH as long as motion persists — re-entering the zone while the delay timer is counting cancels and restarts it.
3. Component Properties (Property Inspector)
When you select the PIR Sensor on the canvas, you can modify the following parameters in the Property Inspector panel:
- Sensitivity (
sensitivity): Sets the detection range.- Default:
512 - Range:
0to1023(maps to 0.3m–7m of real detection distance)
- Default:
- Time Delay (
timeDelay): How long OUT stays HIGH after motion stops.- Default:
5s - Range:
0.3s to60s (step size0.1s)
- Default:
- Repeat Trigger (
repeatTrigger): Selects Single vs. Repeat trigger mode.- Default:
Single(0) — not Repeat. - Options:
Single(0),Repeat(1)
- Default:
Motion itself isn't a simple on/off toggle — see Section 6, since the real interaction is a draggable person figure with genuine distance/angle geometry, not a checkbox.

