Bolt-On Clog Detection For Your 3D Printer

Desktop 3D printing technology has improved by leaps and bounds over the last few years, but they can still be finicky beasts. Part of this is because the consumer-level machines generally don’t offer much in the way of instrumentation. If the filament runs out or the hotend clogs up and stops extruding, the vast majority of printers will keep humming along with nothing to show for it.

Looking to prevent the heartache of a half-finished print, [Elite Worm] has been working on a very clever filament detector that can be retrofitted to your 3D printer with a minimum of fuss. The design, at least in its current form, doesn’t actually interface with the printer beyond latching onto the part cooling fan as a convenient source of DC power. Filament simply passes through it on the way to the extruder, and should it stop moving while the fan is still running (indicating that the machine should be printing), it will sound the alarm.

Inside the handy device is a Digispark ATtiny85 microcontroller, a 128 x 32  I2C OLED display, a buzzer, an LED, and a photoresistor. An ingenious 3D printed mechanism grabs the filament on its way through to the extruder, and uses this movement to alternately block and unblock the path between the LED and photoresistor. If the microcontroller doesn’t see the telltale pulse after a few minutes, it knows that something has gone wrong.

In the video after the break, [Elite Worm] fits the device to his Prusa i3 MK2, but it should work on essentially any 3D printer if you can find a convenient place to mount it. Keep a close eye out during the video for our favorite part of the whole build, using the neck of a latex party balloon to add a little traction to the wheels of the filament sensor. Brilliant.

Incidentally, Prusa tried to tackle jam detection optically on the i3 MK3 but ended up deleting the feature on the subsequent MK3S since the system proved unreliable with some filaments. The official line is that jams are so infrequent with high-quality filament that the printer doesn’t need it, but it does seem like an odd omission when even the cheapest paper printer on the market still beeps at you when things have run afoul.

19 thoughts on “Bolt-On Clog Detection For Your 3D Printer

  1. Skip that OLED display and controller, keep the optocoupler design, and use its output as feedback to the controller. No need to wait for few minutes to detect a clogged extruder with a closed-loop design.

      1. In my experience, the first thing that happens is that the stepper motor starts skipping, and it takes some time to strip the filament. The failure should be detected by then. But I have a BMG-style extruder, which is less likely to slip.

        1. That’s good. Of course, now it depends on your drivers and whether the firmware can be tweaked to react to the stall detection message (no idea if that’s already a feature, because it should).

  2. This is great work. Would you describe this as a “photoelectric filament sensor”? Looks very similar to what they implemented on the CR-6 SE (about halfway down the page):
    https://www.creality.com/cr-6-se-3d-printer-crowdfunding-on-ks-now-p00296p1.html
    I am glad there’s a “DIY” version though and can’t wait to see the updates :)

    It would be cool if the sensor could count / measure the length of extruded filament as well. Would come in handy for calibration purposes. See the Instructable here:
    https://www.instructables.com/id/Smart-3D-Printer-Filament-Counter/
    Seems like you could replace one of the wheels with a rotary encoder to add this functionality.

    1. I believe this is different. The CR-6 sensor detects the absence of filament with an optical sensor. It has no way of telling if the filament is moving or just sitting there.

      This clog detection sensor also uses an optical sensor, but not directly aimed at the filament. There’s an idler pulley that is pushed along by the moving filament. On that pulley there is an extension that blocks a light so it doesn’t hit the photosensor. That extension doesn’t go all the way around the pulley, so the photosensor should see pulses of light-dark-light. That means the filament is moving (because it’s pushing the idler pulleys). If the controller doesn’t see any changes in the sensor for a period of time (either all light, or all dark), then it knows that the idler pulley is not spinning and therefore the filament is stuck. Running out of filament would produce the same results (pulley not moving).

  3. What’s wrong with using the pulses to charge a capacitor in the base of a transistor with the buzzer in the collector.

    The saying sledgehammer and nut seems appropriate here.

    1. My printer fails because of following reasons:
      * runs out of filament (seldom)
      * filament gets jammed (most likely, not often)
      * print head clogs (2nd most likely)

      tracking filament flow would deal with all of these.

      I like the idea of using an encoder (have lots of those) and using an Nano also have lots of those. Then the output of Nano goes to where the relay was connections are.

      Only thing missing is my time to get this done.

      Operation would be something like this:
      Detect movement for at least xx seconds to know it has started.
      If no movement for xxxx milliseconds use the trigger to pause printer.

      Maybe have an alarm to say it is done or stopped.

  4. Might there be a way to detect a clog based on hot end temperature. I dont know but suspect there would be a temperature climb in the hotend since the molten plastic is not discharging. It would be a way to detect flow rate indirectly as a function of loss or gain of heat in the hotend.

Leave a Reply to LOLCancel 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.