Embedded C++ · ESP32 · Commercial Prototype

Contract for Muxtronics, sole firmware engineerJan to May 2025deployed prototype

A watchman that decides in-frame

Deterministic C++ firmware for an ESP32-CAM intrusion detector, built under contract for Muxtronics in 2025: the camera sees motion and decides on-device, with alerts carried by the client's proprietary LoRa mesh.

16×12
decision grid distilled from 800×600 grayscale frames
0
ML dependencies: no OpenCV, no TensorFlow Lite, fully deterministic
CI
compiles the firmware for the AI-Thinker board on every push

Run the firmware

The detection pipeline, running here. It starts on a synthetic room so the page works without a camera; press the first button to feed it your own camera instead, and the frames are processed in this tab and never leave it. Hold still, then move: the grid is the 16×12 block means the device actually reasons over, the outlined cells are the ones that changed by more than the threshold, and the decision is the same line of code that raises the alert on the ESP32.

It opens on a synthetic room. A figure crosses it, the cells it crosses change by more than 40 per cent against the previous frame, and the decision goes to Motion; when the figure stops, Still. Press the first button and it does the same on your own camera.

The constraint

No OpenCV, no TensorFlow Lite, no megabytes to spare. An ESP32-CAM has a camera, a modest processor, and very little memory, and the product had to run on exactly that, outdoors, for hours. The answer is a fully deterministic pipeline: the same frames always produce the same decision, which is what makes the firmware testable.

How it works

Detection pipeline: deterministic C++, no OpenCV, no ML runtime ESP32-CAM OV2640 sensor 800 × 600 frames Block downsample 800 × 600 → 16 × 12 mean-luma blocks Motion decision temporal difference adaptive threshold LoRa mesh alert carries alerts off the device firmware confidential Deterministic block-difference detection - no ML, no external vision libraries Commercial prototype, Muxtronics 2025
800×600 frames collapse into 16×12 mean-luminance blocks; a frame-to-frame relative difference against a tuned threshold makes the call. The proprietary mesh firmware remains confidential to Muxtronics; the detection firmware is public, and the device reports only what it measures at runtime: frames, detections, loop rate, free heap.

A note on measurements. Earlier versions of this page quoted field-trial accuracy figures that the repository could not substantiate, and they have been retracted. The repository documents the retraction. What stands behind the project instead: the public firmware, a live demo video, and the reference from the Muxtronics CEO on the home page. If field numbers are published in the future, they will come with the raw logs and the ground-truth method that produced them.