Zero Security Camera





Introduction: Zero Security Camera

This instructable is how to make a web based security camera based on a Raspberry Pi Zero + Raspberry camera module housed in a 'dummy' security camera housing. It uses power over ethernet to power the unit so the only connection is a single ethernet cable into the back of the unit.

The Pi Zero is a very small unit which fits easily within the small dummy security housings but does not natively have an Ethernet connection. Two small electronic modules are added to the Pi Zero; a mini buck voltage regulator to power the Zero from Ethernet and a USB to LAN converter to provide the base networking connection.

Step 1: Shopping List

  1. Raspberry Pi Zero module ~ £4.80
  2. Raspberry Pi Camera module ~£20
  3. Pi Zero camera cable ~£4
  4. Micro SD card 8GB or higher ~ £5
  5. Mini Buck voltage converter EBay ~£1
  6. Micro USB to LAN module EBay ~£1.50
  7. Dummy Security camera EBay ~ £4

It is possible to get V1 camera with zero cable included at a significantly cheaper price. V1 has a lower still image resolution than V2 but still good and video is the same. In addition the networking should have some power injection method. I used a simple 4 port + uplink power injecting hub that can support 4 cameras. Suitable units are available on EBay for about £14. Single pass through power injectors can also be obtained for about £3. A 12V 2A PSU is a good central power source.

Step 2: Preparing the Pi Zero Module

The Pi Zero just needs a way of feeding the power in from the buck converter. This is fed directly in to the GPIO pins. +5V is on GPIO pin 2 and 0V is on GPI pin 6.

Solder wire into these pins. The 0V can go straight up. The +5V should be insulated and bent so that it lies along the board and bends up so that the buck converter outputs can be threaded through directly.

The camera cable can be fitted at this stage into the Pi Zero connector. Take care over this as the connector is quite fragile. Make sure it is 'opened' up before trying to insert the cable and push down while gently closing it after inserting the cable.

The standard cable can be removed from the camera and the new Zero cable inserted in its place.

Step 3: Preparing the Buck Converter

The buck converter should have 2 right angle pins soldered onto its input connections.

Before connecting to the Pi the converter must be adjusted so that it delivers 5V out. Temporarily connect a 12V power supply to its inputs, measure the output with a voltmeter and adjust the potentiometer so that the output is 5V. I normally adjust to 5.2V to make sure power is good even if the converter drops a bit under load.

After adjustment the converter may now be soldered onto the Pi Zero

Step 4: Preparing the LAN Converter

The LAN module is supplied with a short micro USB cable and a RJ-45 LAN connector in a plastic housing. For this project we split the plastic housing apart and discard. There is a small circuit board with a RJ-45 socket soldered at one end and the USN cable soldered at the other.

Remove the plastic housing of the RJ-45 socket revealing the 8 wires. Only 4 of these are required (1,2,3,6) for the 100Mb operation. The others should be clipped off. One can verify which ones by looking at the traces on the board as only 4 are connected. Bend and spread the remaining 4 at right angles fairly flush with the board. As these wires are fairly thin they may be a slightly loose fit onto jumper connectors. One can improve the fit by lightly tinning the wires with solder.

The micro USB cable plus plug will be too big to fit. I cut the cable about half way and remove the outer cable shroud to make it more flexible. I then solder the USB cables onto a micro USB plug and glue into a half cut down plastic shell. This the will only stick out a small way from the Pi Zero USB connector.

One 'feature of these LAN modules is that they do not have a unique MAC address. This is not a problem with one camera on the network, but would prevent puting more than one on. The MAC address can be spoofed however to get round this and this is dealt with in the software section.

Step 5: Preparing the Housing

The housing comes apart easily with screws revealing a slide in plastic tray with battery housing. The front is a dummy circular 'camera' module. The back will have a dummy cable stub going through a 'grommet which is a good fit for cat-5 cable.

Remove the plastic lens from the centre of the camera disc. I prefer to get rid of the false LED bubbles by sawing them off and sanding flat. This is not strictly necessary but makes it easier to mount the camera and also allows painting it black if required. The camera can then be mounted by marking and drilling 4 1.6mm holes and using 2.2mm self tappers. It is quite tricky to miss the existing holes so take a bit of care here. It doesn't matter too much if only 3 holes are used.

For the tray place the Pi Zero on and mark the 4 mounting holes. I drill through with a 1.6mm drill and then mount with 2.2mm self tappers. An alternative would just be to hot glue it onto the tray. The Pi Zero should be mounted with the GPIO side close to the edge of the tray and central along the tray. I also glue a couple of plastic spacers onto the tray on the USB connector. When the Pi Zero is screwed in it is then tilted up a bit so that the USB plug clears the tray.

The LAN module may be hot glued to the base of the tray with the 4 LAN connectors pointing to the back of the camera housing (away from camera module) and the USB plugged into the Pi Zero

The camera disc is screwed back on the front of the tray with cable going underneath the tray and looping up through the front. Note that the micro SD card may be difficult to insert or withdraw with the camera disc screwed in place so it may need to be temporarily unscrewed to do this.

Step 6: Cabling and Final Assembly

Feed a Cat 5 cable through the back of the camera housing and strip back about 12cm of the sheath.

The blue/blue-white form the +V connection, the brown/brown white form the 0V connection. The other 4 are the actual Ethernet data connection. These should be made shorter.

To make it easier to assemble and disassemble I put jumper socket connectors on these wires. One can either get raw connectors or I just retrieve them from existing jumper leads. It is also good to mark the polarity of the power connections to avoid mistakes.

The power leads may be plugged on and the data connections made. Orange/White(1), Orange(2), GreenWhite(3), Green(6). The tray can then be slid back into the housing while simultaneously withdrawing the Ethernet cable back..

Step 7: Software

I use a software build called RPi-Cam-Web-Interface. This is simple to install and gives a web interface with a live preview and a comprehensive set of motion detection, recording management and scheduling functions.

There is a wiki describing installation and usage. RPi Cam wiki There is also an active thread supporting this software on the official raspberry web site. RPI Cam forum

If more than one camera is used on the same network then it is necessary to spoof the MAC address. To do this edit the /etc/network/interfaces file

Add edit the following into the eth0 section

allow-hotplug eth0

iface eth0 inet dhcp

hwaddress ether 00:e0:4c:53:44:59

where the Mac address can be changed to make it unique locally.



    • Make it Move Contest

      Make it Move Contest
    • Planter Challenge

      Planter Challenge
    • Woodworking Contest

      Woodworking Contest

    We have a be nice policy.
    Please be positive and constructive.





    I’m making myself one, but I’ll go with the wireless edition. What is the mini buck converter for? Can’t I just power it from the usb port?

    6 replies

    If you are using usb power then you don't need the buck converter.

    The wired LAN version as described uses power over Ethernet. This uses a higher voltage supply (e.g. 12V) on the unused pairs in the cable and the buck converter is used to derive a 5V supply for the Pi. By using a higher voltage and a buck converter this way then the current in the ethernet cables is significantly reduced allowing much longer cable runs without voltage drop problems.

    Regardless if I have the Pi ZeroW, this is basically, to have it running as a PoE?
    so I need all mentioned in above to make this device PoE?
    Thanks for the reply :)

    If you want it POE but are going to use wifi rather than the wired connection for the network connection then you need the buck converter but don't need the LAN USB adapter. The buck converter would just be used to convert the higher voltage on the POE cable to 5V to run the Pi.

    If the cable has the network wiring in it rather than just power then I think it is nicer to have a wired connection as described rather than wifi.

    I have a ENC28J60 LAN module, could that be used for the "microUSB to lan" module? I cannot find that module online.

    I'm dumb. Disregard this question.
    Hoewever, could I use the ENC28J60 module?

    Sorry, couldn't find the pi zero at that price. For germany etc. the pricing starts at 8 to 10 Euros... PLUS shipping!

    That's VERY unpleasant. *sigh*

    Nice i'ble btw! ;)

    3 replies

    Here in UK the Zero (not ZeroW) has gone up to UKP4.80. Shipping in UK does add but is not so bad if one is buying other stuff as well. One can significantly lower the cost of the camera by getting the V1 type camera off eBay with Zero cable included. The V1 doesn't have the same still image resolution as the V2 but video is same and still resolution is still good.

    Sounds good to me!

    btw its actually the PiZeroW that costs that much, my bad! :(

    I wonder if I could buy the PiZero (and other Pi-stuff, so the shipping costs pay off) in the UK, so it would be cheaper even with shipping? :D

    One can use the ZeroW instead if one wants to do it wirelessly and then you don't need the USB ethernet adapter. Personally I prefer to use a wired connection as one has to get power there anyway and using the power over ethernet gives a 1 cable neat solution.

    There are two main suppliers in UK (Pimoroni and PiHut). Both offer Europe shipping at reasonable cost and fast delivery. FOr example Pimoroni to Germany UKP 4 and it is by weight so you can get multiple items for 1 fee.

    There's probably more to do than using a PiZero as a webcam to IP adapter: an ESP8266 would do that better over WiFi.

    How about OpenCV on the PiZero to pre-process the pictures with shape and face recognition, movement tracking, and other fun stuff that really puts the Pi at use?

    2 replies

    Yes. I am using esp8266 in quite a lot of other stuff. The PiZeroW of course now offers a wifi based solution with just power to the camera. This can be done with very little change to the project other than removing the wired adapter.

    However, my preference is to still to use wired connections for my cameras to keep all that traffic off my air-waves. Particularly if one is off-loading stored data onto other storage devices.

    Hi. I have recently reviewed the ESP8266 as webcam over wifi, but it seem to be that the available speed to get image data with the serial GPIO's, useful enough for live video is not enough. Maybe using low resolution, you can get a rapidly changing set of still images, but nothing more. I wish i am wrong. If you know better, let me know.

    Be well.

    Oh! I see!

    It's a Pi-0 security camera.

    I thought it was maybe a completely insecure camera. Like it's always worried about its resolution not being high enough, or that it can't pan and tilt like all the other cameras it knows.

    Or... Maybe it's a camera with no interest in your security. Instead of object tracking and face detection, it's an object avoiding camera that offers zero security.

    "Hello, thief! FYI I'm a camera, but don't worry! I'm a zero security camera! I'll just look away and try not to bother you... Have a good day, and I hope you end up with a bountiful haul!" -Camera

    Joking aside, excellent work!

    A well-conceived and presented Instructable for a device that is affordable and genuinely useful. Thank you!

    Wonderful idea! What a great way to trick would be thieves into thinking they aren't being recording when they are.