This week I’ve continued to work on my upgraded Raspberry Pi PoE CCTV system. Those of you that follow my blog may have already read part 1 of this series but if not you can head back there now to see how the project started.
The project isn’t complete yet but it’s making good progress. I’ve managed to sort out the software side of things over the last few days, as well as kicking off work on the custom PCB that will hold my PiNoIR camera module.
Let’s show you my progress…
Camera Module Setup
Now that we have a Pi capable of being powered via Ethernet, it was time to get the camera module fitted.
I’m using standard official camera module for now but will eventually replace it with a PiNoIR version later on. As the PoE switch is a HAT (complying to HAT standards), it has a little cut-out for the camera cable – handy.
I’m using a short thick cable from one of my ProtoCam+ kits for now, but I’ll need to buy a much longer version for the final installation into the CCTV housing.
With the camera fitted it was time to take a look at software…
Software – MotionEyeOS
In a nutshell it turns your Raspberry Pi into a feature-rich IP camera, which can be viewed on your phone/tablet/PC connected to your home network (and even outside of your home if you set up a DDNS like No-IP).
It’s also very easy to set up – let me show you how…
Download the Image
MotionEyeOS is available on GitHub (you know, that really confusing website that only hardcore geeks seem to understand).
It’s very straight forward, with their main installation page giving you an overview of the process:
Following these instructions I simply downloaded the latest image for my B+ from the downloads section:
Extract the Image
This part can catch you out if you haven’t done this kind of thing before, so let’s go through it.
The downloaded image file will have ‘.gz’ at the end of it. Now maybe it’s just me, but as a Windows user I’m more familiar with ‘.zip’ when looking at compressed files.
These files are just a compressed archive like any other (I don’t know what the difference is between gz and zip), however I find that Windows won’t help me open these without installing a program first.
I use 7-Zip File Manager. It’s free, simple, handles .gz files and ‘just works’. Once you’ve installed 7-Zip, right click the downloaded image and extract it:
Once you’ve extracted the image, your file should be available in the same folder:
Write MotionEyeOS an SD Card
With the image extracted it’s ready to be written to an SD card. It’s a small image so I’m just using a 4Gb SD card here. You might want to consider a larger card if you fancy saving camera recordings and images etc.
With the SD card ready and everything set up it was time to check the output.
Remember I mentioned how MotionEyeOS turns your Pi into an IP camera? Well this is true in the viewing of the feed as well – we can view the output stream from a PC, app, smart TV or even display the stream on another Raspberry Pi.
For this initial testing I’m using the excellent MotionEyeOS browser interface. It’s shockingly good, with all the configuration settings, buttons and sliders you’ll ever need. After firing up the Pi I used my handy Android Fing app to find the Pi’s IP address on my network, then tapped this into my browser address bar.
The default user name is ‘admin’ and password is blank. I used the interface to log in and change the password, then checked out the camera. Everything was working as expected showing me a decent stream, however I decided to explore the tasty looking menu of settings I could play with.
Fast Network Camera
Within these settings is a new feature that wasn’t available last time I used this software, something called ‘Fast Network Camera’. It is simply perfect for this project!
I think this was introduced after the Raspberry Pi 2 came out, and makes use of the meatier hardware the newer Pi offered. It turns the camera from a jittery/laggy view to an almost real time stream. Using this option removes motion detection, media files and all the other advanced elements – but its worth it!
Check out the test video I posted to my Instagram account:
With that test complete, the camera/software side of things was sorted.
You may remember I planned to make a custom PCB to replace the dummy CCTV casing’s LED board. I kicked this off this week.
Once again I’m using RS Designspark PCB to design my board – it’s free, reasonably easy to learn and…did I mention it was free?! I wrote a basic tutorial a while back if you want to give it a try yourself.
So far I’ve designed the board outline. It includes mounting holes to attach it to the casing, and cut outs to hold the camera module. I borrowed the camera module cut out lines from my ProtoCam PCB design file.
To finish this I need to add pads and traces to allow me to add a number of IR LEDs. This part is the challenge for me – I have no idea which type of IR LEDs to use or how many the Pi’s 5V line can handle without getting stroppy.
I’ll be buying some different IR LEDs and running some tests at night once I get my hands on a NoIR camera module. Watch this space…and please comment if you have any advice. We need it nice and clear at night to ensure a sufficient jail sentence for the bad guys!
Summary & Part 3
In the first part of this series I got the PoE HAT working and found a suitable casing for the project.
In this part I got the MotionEyeOS software working perfectly and made some progress with the PCB design outline.
In the next part I need to do some IR LED testing. I need to find the right type and number of IR LEDs for this project, which will also let me complete my PCB design and order a prototype. I also need to start thinking about modifying the rest of my CCTV casing.
Lots more work to do yet!
Until next time…