Raspberry Pi High Quality security camera

DJ from the element14 community shows you how to build a red-lensed security camera in the style of Portal 2 using the Raspberry Pi High Quality Camera.

The finished camera mounted on the wall

Portal 2 is a puzzle platform game developed by Valve — a “puzzle game masquerading as a first-person shooter”, according to Forbes.

DJ playing with the Raspberry Pi High Quality Camera

Kit list

No code needed!

DJ was pleased to learn that you don’t need to write any code to make your own security camera, you can just use a package called motionEyeOS. All you have to do is download the motionEyeOS image, pop the flashed SD card into your Raspberry Pi, and you’re pretty much good to go.

Dj got everything set up on a 5″ screen attached to the Raspberry Pi

You’ll find that the default resolution is 640×480, so it will show up as a tiny window on your monitor of choice, but that can be amended.


While this build is very simple electronically, the 20-part 3D-printed shell is beautiful. A Raspberry Pi is positioned on a purpose-built platform in the middle of the shell, connected to the Raspberry Pi High Quality Camera, which sits at the front of that shell, peeking out.

All the 3D printed parts ready to assemble

The 5V power supply is routed through the main shell into the base, which mounts the build to the wall. In order to keep the Raspberry Pi cool, DJ made some vent holes in the lens of the shell. The red LED is routed out of the side and sits on the outside body of the shell.


Raspberry Pi 4 (centre) and Raspberry Pi High Quality Camera (right) sat inside the 3D printed shell

This build is also screwless: the halves of the shell have what look like screw holes along the edges, but they are actually 3mm neodymium magnets, so assembly and repair is super easy as everything just pops on and off.

The final picture (that’s DJ!)

You can find all the files you need to recreate this build, or you can ask DJ a question, at element14.com/presents.


solar3000 avatar

I ran some kind of security camera package a few years ago. I forgot what though. I did it on a rpi0w. It kept failing.
I’ll give motioneye a try. hopefully I can find one that sits on top of rasp. OS instead of it’s own OS.

JBeale avatar

I’ve had good success with PiKrellCam for some years now. It is a package you can install within the normal Pi OS. The developer has kept updating it over the years. I know it will run on a Pi Zero W. https://billw2.github.io/pikrellcam/pikrellcam.html

Adrian avatar

I agree with pikrellcam. Motioneyeos frame rate was way too slow last time I tried it on a pi0w. Pikrellcam was loads faster.

solar3000 avatar

Two votes for pikrel? I’ll give it a try too.

Kevin avatar

MotionEye is the application that can be installed on any other Linux OS. MotionEyeOS is for a number of SBCs like the RPi.
Check out motionEye at:

Atarito Takahashi avatar

More big isn’t possible?

Marc avatar

Si quiero enviar el video por streaming hacia un servidor externo para almacenar el video? Que enlace me puedes proponer? Gracias

Merv avatar

I had positive results with a Pi zero W using raspian lite and installing Motion eye separately. Was using it as a wildlife camera so similar application. Had the device running PiHole at the same time with no performance issues.

Richard S avatar

I too would agree that MotionEyeOS on a Pi Zero isn’t a good experience especially when you turn on various things like Motion Detection, saving these clips, trying to play them back etc.

I run v4l2rtspserver which just streams video to a Synology NAS (from a Pi Zero) that has a basic surveillance system and let that do the grunt work of motion detection. It works fairly well.

Phillip Morris avatar

Is there anyone that can produce these enclosures for camera and Pi in UK ? I do not have a 3D Printer.
I would like two ;-)

Sooba avatar

Vraiment un très bon tutoriel, je viens de commencer a développer des choses avec les raspberry, et ce projet m’intéresse fortement.

Comments are closed