techno matt Rotating Header Image

Setting up an inexpensive motion detecting security camera using a Raspberry Pi


I finally found a project for my Raspberry Pi and setup a security camera.

The total cost (in addition to the Raspberry Pi I already owned) was less than $5 ($4.79 with free shipping on Google Prime) as I had to order a new USB camera. So once you can find one of the new Raspberry Pi zeros in stock for $5, you should be able to put together a cheap camera.

Once I determined that the Raspberry Pi camera wasn’t working for some reason (I’m not sure if it is broken or if there is a software or other configuration issue), I ordered a USB Sony PS3 Eye Motion camera for $4.96 on Amazon.

Here is everything you need.

  • Raspberry Pi (I used a model B, but a 2 would likely work better handling video streams)
  • SD card
  • Ethernet cable and/or USB wifi adapter
  • USB camera (Sony PS3 Eye Motion camera is SD and only $5)
  • Power supply
  • optional
    • USB keyboard & USB mouse if you want to do any configuration directly on the device without having to connect to it from another computer.
    • powered USB Hub if you are using more than the two USB ports on the B+
    • wifi adapter. If you don’t mind running ethernet cable to the Pi, then you don’t need a wifi dongle.

The simplest way to get the software setup is to use the MotionEye OS SD image for your Pi.


Here are some details about MotionEye

You need to do the following.

  • Download the IMG file for MotionEyeOS
  • Flash it to an SD card.
  • Hookup the USB camera, power, and ethernet to the Raspberry Pi.
  • Insert the SD card into the Pi and boot it.
  • The default login is “admin” and no password.

Change any settings that you would like, including setting up wifi or changing passwords.

If you want remote access, you will need to forward the appropriate ports on your router. Port 8081 is used for video streaming and the web server is on port 80. I would suggest changing the external port from 80 to something else, but leave it 80 internally.

This has info about setting up push notifications for your phone or other devices as well.

This tutorial is for an earlier version, but it has far more details than I have included above.


This YouTube video also discusses the process for an older version of the software.

This video might be helpful as well.


Comprehensive tutorial here.


Don’t have a Raspberry Pi?

I also found this Windows (Yawcam) program that allows similar functionality.

This app is simpler, but does some of the same.

One Comment

  1. Fletcher Holman says:

    The man in your picture shares a striking resemblance to David Cross!

Leave a Reply

Your email address will not be published. Required fields are marked *