Raspberry Pi
(Camera & Flask server)
Arduino
(Electronics & sensors)
Serial comms.
(send data)
Camera
PIR sensor
LED
99
make.co
Security cameras can be a great way to monitor
and protect your home while you’re away.
However, with the proliferation of cloud-based
solutions on the market, you may feel uneasy
about the idea of your own video footage being
handled by a corporation’s cloud service.
Moreover, some of their useful features such as
recording or screen capture are typically hidden
behind a subscription plan. What if you could
build your own security camera with a Raspberry
Pi, an Arduino, and motion sensors?
In this guide, you’ll build a DIY security camera
that you have full control of, without the need
for a subscription plan. You can include as many
features as you want — after all, this is an open-
source project!
INTRODUCING THE PI SMART CAM
The Pi Smart Cam is an open-source DIY camera
designed for you to view live footage from your
phone — or any device — remotely (Figure
A
). It
can detect motion and send you alerts, like a Nest
security cam, but privately on your local network.
This project builds on my previous “Live
Streaming with Raspberry Pi” tutorial in Make:
Volume 76, makezine.com/projects/beginner-
project-a-remote-viewing-camera-with-
raspberry-pi. (If you’re new to working with a
Raspberry Pi, it would be best to explore the
previous tutorial first.) In this guide, we’re taking
things a step further by entering the world of
microcontrollers.
HOW IT WORKS
Pi Camera stream The Pi Smart Cam captures
live footage from the Raspberry Pi Camera
Module and uses Flask (a Python web framework)
to create a live stream to any client device
connected to the same network (Figure
B
). Flask
provides the “bridge” between Python and an
HTML web page, which supports Motion JPEG
video — essentially a sequence of independent
JPEG images in a video compression format.
Arduino An Arduino microcontroller sends
values to the Pi via USB serial connection. With this
setup, we can make the Pi trigger an action when
the PIR sensor detects motion, such as sending
emails, turning lights on, or sounding an alarm.
Open Smart Cam
TIME REQUIRED:
4–6 Hours
DIFFICULTY:
Intermediate
COST:
$120–$150
MATERIALS
Check the GitHub repo for the latest parts list:
github.com/EbenKouao/pi-smart-cam
» Raspberry Pi single-board computer
with power supply; model 4B recommended
» Raspberry Pi Camera Module
v2 recommended
» microSD card, 32GB+
» Arduino Nano microcontroller board
» PIR sensor, HC-SR501
» Breadboard, half size
» Jumper wires: male/female and male/male
» Resistor, 220
Ω
» LED
» Cable, USB-A to Mini-B
For the hardware chassis (optional):
» 3D-printed parts free 3D files at the GitHub repo
» Screws, self-tapping, M3×40mm (4)
» Braided cable sleeve
TOOLS
» 3D printer (optional)
» Computer with Arduino IDE free from arduino.
cc/downloads
A
B
M82_098-103_SmartPiCam_F2.indd 99M82_098-103_SmartPiCam_F2.indd 99 7/12/22 3:13 PM7/12/22 3:13 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset