Raspberry Pi Home Security Camera


For all those who like to dabble with electronics, programming, networking and creativity. The Raspberry Pi is the perfect fix. This Pi Zero W (shown), cost a grand total of $5 at Micro center. Although I was only allowed to purchase one per visit, I made subsequent visits and picked up two more. At $5 why not, with no planned project to build, for sure I will find some. I settled on making a Wireless home security camera.

Although there are tons of sites referencing this topic, I want to share my experience with hopes of clearing up some of the clutter.


Along with the pi I purchased the following:

  • Amadget for Raspberry Pi Camera Module 5MP 1080p + 15cm Pi Zero Ribbon Cable, Webcam for Raspberry Pi Model A/B/B+, Pi 2 and Raspberry Pi 3, Pi Zero/Zero W. $12 from Amazon.


  • Case for pi and camera – $3.95 from micro center.


  • GRAND TOTAL = approx $22


My plan is to program and access the pi using a headless setup. Meaning I will not use a keyboard, mouse or monitor. All setup will be done through SSH (putty).

  • The first step is to select the operating system to be installed on the pi . Since I will be using a headless setup, I opted for Raspbian Stretch lite.


  • Download Zip file. The image should look something like this:


  • Next you have to burn that image to your micro SD card. Download the image burning software Etcher. The website will walk you through the simple steps.


  • After Etcher is done, your image should be burned to your micro SD card and look something like this:


  • Since we will be booting headless, we have to make changes to three image files before we go any further. These changes allow us to use SSH, also this is where we enter the wi-fi user name and password. The files that we will be modifying are as follows:
1. wpa_supplicant.conf – wifi settings

The WiFi configuration file does not exist and needs to be created. Open any text editor such as Notepad, create a file named wpa_supplicant.conf. Copy the code listed below into the file. Be sure to input your home SSID (the SSID is your wifi name that is being broadcast) and password. This a one time only process. If you want to try again, you have to recreate the file and reboot.

The contents of the file should be as shown below. Replace YOURSSID and YOURPASSWORD with whatever is used for your network setup.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev


2. config.txt – global system settings -(not necessary )

The file called config.txt already exists, we are just going to edit its contents. We will add some text to the bottom to enable the UART on the GPIO header pins. This allows a USB console cable to be attached later for troubleshooting.
* It is not necessary to modify this config.txt file. This is for special cases, only if you will be using the console cable, otherwide I recommend leave as is.

3. ssh – an empty text file to enable ssh

SSH used to be enabled by default, but was then (Nov 2016) turned off by default. This was due to security concerns since the pi user id and password are well known. However, you’ll likely want this enabled so you can remotely connect to the Pi Zero.

To do so, use any text editor such as Notepad, simply create a file called ssh. This file does not exist and needs to be created. The file will be empty. The system looks for it at boot time and will enable ssh if it is there. It is then deleted. So just create a new file and save it as ssh to the bootfolder.

  • Remove sd card from computer, insert into raspberry pi.
  • Connect power to pi. Besure to connect to the right jack. Allow a minute for your pi to bootup.


  • Download Putty onto your desktop computer. Since you donot know the IP address yet, enter the host name. All raspberry pi’s have a default host name of “raspberrypi”. Leave port 22 as is. Click open.


  • When the black screen appears, that says login as: enter pi
  • Next it will ask for password: enter raspberry
  • Yureka! at last you are in.


Congrats if you got in on your first attempt, because i didnt. As a matter of fact I had to use a different technique. Stay tuned, I will keep you posted on that one, as well as how to configure your camera.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s