PN 8-038 BA · RS · ME / Regional academic maker initiative

HC-SR501 PIR motion sensor

A passive infrared sensor responding to changes in thermal radiation within its field of view.

What it is and how it works

The kit includes one HC-SR501 PIR module. PIR means passive infrared: it does not send a beam towards an object but responds to changes in infrared radiation from its surroundings. A segmented white lens directs radiation from several areas towards the sensing element. A warm body moving between those areas can change the output.

The signal reports a change associated with movement. It does not identify a person, reliably count people or prove that a room is empty when everyone is still. PIR and the kit's reflective obstacle sensor therefore support different demonstrations.

What we can use it for

  • Switch on an LED lighting model when someone passes a desk.
  • Wake an OLED display during interaction with an exhibit prototype.
  • Log motion detection times in a classroom exercise.

First exercise

Allow the sensor to stabilise after power-up, then monitor its output while walking past it. Compare movement across the field of view with standing still. Record how long the output remains active before changing time or sensitivity controls, if fitted.

Handling notes

Read the actual pin labels rather than inferring connections from the lens position in an illustration. Check the required supply and output voltage for the specific module before connecting ESP32. Supply and signal voltage need not be equal. Avoid radiators, direct sunlight and sources of sudden thermal changes.

Background: Adafruit — PIR Motion Sensor.