How to build your own IoT camera

Camera made from webcam, tripod, Raspberry Pi and Sugru

Ever wanted to build your very own, fully functional IoT camera? Use it as a security cam, kid’s cam, doggy cam, goldfish cam...whatever your heart desires. This project makes it easy for you to experiment with IoT technology, while making use of old gadgets and fiddling with basic code.

Build the camera

What you'll need to do this project

Scissors, old webcam, SD card, Raspberry Pi, 1 single use pack of Sugru, a nut, tripod
  • Raspberry Pi™ (a clever little, low-cost computer that plugs into any monitor or TV) 
  • An old webcam 
  • A Joby™ tripod 
  • A nut (a standard 1/4” - 20 nut available from most hardware stores) 
  • 1 SD card 
  • A single-use pack of Sugru

Step 1 — Mount the tripod nut to the camera

Steps to mount a tripod to a camera with Sugru
  • Use just 1/5 of the Sugru pack and roll into a ball. Press firmly onto the base of the camera and mould into a cone shape
  • Put the nut onto your tripod (keep it nice and loose) then press slowly and firmly into the Sugru
  • Press the Sugru in and rub smooth
  • Gently unscrew the tripod

Step 2 — Mount the camera to the Raspberry Pi

Steps to mount a webcam to a Raspberry Pi with Sugru
  • Roll the remaining Sugru. Press it onto the back of the camera, making sure the cable is twisted in the best direction
  • Mould into a cone shape. Press the camera slowly and firmly onto the Raspberry Pi
  • Press the Sugru in and rub gently where you can reach it
  • Leave for 12-24 hours for the Sugru to set

Set up the code to run the Raspberry Pi

To transform your new camera into an IoT camera, just download the customised Open Source Code we’ve built for you and follow these steps. This will run in your browser, over your WI-FI and on any smartphone or desktop computer. No apps, no subscriptions, just some seriously good old-fashioned technology. 


Step 1 — Download the SD card image


We have made the camera setup really plug and play for you by creating a Raspberry Pi 'image'. This is essentially a snapshot of a whole operating system, along with its files, settings and installed programs that can perfectly capture images from your webcam and serve them up to your phone, tablet or computer. You need to download this image file and clone it into an SD card. Since the file is a snapshot of an SD card, it’s quite large, measuring up at 16GB. Make sure you have space for it! You can delete it afterwards. Download it here.


Step 2 — Clone image to SD card


Now, once you’ve downloaded the Raspberry Pi image, you need to clone it into an SD card. This operation is wildly different and depends on the operating system your computer is running. This is probably going to be the trickiest part of the operation, but don’t be scared! The wonderful folks at the Raspberry Pi Organisation have made a great easy-to-follow guide that shows you how to take your image file and burn it onto an SD card. Head on over here to master image burning! Look at the section titled 'Writing an image to the SD card'.

Step 3 — Add in your WiFi details


Once you’ve written the image to your SD card, you should see two SD cards mounted on your computer - 'boot' and 'recovery'. Go ahead and open boot. Right at the end of the file list, you’ll find a file called 'wifi.conf'. Open that up in a text editor (TextEdit if you’re on a Mac, or Notepad if you’re on Windows). Here’s where you add in your WiFi details so that the Pi knows how to connect to your home network. Swap out 'YourWiFiNameHere' with whatever your WiFi network name is, and 'YourWiFiPasswordHere' with your, you guessed it, WiFi password! Save and close the file, and eject both SD cards from your system. You can now remove it from your computer.

Step 4 - Connect it all up


Congratulations! You’re through to the last and most fun part. Put the SD card into the Raspberry Pi. Connect up your webcam to one of the USB ports on the Pi. Make sure that everything’s nicely mounted and ready to go.

Power it up and test!


Finally, go ahead and plug in the microUSB cable that will provide the Pi with power! Your Raspberry Pi IoT Camera will start booting up. You’ll see some rapid light blinking, which is signalling that the Pi is going through its startup routine. After about a minute or two, open a web browser on your phone, tablet or computer. Navigate to http://iotcamera.local:8081. You should be able to see a live stream from your camera! Well done! 

If the website does not load, double check that you’ve entered your WiFi credentials correctly.

THAT'S IT - enjoy experimenting with your new IoT camera :)