Buy Buy Sugru

How to build your own IoT camera

Security camera made from an old webcam, a tripod, a Raspberry Pi and Sugru

Ever wanted to build your very own, fully functional IoT security camera, kid’s cam, doggy cam, goldfish cam… This project makes it easy for you to experiment with the burgeoning IoT technology, while you up-cycle some old tech and also get to experiment with some basic code. 

Stage 1 - 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
  • a 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 
  • 1 pack of Sugru
  • scissors

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 pack to mount the tripped nut to the base of the camera
  • Roll into a ball, press firmly onto the base and mould into a pyramid 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 rest of the Sugru into a ball
  • Press it onto the back of the camera making sure that the cable is twisted in the best direction
  • Mould into a pyramid shape
  • Press the camera slowly and firmly onto the Raspberry Pi
  • Press the sugru in and rub gently where you can reach it

And then just wait 24 hours for the Sugru to cure.

Step 3 — Wait for 24 hours for Sugru to cure

Stage 2 — 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.

STEP 5 - 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:)