Final project

Initial idea

My initial idea is to create a small home security system consisting of multiple cameras, processing hub and possibly other features. The cameras would be small sensors with high IR sensitivity connected to a wi-fi module. The module would send the data to a hub - probably Raspberry Pi, where a server would be running. The server would process the image, possibly running an object detection task using an accelerator such as Coral USB. Based on detected objects/people and time of the day, the system could warn the owner and send a message or similar.

The individual electronics part would be housed in a 3D printed case, the cameras could also be mounted on a moveable platform and the motor would be remotely controlled. To achieve sufficient lighting specially at night, IR LED lights would be used.

No image

Final project

The final form of the project changed a bit, even though I stuck to the intial idea. My final project is a rotatable security camera with web interface, and ability to detect objects and save images of chosen classes. The final project consists of three main components: physical case, hardware and software. I will present each part individually.

🧩 Case

I chose 3D printing to make the housing for the camera and all harware components. My goals were to create well designed case which will offer smooth rotation of the camera, holes for connectors, mountable options, and easy access to all electronic components. I built on the mechanism I created in Week 5 and learned from it. Specially, I made the tolerances around 0.5 mm to allow smooth motion. I used Fusion 360 for modelling and spent some time thinking the design through. The final 3D model can be seen down below.

For 3D printing itself, I chose blue PET-G for the body and top cover. I printed it on Prusa 3D printer MK3S with 0.6 mm nozzle, 0.3 mm layer thickness and 20% infill. For the bottom lid and camera holder I chose black PLA to make the model more visiually appealing. I printed those parts on Prusa MK3.5 with 0.5 mm nozzle, 0.2 mm layer thickness and 20% infill. I used Prusa Slicer for slicing and utilized supports.

Image 1
Image 2
Image 2
Image 2

📟 Hardware
Now, it is the time to connect everything. This is the list of componets: I had to solder some wires and used wago clips for delivering 12 V to the motor, IR leds and buck converter. I followed the sceme down below.

No image

The completed wiring can be seen down below.

Image 1
Image 2

However, I found one problem, it is difficult to take out the IR filter, I broke one camera doing so. Also, if I remove the filter, camera image in day light might be pretty bad. So, for now, I do not use the IR led.

Image 1
Image 2

🖥️ Software
The ESP32 serves as server and can be controlled via API calls - settings for camera and rotation. The main server runs on my PC and utitilizes Docker for future possibilities to run in different environments. The backend is FastAPI and frontend React. I am running it on my PC for now, because of the real-time object detection with YOLOv8. The code is accessible via GitLab repository.

There are two pages working now, Settings and Security. In Settings, the user can view camera stream, take still images, rotate camera, turn on/off lamp, choose different resolution and effects, or flip the image vertically and horizontally. In Security, it is possible to start/stop stream and allow object detection. If object detection is allowed, the user can choose classes and if the algorithm detects them, the image will be saved.

✅ Final piece

This is the final piece and image captured using the camera.

Image 1
Image 2
No image

▶️ Demo
Short demo video to show basic functionality.

🧠 Final thoughts
I wanted to try to make home security system, but realized it will be much cheaper and easier to buy one XD, even though I like the possibilities to extend my project and new functions - particulary for tracking. I would like to track our cat path in our garden and create "heatmap" of the favourite locations.