Build an AI Print-Failure Watchdog with the Arduino UNO Q (Part 1)
Part 1: Idea, Case and Camera Mount (this article)
Part 2: Camera Setup and Training Images
Part 3: Training the Anomaly Model with Edge Impulse
Part 4: Building the Watchdog App with App Lab
Part 5: Optimisation and Finalisation
If you have ever let a long print run overnight, you know that uneasy feeling: if the part pops off the bed in hour three, the printer happily keeps printing — into thin air. The result is a tangle of filament strands the community lovingly calls “spaghetti”, in the worst case with your hotend encased in plastic. That is exactly what this series takes on, and I mean it as an experiment: I am building an AI watchdog that watches the print through a camera, detects failed prints and raises an alarm — running entirely locally on a board that costs less than 100 euros, with no cloud subscription and without a single image ever leaving your workshop.
And experiment is the right word: whether this will work reliably in the end is something I honestly don’t know as I write these lines. The real question behind the project is what modern edge AI can actually deliver — is a thumbnail-sized chip right next to the printer enough for a job that commercial services run in their cloud? My test vehicle is the Arduino UNO Q, which I have already reviewed in detail; the project doubles as my entry for Arduino’s App Lab contest. You are reading the unfiltered build log including every failure — and whether the watchdog survives daily use is decided by the verdict at the end of the series, not by marketing at the beginning. Part 1 covers the idea, the hardware and the 3D-printed camera mount; after that come camera setup and first captures, AI training, the finished watchdog app with Home Assistant integration, and finally the honest verdict.
The plan: anomaly detection instead of a failure database
The obvious approach for a watchdog like this would be classic image classification: train a model on thousands of photos of failed prints until it can tell “spaghetti” from “all good”. And that is exactly the problem — where are those thousands of failure photos supposed to come from? Deliberately crashing dozens of prints? Not on a borrowed printer.
So we take the opposite route: anomaly detection. The model learns exclusively what a normal print looks like — and speaks up as soon as something appears in the image it has never seen before. The beauty of it: the training images collect themselves. Every successful print delivers hundreds of “good” images as a side effect, with zero extra work. Concretely we use FOMO-AD, the visual anomaly model from Edge Impulse, which is included in the free developer plan and runs on the UNO Q at roughly 40 milliseconds per frame — plenty fast for real time. The details follow in part 3 of the series.
The overall setup looks like this: a small camera watches the print bed, the UNO Q evaluates the images locally, asks the printer via the Moonraker API whether it is actually printing, and reports alarms to Home Assistant over MQTT — which then sends the push notification to your phone. How to get your printer onto the network with Klipper and Moonraker is covered in this article.
The hardware: a short shopping list
The centerpiece is the Arduino UNO Q — interesting for this project because it combines two worlds on one board: a Debian Linux on the Qualcomm processor for the AI, and a classic microcontroller for real-time jobs like the LED matrix, which will later serve as a status display right at the printer. On top of it sits the UNO Media Carrier, an add-on board that gives the UNO Q two camera connectors (CSI), among other things.
For the camera I decided against the official Raspberry Pi Camera Module 2 and went for an Arducam clone with the same IMX219 sensor — half the price, identical board dimensions (so it fits the same mount), and the required 15-to-22-pin flex cable comes in the box. The fact that it is the NoIR variant without an infrared filter doesn’t bother the anomaly detection — natural colors are not the point here. Good to know: the Media Carrier only supports cameras with the IMX219 sensor, the newer Camera Module 3 does not work. And a reality check from the trenches: clone listings come and go — my exact Arducam model (around 17 euros) was already sold out again while I was writing this article. If in doubt, check the Amazon search for “Arducam IMX219 NoIR”* for fresh stock, or go for a module that is explicitly sold as an IMX219, such as the Waveshare IMX219* (also linked in the table). What matters is the IMX219 sensor. For the camera to fit the printed case from the repository, the board also needs the dimensions and hole pattern of the Pi Camera v2. For the Waveshare module, the maker lists 25 × 24 mm and four screw holes, the same outer size as the v2, but no hole spacing. Also look for a version with an IR filter, not a NoIR one; part 5 explains why. Waveshare doesn’t say whether its module has one. The official Pi Camera v2 is no longer a safe bet: according to Raspberry Pi, units made from November 2026 use the IMX355 sensor, while the Media Carrier only supports the IMX219.
| Component | Purpose | Approx. price |
|---|---|---|
| Arduino UNO Q, 4 GB bundle with USB-C power supply | AI inference (Linux) + LED matrix (MCU) | approx. 88 €* |
| UNO Media Carrier (ASX00083) | CSI camera connectors for the UNO Q | approx. 19 €* |
| IMX219 camera, e.g. Waveshare IMX219 | View of the print bed | 17–30 €* |
| USB-C cable, at least 1.5 m | from the power supply to the board at the printer | approx. 5 €* |
| PLA filament, 2× M5 screw + nut | Case and mount | < 5 € |
By the way: a USB webcam does the job just as well — for example the trusty Logitech C270* on a USB-C hub* (the UNO Q only has a single USB-C port, and that one is taken by the power supply). We simply didn’t have a spare webcam and wanted to build the watchdog as cheaply as possible — hence the Arducam on the Media Carrier’s CSI connector.
Case and camera mount from the 3D printer
So the UNO Q and its carrier don’t sit naked next to the printer, they get a printed enclosure — I covered it in detail here, including the download on Printables. The short version: two parts, completely screwless, every port stays accessible, and the LED matrix shines through a grid in the lid.
The camera mount is the more interesting story, because it holds the biggest lesson of the build so far. My first design was a free-standing rig: a massive base plate, a 25-centimeter mast, everything nicely parametric in OpenSCAD. Technically pretty — practically a failure: the plate alone swallows over 100 grams of filament and hours of print time, and it was precisely these big, boring parts that kept failing on the printer. The solution came from the opposite direction: a simple clip that clamps onto the printer’s housing — clicked together in Tinkercad, a fraction of the material, and thanks to the clamp the borrowed printer stays untouched. My motto from the case project still stands: keep it simple.
The design is deliberately simple: the clip hooks over the front housing edge of the printer (42.5 millimeters deep on my Neptune 4 Plus — measure your own printer, I am happy to adapt the dimension), and a second hook on the arm holds the UNO Q case. Camera and computer hang on the printer as one package, and the short camera cable reaches comfortably.
The camera case itself clips together without tools: four centering pins locate the board, the front cover presses it onto its seats, and three snap fits hold everything closed. The joints use GoPro-compatible mounts — two M5 screws with recessed nuts are the only purchased parts, and a 45-degree adapter lets you aim the camera in practically any direction. The print files are in the GitHub repository: the clip and 45-degree adapter in cad/stl-v1, the camera back and front cover (cam_back.stl, cam_front.stl) in cad/stl. That folder also holds the stiffer mount that replaces the clip in part 5. The clip itself is a Tinkercad design without a source file. Everything prints support-free in PLA; only the clip goes on its side in the slicer (press F — “Lay on face”), so the print lines run along the hooks and the part permanently withstands the clamping force.
Assembly: connecting and positioning the camera
The Arducam goes into the case with four clicks, the flex cable runs through the slot at the bottom edge to the Media Carrier’s CAM0 connector — contacts facing the board, and as with all CSI cameras: only plug it in with the power off. The short cable (about 30 centimeters) dictates the architecture as a side effect: the UNO Q lives on the clip, right next to the camera.
For the camera position, diagonally from the front and slightly above works well: the print zone fills the center of the frame, the print head only crosses the upper third. And here is a tip born from a self-inflicted incident: home the print head and bed once, and save a reference photo of that pose. If the camera ever gets knocked out of position — in my case one careless touch was enough — you can realign it against the reference image in two minutes. Why this is a matter of life and death for the AI becomes clear in part 3: the anomaly model learns the entire scene, and a shifted camera renders the training worthless.
Coming up in part 2
The hardware is done, the camera is mounted — but the UNO Q hasn’t seen anything with it yet. In the next part we bring the camera to life under Linux (small spoiler: that required some device-tree magic that wasn’t documented anywhere), build ourselves a live view in the browser for aiming, and start the automatic collection of training images. Have fun building along!
Update: Part 2 is now online — continue with the camera setup, live view and data collector.
Frequently asked questions
In principle, yes — Edge Impulse also supports the Raspberry Pi 4 and 5, and with a Pi camera the setup would be similar. For this project the UNO Q brings two advantages: the built-in LED matrix as a status display right at the printer, and the microcontroller for extensions like a physical emergency stop. If you already have a spare Pi, you can still use this series as a blueprint.
No — that is the core advantage of anomaly detection. Training uses exclusively images of normal prints, which accumulate on their own with every successful job. You only need a handful of real or staged failure scenes for testing, to tune the alarm threshold.
Excluding printer and filament you are looking at roughly 125 to 140 euros: the UNO Q bundle with power supply, Media Carrier and the camera. The Edge Impulse AI platform is free in the developer plan, all 3D print files are free on Printables and GitHub, and there are no running costs — everything runs locally.









