top of page

Human Sensing Pi Camera

This project can give you a detail about, how we can detect the movement of human being crossing in front of camera. This is achieved using a pi camera and PIR motion sensor connected to raspberry pi. We can use this for detecting humans or any other living beings and capture video through pi camera and store it in multiple files.

Components used in this project:

  • Raspberry pi 4

  • Pi camera

  • PIR motion Sensor

  • Jumper Wires


In the above circuit pi camera is directly connected to the camera port.

PIR motion sensor has 3 terminals Positive,Gnd and Output. Positive is connect to 2nd pin, Gnd is connected to 6th pin and the Output is connected to 7th pin of the raspberry pi.


PIR sensors allows you to sense motion and used to detect whether a human has moved in or out of the sensor range. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors.

This Sensor can cover a sensitive range from 3 to 7 meters and Time delay from 2 to 200 seconds.

After completing the connection setup, move on to coding part. First import the library files for pi camera and PIR sensor. Then make an initialization for storage path to capture videos. Full coding is attached below.

Download DOC • 1KB

If the motion gets detected, then the camera records the video for 5 seconds. We can also change it based on our need.

17 views0 comments

Recent Posts

See All


bottom of page