Clem builds a fully self-contained, privacy-first security camera around the PocketBeagle 2, combining a custom PCB, USB hub design, battery backup, and edge AI person detection to create a system that only records when it matters. Along the way, he overcomes real-world challenges, from unstable networking caused by voltage drop to last-minute hardware changes, resulting in a robust, workshop-ready solution that keeps every frame entirely local
Watch the Build
When it comes to security cameras, most off-the-shelf solutions expect users to place blind trust in cloud services and proprietary systems. For Clem, that simply wasn’t acceptable. As he bluntly puts it,
“you cannot trust anybody's claim that they will not abuse your data… you have to control it.”
Instead of relying on a commercial solution, he set out to build a completely local, self-controlled camera system using a PocketBeagle 2, custom hardware, and fully open software.
The result is a tightly integrated build that brings together embedded Linux, machine vision, power resilience, and mechanical ingenuity into a compact device designed specifically for workshop surveillance, without ever handing data to a third party.
Designing the Hardware
At the centre of the build is the PocketBeagle 2, chosen not for simplicity but for control and flexibility. Although not as beginner-friendly as some alternatives, Clem deliberately leans into its strengths, noting its fast boot time and suitability for edge applications.
To give the device a familiar form factor, parts from a dummy security camera were repurposed,including the glass front and swivel mount. However, the final enclosure is far more robust. A watertight aluminium housing from Hammond Manufacturing provides environmental protection, while internal slots allow direct PCB mounting.
Mechanical design plays a key role throughout. Custom ASA 3D printed parts ensure precise positioning of the USB camera module, with the material selected for its durability and thermal stability. Clem highlights the importance of temperature resilience, explaining that internal heat from the embedded computer required a material that wouldn’t deform over time.
The project demonstrates careful planning at the mechanical-electrical boundary. By using manufacturer CAD data, Clem designed the PCB before receiving the enclosure, achieving a precise fit with just 0.2 mm of tolerance,evidence of how reliable modern design workflows can be when properly executed.

Custom PCB and USB Integration
The custom PCB serves as the backbone of the system, integrating power distribution, USB connectivity, and expansion. A Microchip USB2514 hub controller enables multiple USB devices to operate simultaneously, crucial for combining the camera, storage, and networking interfaces.
This aspect proved to be one of the most challenging. Clem admits,
“I’ve been a bit of a burnt child with USB hub designs… it was down to the crystal and its load capacitors.”
Initially intending to simplify the design with an oscillator, he encountered a compatibility issue late in the process. The device he selected produced a voltage level unsuitable for the hub controller, risking damage to the chip.
A last-minute redesign reverted the system to a traditional crystal oscillator network. Even then, compromises had to be made:
MODEL_PROTOTXT = "dnn_model/deploy.prototxt"
MODEL_WEIGHTS = "dnn_model/mobilenet_iter_73000.caffemodel"
PERSON_CLASS_ID = 15
NO_PERSON_TIMEOUT = 3.0
MAX_RECORDING_AGE = 72 * 3600
Although this configuration snippet relates to the software stack, it reflects the same engineering philosophy, working within constraints while maintaining system-level reliability. On the hardware side, Clem worked with slightly mismatched capacitor values, relying on trace capacitance to balance the circuit.
“The only way to find out is to just try it.”
Power, Networking, and Real-World Pitfalls
Networking and power delivery introduced unexpected complexity. Instead of integrating networking directly into the camera housing, Clem routes connectivity through an external junction box. This isolates access points and ensures that tampering with the camera itself doesn’t expose the network interface.
The system uses a Traco Power 5 V supply, paired with carefully tuned voltage output. What initially appeared to be a networking issue turned out to be something far subtler:
“Under full load my device will draw enough power to make the voltage drop… just enough to make the PocketBeagle stall.”
A minor voltage adjustment, from borderline levels to a stable ~5.0 V, resolved persistent connection failures. This kind of issue is often overlooked but demonstrates how sensitive embedded systems can be to power integrity.
Battery backup is integrated via an 18650 holder, leveraging the PocketBeagle 2’s onboard power management. This ensures uninterrupted operation even if external power is lost—particularly important for a security system that must remain active during outages.

Thermal Management in a Sealed Design
With all components enclosed in a watertight aluminium housing, heat dissipation becomes critical. Clem addresses this with a small heatsink mounted directly to the processor, coupled to the enclosure using thermal compound.
This effectively turns the entire chassis into a passive heat spreader. As a secondary benefit, the system self-heats in colder environments, reducing the risk of condensation or frost:
“It produces warmth itself… in the winter… it will also keep itself free of any frost.”
AI-Powered Detection at the Edge
Rather than recording continuously, the system uses on-device computer vision to detect human presence. Two detection methods are implemented: HOG (Histogram of Oriented Gradients) and a lightweight DNN running locally on the PocketBeagle 2.
As Clem explains:
“HOG… barely works… But DNN… does all the inference locally on its own hardware.”
The software stack is intentionally minimal, built around Python, OpenCV, and a simple web server. The streaming and recording logic is handled through a Flask-based application:
@app.route("/video_feed")
@requires_auth
def video_feed():
return Response(
generate_frames(),
mimetype="multipart/x-mixed-replace; boundary=frame"
)
Basic authentication is built in:
USERNAME = "admin"
PASSWORD = "password123"
While simple, this reinforces the project’s emphasis on local control. Users are expected to adapt and harden the system to suit their own environments.
Recording is triggered only when a person is detected, with a short delay before stopping:
“If a person gets in view… it starts recording… and if that person left… for more than three seconds it will stop it.”
This behaviour dramatically reduces storage requirements and makes reviewing footage far more efficient.

Local Storage with Automatic Management
All video is stored locally on the device, with automatic cleanup ensuring storage remains under control. After 72 hours, recordings are deleted:
CLEANUP_INTERVAL = 24 * 3600
MAX_RECORDING_AGE = 72 * 3600
A background thread handles this maintenance, quietly removing outdated files without user intervention. Additional USB ports integrated into the PCB allow storage expansion, providing flexibility for longer retention if required.


A Purpose-Built, Fully Controlled System
Clem’s security camera is not just a technical exercise, it’s about ownership and trust. By combining open hardware, custom electronics, and local AI processing, he avoids the privacy pitfalls of commercial surveillance systems entirely.
The finished device records only when necessary, stores data locally, survives power interruptions, and operates independently of any cloud service. Or, in Clem’s own words:
“Never trust the device you haven't built from scratch.”
For engineers, makers, and embedded developers, the project offers a compelling blueprint for building secure, autonomous systems that prioritise control without sacrificing capability.
Supporting Links and Files
- Episode 723 Resources - Building a Privacy-First Workshop Security Camera with PocketBeagle 2
Bill of Materials / Parts Used
| Product Name | Manufacturer | Quantity | Buy Kit |
|---|---|---|---|
| PocketBeagle 2 Board, AM6232ASCGHAALWR, ARM Cortex-A53, Sitara - AM62x, Instruction Card | BeAGLEBOARD | 1 | Buy Now |
| Flash Memory Card, MicroSDHC Card, 16 GB, Class 10, UHS-I U1, A1 | integral | 1 | Buy Now |
| AC/DC DIN Rail Power Supply (PSU), ITE, 1 Output, 12 W, 5 VDC, 2.4 A | Traco power | 1 | Buy Now |
| USB Interface, USB Hub Controller, USB 2.0, 3 V, 3.6 V, QFN, 36 Pins | microchip | 1 | Buy Now |
| ETHERNET ADAPTER, USB3.0 GIGABIT WHI | Pro-signal | 1 | Buy Now |
| BATT HOLDER, 18650 X 1, TH | keystone | 1 | Buy Now |
| TVS Diode, WE-TVS, Unidirectional, 5 V, 6.8 V, SOT-23, 6 Pins | würth | 3 | Buy Now |
| Raspberry Pi Module, Raspberry Pi and Jetson Nano Mainboard, Imx291, Sony, Night Camera | DFROBOT | 1 | Buy Now |
| Metal Enclosure, Watertight, Extruded, EMI / RFI, Anodised, IP54, Small, Extruded Aluminium, 120 mm | Hammond Mfg | 1 | Buy Now |
| Product Name | |||
| Oscillator, 24 MHz, 50 ppm, Through Hole, 13.2mm x 13.2mm, HCMOS, 5 V, QX8 Series | |||
| 24Mhz crystal needed → salvaged from other project. | |||
| bunch of passives | |||


