1 year ago

Raspberry Pi night vision camera hack

Have a spare Raspberry Pi Model B lying about? Turn it into a night-vision CCTV camera with this simple case hack…

Many people have a number of Raspberry Pis at home. Some might say those folks are obsessed, but Pis are so versatile that trying out new projects where possible is great fun! Putting them to good use is always exciting, so why not turn a spare Model B into a night-vision CCTV camera, using an inexpensive case, the Camera Module, and a nifty little accessory called the Lisiparoi to provide infrared lighting? If you saw the previous guide on adding push notifications to MotionEyeOS (issue 43), then combining this with night vision would be a great addition!

The full article can be found in The MagPi 46 and was written by Wesley Archer

You’ll need

Lisiparoi LED light ring (infrared version)
Cyntech Raspberry Pi case
Raspberry Pi NoIR Camera Module
USB WiFi adapter
Drill and small drill bit (1mm or 2mm ideal sizes)
Small file (we used a metal nail file)
Pencil and a sharp knife (craft or Stanley knife)

STEP-01 Mark where you will cut

Before cutting into the case, it makes things easier to mark it out first. Grab your pencil, place your Camera Module and Lisiparoi on the case, and then draw around them. You should be able to see the pencil line, and it’s easy to remove if you need to. Make sure you allow enough room around the outside so that it’s not too close to the edge of the case, though! You’ll also need to cut out space for the pins on the Lisiparoi, holes to mount the Camera Module board, and a hole for the camera lens itself.

STEP-02 Drill the mounting holes

Using a small drill bit (1mm / 2mm is ideal), drill two small holes in the case. If you are very careful, you can use the Lisiparoi as a template. You should now have two small holes in the case and a pencilled outline of the Lisiparoi. It’s now time to drill holes for the header pins, which are a few millimetres away from the bottom edge of the Lisiparoi. It’s best to start small and increase the size of the holes as you go; it doesn’t have to be exact, as the Lisiparoi will hide everything once in place.

STEP-03 Drill, file, test, and repeat

Whilst doing this, remember – you can always cut more off! To make sure our header pins on the Lisiparoi fit nicely, we drilled the holes to the approximate width of the header and then used a small file to square off the holes. We then placed the Lisiparoi in place to see if it fit; if it didn’t, a little more was filed off until it did. It doesn’t have to be surgically accurate, since the Lisiparoi sits on top of the holes; even so, take your time, as you can’t undo a hole if it’s too big!

Raspberry Pi NoIR Camera Module
It’s now time to mark and cut a hole for the Camera Module. Again, we drew around the module with a pencil and then drilled small holes along the inside edge of the outline (otherwise the hole will be too big). Next, very carefully use a sharp knife to cut out the hole; the drilled holes along the outline should help with this step. Make sure this is done on a tough, steady surface (we used an old chopping board). Fine-tune the fit by filing the hole and testing that the Camera Module fits. Repeat until it does.

STEP-05 Put everything together

Now that the holes are all cut and fit nicely, it’s time to put everything together. Make sure you’ve soldered the header onto your Lisiparoi first, though! The header needs to be soldered so the pins are on the inside of the case and pointing downwards, so that the jumper cables can be fitted to the Pi’s GPIO once fully assembled. Screw your nuts and bolts together and connect up your cables, including the ribbon cable for the Camera Module. For more information on using the Lisiparoi, including wiring diagrams, check out the official site.

STEP-06 Install MotionEyeOS and test everything

If you have connected the Lisiparoi so that it turns on whenever the Pi does, then you just need a CCTV operating system. MotionEyeOS is perfect for this, because it’s simple to use and works very well! Download the relevant image, then write it to your SD card. You won’t be able to see if the infrared LEDs are on, but test it out in the dark and you should see more than you would normally without them! As the LEDs are small, they’re not very powerful, but should provide enough illumination to see better in the dark!