DIY Motion-Detection Alerts: Building a Low‑Cost Surveillance System
Read this article in clean Markdown format for LLMs and AI context.In under 60 minutes and for less than $50, you can create a reliable motion‑detection alert system that pings your phone the moment something moves. This guide shows exactly how to build a low‑cost surveillance system with a Raspberry Pi, a cheap PIR sensor, and open‑source software—no pricey cameras required.
Why Motion Detection Matters Now
The pandemic turned homes into offices, classrooms, and data vaults, so real‑time alerts are more critical than ever. A single motion‑detection alert lets you stay focused on a Zoom call while the system watches the doorway, delivering peace of mind without constant screen‑checking.
Core Ingredients for a Budget‑Friendly System
1. The Camera
A 1080p USB webcam or a refurbished Raspberry Pi Camera Module with night‑vision IR LEDs. The tiny red lights give clear night vision without blinding the neighborhood.
2. The Brain
Raspberry Pi Zero W – credit‑card sized, under $15, built‑in Wi‑Fi. (A Pi 3/4 works too.) It runs the detection software and pushes alerts to your phone.
3. The Sensor
A passive infrared (PIR) sensor – $2‑$3. It detects heat changes, so headlights won’t trigger false alarms. Pins: VCC, GND, OUT.
4. The Software Stack
- MotionEyeOS – lightweight Linux distro that turns a Pi into a full‑featured surveillance hub (video streaming, recording, motion detection).
- Home Assistant – optional but powerful; it can receive motion events from MotionEyeOS and send push notifications via the mobile app or services like Pushover.
Step‑by‑Step Build
Step 1: Assemble the Hardware
- Mount the PIR sensor 6‑8 ft high, pointing at the area you want to monitor. Secure with double‑sided tape or a small bracket.
- Wire the sensor to the Pi’s GPIO: VCC → 5 V, GND → Ground, OUT → GPIO 17 (or any pin you prefer).
- Connect the USB webcam to a Pi USB port or attach the Pi Camera Module to the CSI connector and enable it in
raspi-config.
Step 2: Flash MotionEyeOS
Download the latest MotionEyeOS image for the Pi Zero W from the official site. Use Balena Etcher to write the image to an 8 GB micro‑SD card.
After flashing, edit the wpa_supplicant.conf file on the boot partition to add your Wi‑Fi credentials—no keyboard or monitor needed.
Step 3: Configure Motion Detection
Boot the Pi, then open a browser to http://<pi‑ip-address>. Default login: admin with a blank password—change it immediately.
- Under “Video Device,” select your camera and enable “Motion Detection.”
- Set sensitivity to 30‑40 % to avoid false alarms from pets or curtains.
Now add the PIR sensor: in the MotionEyeOS UI go to “Motion Detection” → “External Trigger” and select the GPIO pin you wired. This makes a high signal from the PIR count as a motion event, overriding software‑only detection.
Step 4: Push Alerts to Your Phone
Option A – Home Assistant integration
automation:
- alias: "Motion Alert"
trigger:
platform: webhook
webhook_id: motioneye_alert
action:
service: notify.mobile_app_jordan_phone
data:
title: "Motion Detected"
message: "Something moved in the driveway"
Option B – Built‑in Email → Push
Enable MotionEye’s “Send Email” feature and forward those emails to a push‑to‑phone service like Pushover. Either way, you’ll get an instant ping when the PIR senses heat movement.
Step 5: Fine‑Tune and Secure
- False Positives: Adjust the PIR’s delay potentiometer to ignore brief heat spikes.
- Privacy: Disable remote access unless needed. If you enable it, use a strong password and preferably a VPN instead of exposing the Pi directly.
- Power: A 5 V/2 A USB supply works, but for true “set‑and‑forget” you can attach a small solar panel and battery pack—great for balcony installations.
Real‑World Test: My Front Porch
I installed this exact setup on my front porch. Night 1: the PIR caught a raccoon rummaging through the trash and sent a bright orange notification to my phone. Night 2: a stray cat triggered a 10‑second clip—no threat. The system also logged the delivery driver’s bike, letting me watch the package being placed on the step in real time. All under $50.
When to Upgrade
If you need facial recognition, multi‑camera stitching, or AI‑based object classification, the Pi Zero’s CPU will become a bottleneck. At that point consider a dedicated NVR or a cloud‑based service, a step toward future‑proofing your IoT ecosystem. For most homeowners who just want a reliable “Did something move?” alert, the DIY route remains the most cost‑effective.
Bottom Line
A low‑cost motion‑detection alert system isn’t about buying the newest gadget; it’s about leveraging simple physics—heat and light—with a Raspberry Pi, a cheap PIR sensor, and open‑source software. You get a trustworthy guardian that whispers “all clear” or “hey, look at that” straight to your pocket, perfectly aligned with the smart‑home ethos: affordable, customizable, and a little fun.
- →
- →
- →
- →
- →