In this new tutorial, we will together make our Raspberry Pi open source video surveillance camera.
Yes, we are talking here about a real open source outdoor surveillance camera, capable of night vision and motion detection, all connected to our Jeedom domotic solution.
Now let's have fun. ^^
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Equipments
In order to launch this project, we will need:
- Raspberry Pi 3B + (important)
- 32 GB SD card
- Cooling kit
- USB IR camera or raspicam
- PVC pipe diam. 63 mm, length 20 cm
- Sleeve and trapdoor diam. 63 mm
- Poe injector (12/24/48V DC power source)
- DC/DC converter
- Camera mounting arm
- Waterproof PG13 mouthpiece
- Anti-humidity bags
- Spay paint
- PVC glue
Total cost around 100€, maybe less if you have already some parts at home. Of course, the Raspberry PI and USB camera are the most expensive things in the list.
Step 2: Raspberry Pi Preparation
Let's start things serious, for this, we start by installing our cooling kit on our Raspberry PI with a little thermal paste.
Then on the SD card, install MotionEyeOs, this is an open source distribution specifically designed to turn our Raspberry Pi into a connected camera. For more information, visit the GitHub project. Alternatively, there is also shinobi which is also very good work.
We use as usual Etcher who will take care of everything for us. These operations will take about 30 minutes.
Step 3: Raspberry Pi Continu
Then plug his camera, I opted for a pro model very close to what is found in commercial cameras.
This is a 1080p 30 fps camera with automatic night vision system all on a single USB cable. You can find this on chinese resealer between 25€ to 55€
One thing is on with this little gem, quality and performance are the rendezvous even in the darkest night.
Step 4: Raspberry Pi Alimentation
To power our camera, we will use the POE (Power Over Ethernet), it allows to use two pairs of RJ45 cable to pass through a supply voltage. So we avoid two cables instead of one. And later you understand that this saves us a lot of space in the assembly phase.
In order to achieve this, it is imperative to use a Raspberry Pi 3B +, the only model equipped on the 4 GPIO pads allowing us to easily recover the power supply of the RJ45 cable. The 4-pin jack is located under the GPIO, at its right end behind the USB ports.
The voltage supplied by the POE is between 5V and 48V. It depends on your power supply or your switch if it is designed with POE. In order to take into account this disparity, I will use a DC / DC converter to transform the POE voltage into a 5V voltage that will be reinjected by the GPIOs.
Here, the converter is based on LM2596 which are step-down converters. And especially the model LM2596HVS (High Voltage) which is able to support up to 57V input. The card is equipped with a potentiometer to precisely adjust the output voltage.
I used this module with an output voltage set to 5V. When the adjustment is finished, remember to fix the screw of the potentiometer with a drop of nail polish. All that remains is to secure the assembly in a heat-shrinkable sheath. On the other side, there is a POE injector here that will inject 48V in the network cable.
Step 5: The Case
For the case, I am part of a PVC pipe that is found in DIY stores with a diameter of 63 mm which corresponds to very few things close to the width of the Raspberry Pi, coupling and a waterproof inspection hatch/trapdoor.
We begin by cutting the plexiglass to obtain a disc diameter of 63 mm that we will slip into the sleeve. The separator inside the sleeve will serve as a support to glue the assembly.
For the pipe, I cut a section of 20 cm. At one end, I created a notch to pass the jack connector of the Raspberry Pi (picture 2). And for the hatch of visit, I do the same thing in order to be able to withdraw and put back the Raspberry Pi in its lodging once this one sticks.
Step 6: More Case
The hardest is for the case, the suite is more aesthetic than functional. I then reduced the size of the front sleeve so that it does not appear in the field of view of the camera. With a piece of pipe cut in half, I set up a kind of cap to protect the camera's field of vision from dust and water.
Inside, there is a piece of spring-shaped pipe that allows me to cleanly clamp the USB camera to the bottom of the case so that it does not move. The set will be painted black to make it more discreet and give a professional look.
Step 7: More Details
All that remains is to add bags of anti-humidity granules, a mounting arm, a waterproof PG13 mouthpiece to pass the network cable and to paint the whole in black.
Step 8: MotionEyeOs Configuration
As I said above, with MotionEyeOs we have the ability to do motion detection. It is thanks to the Motion software, it will compare the successive images and determine the number of different pixels and depending on the threshold triggered motion detection.
The configuration is relatively simple to take in hand. We start with the system configurations, then we add its camera, here a USB camera. The following settings are at your convenience.
For my part, I activated motion detection. This one will trigger several things. First, sending an event to Jeddom via the API. Then he will record the entire sequence and send it to my NAS.
Step 9: Jeedom Configuration
The simplest part, here, we will simply retrieve the RSTP streaming stream to make it appear on the dashboard. It will also be an opportunity to retrieve the motion detection information for example to trigger a sending a Telegram or MMS with a photo.
Step 10: Conclusion
We are here with our IP Surveillance Night Vision and Motion Detection Camera, all open source based on our beloved Raspberry Pi.
Now have fun, and if you like my instructables please vote for me in the contest, thanks.
First Prize in the
Safe and Secure Challenge