Arduino UNO Q with a camera monitoring a 3D printer, next to it a laptop showing the AI print watchdog's status page with a red alarm

Edge AI in practice: an Arduino UNO Q detects failed 3D prints – no cloud required

Anyone who has left a long 3D print running overnight knows the risk: if the part comes loose from the bed, the printer keeps extruding into thin air for hours, and in the morning there is a tangle of filament on the bed. That is exactly what we built an AI print watchdog against over the past few weeks: a camera, a board for under 100 euros and a model trained exclusively on images of successful prints. It detects failed prints, sends a push notification with a photo as evidence to your phone and pauses the print if you want it to. All of the inference runs as Edge AI directly on an Arduino UNO Q next to the printer – no cloud and no subscription. In operation the watchdog analyses every camera frame itself; only training the model means uploading sample images to Edge Impulse.

The project was set up as an open experiment from the start: is a thumbnail-sized chip enough for a task that commercial services hand to their cloud data centres? This is the short version of the five-part series (as of 2 September 2026): what the system can do, how it is built, which numbers came out of it and where it still falls short. The step-by-step instructions live in the individual parts, which are linked where they belong.

The Arduino team featured the project on the official Arduino Blog on 14 September 2026.

What is Edge AI?

Edge AI means that an AI model runs directly on the device on site – here on the Arduino UNO Q at the 3D printer – instead of sending images or sensor data to a cloud server. In operation the data stays local, there are no running costs, and detection keeps working without internet access. Training, on the other hand, often happens in the cloud – in this project at Edge Impulse. The price of running locally: limited compute and little memory, so the model has to be small and the task narrowly defined.

The use case: what the AI actually does for the printer

An FDM printer does not notice when its print fails. If the part comes loose from the bed in hour three, the nozzle clogs or the filament starts stringing, it keeps printing regardless. The result is a tangle of filament the community calls “spaghetti”: it costs material and hours, and in the worst case it encases the hotend. It is noticed latest on exactly those prints that run overnight or unattended during the day.

The watchdog closes that gap. It looks at the print bed every 15 seconds, reports a failed print within a minute via push notification to your phone – with a photo in which the suspicious image regions are marked – and can pause the printer on its own if you allow it. A missed failure costs a night of spaghetti and a spool of filament; an alarm costs a glance at your phone.

Without AI this is hard to solve: a print looks different every minute. The bed moves, the head comes and goes, the object grows, the filament changes colour. A motion detector or a fixed brightness value cannot tell “healthy” from “broken”. An anomaly model can, because it has seen thousands of images of normal prints and reports everything that deviates from them: spaghetti, a detached part, a strand across the bed.

SituationWithout the watchdogWith the watchdog
Failed print overnightnoticed in the morning: tangle, a spool of filament, in the worst case the hotendpush notification within a minute, optional automatic pause
Evidence of what happenednonephoto with marked image regions in Home Assistant
Checking while awaylook at the live image yourself, regularlystatus page with traffic light and score – the watchdog does the watching
Cost and datacloud service with subscription and image uploadone-off around 125 euros, inference runs locally, images go to Edge Impulse only for training

The project in numbers

ItemValue
BoardArduino UNO Q – Debian Linux on the Qualcomm processor plus STM32 microcontroller
CameraIMX219 module (Arducam NoIR, V2 form factor) on the UNO Media Carrier, 632 × 480 pixels
AI modelFOMO-AD (Visual Anomaly Detection) by Edge Impulse, free developer plan
Training dataaround 2,600 normal images (model 1) and around 2,300 (model 2) – not a single failure image in training
Inference time per image on the board41 ms (96 × 96 pixels, int8) and 67 ms (160 × 160 pixels, float32)
Check cycleevery 15 seconds while printing, alarm on three hits out of four
IntegrationMoonraker API (print status, pause), MQTT discovery for Home Assistant, status page on port 7000
Hardware costaround 125 to 140 euros for UNO Q (4 GB bundle), Media Carrier and camera
Resultfive real failed prints caught on the first day of operation; automatic pause not yet armed

Why Edge AI for this task?

A print watchdog is a textbook case for Edge AI. The task is narrow – does the print bed look normal? –, the data is produced right at the device, and millisecond real time is not needed: one image every 15 seconds is enough, because a spaghetti tangle takes minutes to grow. At the same time, nobody wants to stream a constant feed of workshop photos to someone else’s server or pay a subscription for it.

The Arduino UNO Q suits this role because it combines two worlds on one board: a Debian Linux on the Qualcomm processor that runs the AI model, and a classic microcontroller for real-time jobs such as the LED matrix that serves as the alarm light at the printer. Arduino’s App Lab packages both into an app made of ready-made building blocks, the “bricks”, and Edge Impulse lists the UNO Q as an official target device – so the model export fits without any tinkering.

The architecture: from camera to push notification

System overview of the print watchdog: printer with camera, Arduino UNO Q with anomaly model and training buffer, Home Assistant, status page and the retraining loop
The state after part 5: camera and model on the UNO Q, status page, Home Assistant and the retraining loop

The watchdog works in a simple cycle. The UNO Q asks the printer via the Moonraker API whether a print is running. If so, it grabs a camera frame, runs it through the anomaly model and gets a score back. If three of the last four checks are above the alarm threshold, it raises the alarm: blinking LED matrix, evidence photo with marked regions, an MQTT message to Home Assistant and, optionally, a pause command to the printer. All of this runs on the board. Home Assistant is only the route for the push notification to your phone – how to make your printer network-capable with Klipper and Moonraker is covered in this article.

The AI approach: learning normality instead of collecting failures

The obvious route – training a model on thousands of photos of failed prints – fails at the data stage. Nobody deliberately crashes dozens of prints, certainly not on a borrowed printer. So the watchdog relies on anomaly detection with FOMO-AD, the visual anomaly model from Edge Impulse. It learns exclusively what a normal print looks like and reports everything that deviates from it. The training images accumulate by themselves with every successful print; you only need a handful of failure images to set the alarm threshold.

Edge Impulse Studio with the finished impulse: image block and Visual Anomaly Detection
The complete processing chain in Edge Impulse Studio: resize, normalise, FOMO-AD – the output is a single anomaly score

The principle has a flip side that shaped the whole project: FOMO-AD does not learn “spaghetti”, it learns “this is what it normally looks like here”. Camera position, framing, focus and lighting are part of the model. Every mount that shifts and every new lamp in the room invalidates the dataset together with the model. For anyone rebuilding this: fix the hardware first, then collect.

The hardware: three purchased parts and a mount from the printer

The shopping list is short: the Arduino UNO Q, the UNO Media Carrier with two CSI camera connectors and an IMX219 camera in the V2 form factor – in our case an Arducam NoIR module. The carrier only supports IMX219 sensors; a Camera Module 3 does not work. A USB webcam on a USB-C hub does the job as well.

ComponentPurposeApprox. price
Arduino UNO Q, 4 GB bundle with USB-C power supplyAI inference (Linux) + LED matrix (microcontroller)approx. 88 €*
UNO Media Carrier (ASX00083)CSI camera connectors for the UNO Qapprox. 19 €*
IMX219 camera, e.g. Waveshare IMX219view of the print bed17–30 €*
PLA filament, screws and nutscase and mount< 5 €
Links marked with * are affiliate links, which makes them advertising. If you buy through one, I earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases. Learn more
Ad
Arduino UNO Q 4GB with 45W USB-C Power Supply
Arduino UNO Q 4GB with 45W USB-C Power Supply
$85.81 $95.34 −10%
Price before sales tax, as of 2026-12-01, 22:35 — prices may have changed since.

The case for the UNO Q and the camera mount come out of the 3D printer. The first version was a clamp on the housing edge of the Elegoo Neptune 4 Plus that shifted at the slightest touch in everyday use. In part 5 it gave way to a rigid arm on the Z strut, designed parametrically in FreeCAD, that carries both board and camera. All print files are in the GitHub repository.

Elegoo Neptune 4 Plus printing with the AI camera watchdog mounted
Version 1: a clamp on the housing edge – mounted in a minute, but too easy to knock out of position
The finished mount with Arduino UNO Q and camera on the Z strut of the 3D printer
Version 2: a rigid arm on the Z strut, the board in the tray on top, the camera below on the joint

Collecting data and training: the road to the first model

Before the camera delivered a single frame, a detour was needed: the standard UNO Q image does not enable the camera subsystem of the Qualcomm chip. On current images there is a switch for it in the App Lab settings (Carriers → Camera0 “type1-2lanes”); on older images you need a custom boot entry with the matching device tree – both are described in part 2. The camera delivers 632 × 480 pixels; the reserved memory does not allow more. The model only works with 96 × 96 pixels anyway, later 160 × 160.

A GStreamer script saved one frame every ten seconds during each print. After a week of everyday prints there were around 2,600 normal images, plus 20 real stringing images from an unplanned failed print. The upload ran straight from the board via curl to the Edge Impulse ingestion API, with no extra software. Training took five minutes (part 3).

Four automatically collected training images of a running 3D print
Four frames from the automatic collection: the bed moves, the head comes and goes, all normal

The first test result looked like a write-off: F1 score 0.23. The raw data showed the opposite. All 20 failure images were detected, the normal images had a median score of 26 and 99 percent of them were below 33, the failure images started at 44. Only the default threshold of 27.3 sat right in the middle of the normal distribution. With the threshold at 40 the F1 score stood at 1.00 – and on the side, the model found a strand across the bed that we had overlooked while labelling.

Camera image with a filament strand stretched across the print bed
The supposedly normal image with a score of 62.8: a strand across the bed – the model was right

On the board, the quantised model needs 41 milliseconds per image and the model file is 3.9 MB. At one image every 15 seconds the watchdog uses about 0.3 percent of the available compute time.

The watchdog app: two bricks and a status page

The app consists of two App Lab bricks: visual_anomaly_detection runs our own model, web_ui serves a status page on port 7000 with traffic light, score, live image, last alarm image and all settings. How to register your own Edge Impulse model with the brick was documented nowhere at the time of the series – part 4 shows it. Via MQTT discovery the watchdog registers itself in Home Assistant with four entities: alarm, score, status and the alarm image as a camera entity, without a single line of configuration. A rotating buffer keeps the last 2,500 unremarkable images for later retraining.

Status page of the print watchdog: status watching, score, live image of the print bed and event log
The status page on port 7000: traffic light, score with threshold, live image and event log
The print watchdog device in Home Assistant with the four entities created via MQTT discovery
Created automatically: the watchdog device in Home Assistant with alarm, score, status and alarm image

The first day in practice delivered three lessons and five real catches. Lesson one: inference has to run through the same image pipeline as training. A different white balance – the blue channel was twice as strong as in the training images – made every frame look like an anomaly. Lesson two: the start phase with homing and purge line needs a 60-second warm-up lock, because such frames were missing from training. Lesson three: a few degrees of camera offset, and the scores of normal prints climbed permanently from below 33 to 45–50. In between, damp filament produced five failed prints in one morning, and the watchdog reported every single one: score above 50, alarm in Home Assistant, blinking LED matrix, evidence photo.

Alarm image with anomaly regions drawn in: red grid cells mark the spaghetti
The first real catch with markers: the red grid cells show which image regions disturbed the model

Round two: new mount, new model, honest numbers

After the switch to the rigid mount the old normality was worthless: the first model rated the new scene at 48 to 61 on a perfectly normal print. So, from scratch – around 2,300 images over three days, different filament colours, daylight and artificial light, collected by the watchdog itself in observer mode. The new impulse works with 160 × 160 pixels; training took 35 minutes. On the board, the new model answered the same print with 29 to 38.

The deployment page delivered a finding that is typical for Edge AI: the quantised int8 version needs 119 milliseconds per image on the UNO Q, the unquantised float32 version only 67. The speed advantage of int8 only materialises with matching special-purpose hardware; without it, only the conversion overhead remains. How the UNO Q runs its AI models out of the box and when its GPU comes into play is something we examined in the article on image recognition with a smartphone.

Edge Impulse deployment page with target Arduino UNO Q and the inference-time comparison of int8 and float32
The deployment estimate for the UNO Q: here the quantised version is the slower one

When calibrating the threshold, the distributions overlapped this time. 95 percent of the 471 normal images in the test set were below 39.1, the 17 failure images – mostly staged filament tangles plus two real detachments – ranged from 40.4 to 60.2. There is no longer a value that catches every failure and hits no normal image:

ThresholdFalse alarms (of 471 normal images)Missed failures (of 17)
4019 (4.0 %)0
458 (1.7 %)5
503 (0.6 %)8
65017

The high-scoring normal images were not overlooked failures but bright printed parts at the edge of the frame, reflections on the bed and bright room light – states that were too rare in the dataset. With the threshold at 40, the first alarm came after four minutes on a normal print; the marked regions sat on the empty, bright area of the bed. The time filter did not help, because the bright area does not produce an outlier but is a persistent property of the scene.

Watchdog status page with an alarm at score 41.5 and red regions on the empty, bright area of the print bed
The first armed alarm was a false alarm: the red tiles sit on the empty, bright bed area, not on a tangle

Behind this is a flaw in reasoning that affects every self-learning system: the training buffer only stores images below the threshold, so that no spaghetti slips into training as “normal”. But exactly the bright scenes the model does not know are above the threshold and are never collected. The watchdog cements its own blind spot. That is why the threshold is back at 100, the watchdog now collects the bright phases as well, and the automatic pause stays off until retraining delivers a threshold that holds up. The alternative – a threshold of 50 – would have let eight of 17 failures through.

What we learned about Edge AI

  • Compute was never the bottleneck. At one image every 15 seconds the processor sits idle almost all the time. The bottleneck was always the image: the small resolution, the NoIR sensor without an infrared filter and its flat contrast, and an image pipeline that needed manual help.
  • Training and inference pipelines must be identical. Same resolution, same rotation, same white balance, ideally the same code. A deviating blue channel was enough to turn every frame into an anomaly.
  • An anomaly model is the scene. Camera, light and viewing angle are part of the model. A finished model therefore cannot be handed on – every rebuild trains its own, and every change to the setup means: collect again, train again.
  • The platform’s metrics depend on the threshold. F1 scores of 0.23 and 0.10 were both no verdict on the model, only on a default setting. Only the score distributions of normal and failure images yield an alarm threshold.
  • Variety is not free. More normal states in training reduce false alarms, but also widen what passes as normal – and make the model less sensitive to weak failures.
  • Self-curating systems have a blind spot. Whoever filters training data by their own judgement excludes exactly the cases they would need to improve. An unfiltered collection phase belongs in every retraining cycle.
  • Quantisation needs matching hardware. Without an accelerator for integer arithmetic the int8 model is slower than the float32 version, not faster.

Rebuilding it: series, code and files

The complete source code of the app, the camera scripts, the upload script for Edge Impulse and all STL and FreeCAD files of the mount are in the GitHub repository. The app is also there as a zip for the “Import App” button in App Lab; it starts with a placeholder model and collects the images for your own model from the first print onwards. Our model is deliberately not included – it only knows our scene. The project is also our entry for Arduino’s App Lab contest on Hackster.

The five parts of the series at a glance:

  1. Part 1: idea, case and camera mount – concept, shopping list, printed clamp
  2. Part 2: setting up the camera and collecting training images – camera activation, live view in the browser, automatic collection
  3. Part 3: training the anomaly model with Edge Impulse – upload, impulse, threshold calibration
  4. Part 4: the watchdog app with App Lab – registering the model, Moonraker, Home Assistant, first catches
  5. Part 5: tuning and finishing touches – mount v2, retraining, false alarms, autostart, app as zip

Conclusion and outlook

After five parts there is a system that works: a camera on a self-designed mount, an anomaly model that computes locally on the UNO Q, a status page in the browser, notifications in Home Assistant and a board that comes back up on its own after a power cut. The concept is proven in real operation. What is missing is the fine-tuning: a robust alarm threshold from a broader dataset and, after that, the automatic pause.

The next steps are unspectacular: keep collecting, retrain, set the threshold, enable auto-pause. Then the mount gets reprinted in PETG, because PLA slowly yields under constant load, and there will be a trial with a webcam that has an infrared filter – not for the resolution, but for the contrast. The hard part of an Edge AI project is not the model. It is the question of what “normal” actually means – and that is not answered by the computer, but by whoever collects the images.

Disclosure: the Arduino UNO Q was provided to us by Arduino as a test unit, the Elegoo Neptune 4 Plus is on loan from Elegoo. Neither had any influence on content or assessment.

Frequently asked questions

What is the difference between Edge AI and AI in the cloud?

With Edge AI the model runs on the device on site, here on the Arduino UNO Q at the printer. In operation the images stay local, there are no running costs, and detection keeps working without internet access. Only the training happens in the cloud, here at Edge Impulse. The price of running locally: the model has to be small enough for the board – FOMO-AD fits easily with a few megabytes.

Do I need photos of failed prints for training?

No. The anomaly model learns exclusively from images of normal prints, which accumulate with every successful print anyway. You only need a handful of real or staged failure scenes – a filament tangle on the bed, for example – to set the alarm threshold.

Can I use your finished model?

No, and that is down to the principle: the model learns what your specific scene looks like when normal, including printer, camera position and light. Our model would report everything as a failure on your setup. Training your own is the easiest part, though: the images collect themselves, training takes five to 35 minutes in the Edge Impulse cloud and is free in the developer plan.

Does this also work with a Raspberry Pi?

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 the built-in LED matrix as an alarm light and the microcontroller for extensions such as a physical emergency stop; the App Lab app itself is tailored to the UNO Q.

Does the watchdog pause my printer on its own?

Only if you want it to. The automatic pause is an opt-in switch and off by default. In our case it stays off until the alarm threshold has held up for several prints without a false alarm. When enabled, the app sends a normal pause command to Moonraker that parks the print head – not an emergency stop.

What does the complete watchdog cost?

Excluding printer and filament, around 125 to 140 euros: the UNO Q bundle with power supply (around 88 euros), the Media Carrier (around 19 euros) and an IMX219 camera (17 to 30 euros). Edge Impulse is free in the developer plan, all 3D print files and the code are free on GitHub, and there are no running costs.

Similar Posts