Passive Infrared (PIR) Sensors
A PIR (aka Passive InfraRed) Sensor detects motion when some warm object (like a
person or a mouse or a falling soldering iron) moves in front of it. It then sets
its digital output
PIR sensors are commonly used:
in robotics, to sense an obstacle in the path (and thereby alert the robot that
it needs to change direction),
in security applications, where a motion implies the presence of some unexpected
or unwanted activity.
The inexpensive PIR sensors used by hobbyists consist of a circuit board with a
dome shaped cover:
When the dome is removed, you can see a little aluminum “can” with a rectangular window:
The sensor is sealed within the can and is positioned directly behind that window.
The sensor detects changes in the total amount of heat falling on it. Every object
has some temperature; humans have a higher temperature than furniture because they are
constantly converting food into energy. The sensor does not take a picture of the
scene in front of it (you’d need a far more expensive device like a thermal camera for that),
but merely senses when the overall heat load on it has changed. That change causes
the sensor to set the
DATA OUT signal on the PIR sensor to
can be tied directly to an
LED, or it can be detected by a microcontroller which can
generate a more complicated response.