Machine Vision Helps You Terminate Failing 3D Print Jobs

a 3D printed box with a Terminator head watching a camera

If you’re a 3D printer user you’re probably familiar with that dreaded feeling of returning to your printer a few hours after submitting a big job, only to find that it threw an error and stopped printing, or worse, turned half a spool of filament into a useless heap of twisted plastic. While some printers come with remote monitoring facilities, [Kutluhan Aktar]’s doesn’t, so he built a device that keeps a watchful eye on his 3D printer and notifies him if anything’s amiss.

a 3D printed box with a Terminator head watching a cameraThe device does this by tracking the movement of the print head using a camera and looking for any significant changes in motion. If, for example, the Y-axis suddenly stops moving and doesn’t resume within a reasonable amount of time, it will generate a warning message and send it to its owner through Telegram. If all three axes stop moving, then either the print is finished or some serious error occurred, both of which require user intervention.

The camera [Kutluhan] used is a HuskyLens AI camera that can detect objects and output a set of 3D coordinates describing their motion. A set of QR-like AprilTags attached to the moving parts of the 3D printer help the camera to identify the relevant components. The software runs on a Raspberry Pi housed in a 3D-printed enclosure with a T-800 Terminator head on top to give it a bit of extra presence.

[Kutluhan]’s description of the project covers lots of detail on how to set up the camera and hook it up to a Telegram bot that enables it to send automated messages, so it’s an interesting read even if you’re not planning to 3D print something to check on your 3D printer. After all, software like Octoprint has many similar features, but having an independent observer can still be a good safety feature to prevent some types of catastrophic failure.

13 thoughts on “Machine Vision Helps You Terminate Failing 3D Print Jobs

  1. You can achieve similar functionality without a camera by homing the printer periodically during the print, maybe every 5th or 10th layer (you could do it with every layer but that will add a lot of print time for a large print). It will take some custom gcode but should be pretty easy. If you home the printer and the endstop is triggered early or late based on the last print coordinates you know something is wrong.

    Markforged uses this technique to detect shifted layers and stop prints before you burn up a bunch of their expensive filament.

    Cheap $3 optical endstops can provide the the required precision.

    https://drmrehorst.blogspot.com/2020/03/testing-ummds-xy-optical-endstops.html

    1. Actually I think it sounds potentially less useful (on its own). This looks like it only observes the movement of the extruder – which will catch problems when the printer stalls or gets stuck. My own experience has been that when prints fail it’s mostly (well, for me always so far) because the filament becomes unstuck from the bed or the previous layer – the extruder keeps moving fine but it just spits out spaghetti that’s not stuck to anything. This system wouldn’t catch any of that but spaghetti detective would.

      It does sound like it could work well in conjunction with spaghetti detective though – to catch problems that occur both in the printer hardware AND with the filament adhesion.

      1. yeah filament problems are way more common than movement-axis problems for me too. i’ve had the feed get tangled (my fault sigh) and it did like 30% extrusion for a few minutes. or yeah something lifts off if i’m getting ambitious (or careless) with my landing areas. sometimes an overly ambitious design falls over on its own accord before it’s done printing, and then again it’s just a mess of spaghetti.

        the only time i’ve had movement fail, it just got off by a step or two, so the next layer was shifted a little. but it still moved. short of closed-loop control, it’d be hard to detect that sort of thing.

        1. Agreed only once have I seen lost steps or any failure of movement that ruined the print, and that was in a delta where one of the linear rails seized up quite often as the bearing failed…

          Every other failure has been bed adhesion or extrusion related, with a little shout out to running the printer a bit to fast and getting a rather poor quality result, but that could still perhaps be called a success.

  2. Another method that might work better is to project the in-progress 3d model in space (think an AR projection of the layer-by-layer view in a slicer) with relation to the actual camera angle (and focus), and compare with the actual progress (maybe periodically moving the head out of the camera’s way if necessary). You’d probably be able to get a good approximation of the prints physical status by comparing the difference (the estimated progress as the 3d model, and the physical model).

  3. Sounds like an interesting programming exercise. But I solved this issue with a cheap IP camera and a IP power socket adapter.. I just checked the camera periodically and if there was a problem, turned the printer off. Simple

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.