I have been wanting to build a security camera for my home, but most commercial options are expensive and often require monthly fees. However, I recently learned how to make a low-cost motion activated security camera using a Raspberry Pi! This clever hack allows me to build a capable surveillance system on a budget that few people know about.

What You Will Need

To build this low-cost Raspberry Pi security camera, you will need:

Hardware

Software

Other Supplies

Assembling the Hardware

With all my supplies gathered, it was time to assemble the hardware.

Setting up the Raspberry Pi

I started by inserting the MicroSD card loaded with Raspberry Pi OS into the Pi.

After connecting the Pi to my monitor, mouse, and keyboard, I booted it up to customize the operating system installation.

With the OS ready, I enabled SSH and VNC so I can access the Pi headless after setup.

Connecting the Camera Module

The official Raspberry Pi camera module connects directly to the CSI port on the Pi.

I inserted the ribbon cable securely into the CSI port and attached the camera board.

Accessories

Finally, I placed the Pi inside a protective case and mounted the camera module in an enclosure I 3D printed.

I can position this anywhere I want to point the camera later.

Installing and Configuring Software

With the hardware assembled, it was time to install and configure the necessary software.

Installing Motion

I installed the Motion software on the Raspberry Pi using this command:

sudo apt install motion

This provides the motion detection capabilities.

Configuring Motion

I then edited Motion's configuration file at /etc/motion/motion.conf to customize its settings:

Setting Up Remote Access with FTP

To access videos remotely, I installed vsftpd - a FTP server for the Pi.

I configured vsftpd to store files in /var/lib/motion, Motion's default video directory.

Now I can connect to the Pi via FTP to download video files triggered by motion events.

Deploying the Motion-Activated Security Camera

With everything installed and configured, it was time to set up my DIY security camera.

Positioning the Camera

I positioned the camera enclosure to point at my front door to start. The modular design means I can move it anywhere.

Connecting It to My Network

For the best bandwidth, I connected the Pi to my router via Ethernet.

But the built-in WiFi works if Ethernet is not practical for your setup.

Powering on the Camera

The final step was simply connecting the Raspberry Pi power supply to boot up the Pi and activate the camera!

Accessing and Managing Videos

Now my budget Pi security cam is up and running!

When motion is detected, it will record video to the Pi. I can then access these files in a couple ways:

I can delete old footage as needed to manage storage on the SD card. And I'm notified of any motion events detected!

Closing Thoughts

Building a fully-featured motion activated security camera with a Raspberry Pi turned out to be surprisingly easy and affordable using Motion and a Pi camera module.

The final product rivals commercial offerings at a fraction of the price, and I can customize it to suit my needs. This project is a prime example of the versatile uses for Raspberry Pis!

With some additional work, I could even enable remote access to the video stream over the Internet. But for now, I am satisfied with the local storage and network access capabilities.

I'm thrilled to add this DIY Raspberry Pi camera to my home surveillance system on the cheap. Let me know if you build your own!