Stop Printing Air With A Filament Sensor

If you have had a 3D printer for awhile, you know the heartbreak of coming in to check on an 8-hour print only to find that in hour 7 you ran out of filament (or the filament broke) and your printer has been dutifully moving around for no reason. [Chuck Hellebuyck] knows and he decided to make a filament sensor he found on Thingiverse.

Finding a part on Thingiverse and printing it probably doesn’t warrant much attention. But if you watch the video, below, it is a good example of how things from Thingiverse don’t always meet your needs. The microswitch [Chuck] had was bigger than the design used. So he loaded the STL file into TinkerCAD and fixed it. He shows you exactly how he did it. That’s a useful skill because you never know when you’ll need to modify some part you’ve found on the Internet.

The idea is simple. The filament’s absence triggers a buzzer that lets you know you have just a few minutes to switch out the filament. A simple device, but it could save you a lot of headache down the road. You can also connect it to your printer’s stop input for filament if it is so equipped.

Of course, the fundamental idea is nothing new; [Donald] made a very similar one earlier this year. Then, too, a better sensor will let you do more than just know it is missing.

21 thoughts on “Stop Printing Air With A Filament Sensor

    1. Because at least 50% of the manufacturers of filament hook the end of the material into the spool itself, as that makes it easier to spool. So you never see the end, it just jams up.

      So you actually want to check for moving filament. And then it suddenly gets a whole lot more complex.

      1. Its not that complex at all to detect for filament movement. A simple opto interrupter to count revolutions vs. esteps of an idler that rotates via friction of the filament, or the existing extruder idler, is all thats required to do it adequately, and accurately. May sound complex, but it isnt. Repetier already has this function baked into the firmware, and works quite well.

        1. May I add that I work at Ultimaker, and that this is the feature that didn’t make it in the Ultimaker 3 because of reliability problems? So I do have a bit of view on the complexity of doing this.

          To make it really useful, you need to detect and pause before your filament is completely beyond your feeder, else it’s a bitch to get out. So using the idler isn’t really an option. Counting revolutions, means you detect it eventually, but you already miss quite a bit of the print by then.
          And if you go into higher resolution measurements, you get a bunch of surprises on the data. What that is, I let you find out yourself.

    1. I find that to be part of the fun of having a 3D printer in the early stages. Fraught with problems, and who knows, maybe you’ll be the one who fixes it!

      It’s a toy for engineers, and a very fun, engaging, and challenging one at that

    1. Because the file was going to be shared with viewers on Thingiverse so they could recreate it if they wanted. Plus just shows how to modify in Tinkercad. Part of the fun. And it’s really not one off as I’ll be producing more for my garage full of printers.

  1. For unattended prints, I’d have the sensor control a relay that switches the heater cartridge to prevent a clogged nozzle. Of course the best thing to do is have the controller suspend printing until you can refill the filament and resume the job.

    FWIW, an optical sensor might be preferable because it’s less dependent on small differences in geometry.

      1. You definitely could, but I think that would be more complicated than many hobbyists are capable of/ interested in doing. It would be a pretty elegant solution for an out of the box printer through.

        1. I guess.
          Sticking the leads through an ammeter doesn’t sound to complex to me but maybe I’m missing something. It also solves clogged nozzle monitoring since the current should spike.

          1. Stepper motors are driven with a constant current. The only way to detect torque on a stepper is to reduce current until it skips steps.

            For sensing an inertial load you can monitor the voltage across the coils. Short voltage spikes means it is stepping quickly, and probably isn’t driving anything. Though it gets complicated once you factor in that steppers use chopper drivers, and aren’t perfect constant current.

  2. I don’t know, it seems easy enough to check before printing that you have enough unbroken filament; this has not been a big enough problem for me to make it worthwhile.

    Now, if it could also detect nozzle clogs and air printing, that would be great.

    1. I can’t speak for anyone else, but I’ve been known to get greedy and underestimate the amount of filament I have left while I’m trying to use up the rest of a spool.

      A scale would be a good idea if you consistently order filament that comes on the same kind of spool, but I think a filament sensor makes a lot of sense at least as a redundancy.

      It’s much more complex than what’s shown in this article, but a contact wheel with a rotary encoder would be even better than a button or optical sensor. That way you could detect the most common causes of nozzle clogs: slipping, skipped steps, and an empty feeder.

      Most systems aren’t equipped to easily measure torque as Leithoas suggested, but I do think that would be a good complement to a more sophisticated feed control/monitoring system. Excessive extruder motor torque is a good indication of malfunction or a poor configuration. Bonus points for limiting feed rate or adjusting extruded temperature to optimize extruder force.

  3. My extremely simple and logical method:

    1) When unpacking a new spool, weight it, and mark it down. You know how much filament you bought, so you now know the empty spool weight.
    2) Properly configure your slicer, so its weight estimates match the reality. With simplify3D I consistently get an estimate within 1-2% of actual printed part weight.
    3) Simply re-weight, substract and compare with your slicer’s estimate before starting a print.

    I never failed a print due to missing filament with this method, and I tend to make a lot of big and long prints (eg earlier this week: ~45hours), with no monitoring at all.

  4. What we really need is a “filament is flowing according to plan” sensor.
    This has limited use, at least in my case. Most times i don’t doubt I don’t have enough filament. When there is little filament left over I remove it from the spool which makes it easy to weigh before each print and make sure there is enough.

    Again, a “filament is flowing according to plan” sensor will provide both and out of filament marker and cover clogged nozzle, broken extruder and others.

    1. My thoughts exactly. Would a modified balled mouse work on it? A roller to detect the motion of the filament, then correlate the feed rate to the mouse wheel pulses. If no pulses for 5secs are present, stop/pause the print. Shouldn’t be too difficult to do in Marlin FW.
      The modes of failure it can detect:
      – Clogged nozzle (filament doesn’t move, the extruder hobbed bolt is grinding the filament).
      – filament entangled/stuck on the spool (happens with new rolls of filament when the filament slackens and coils off the spool).
      – Out of filament.
      – Snapped filament.

      The challenge is to get a good enough friction for the mouse wheel to reliably detect the filaments motion. An optical mouse could also work, though some filaments may be too smooth to register the motion. It may be possible to place the detector after the hobbed bolt on a bowden setup, the cuts of the hobbed bolt should be good enough for the optical sensor to detect.
      If it’s not possible to do process the mouse data in the firmware, a dedicated microcontroller should do the trick. I’m sure there’s a library for arduino to read mouse data.

      1. I think in general the cost of the sensor might outweigh the benefits. People built more serious sensors http://hackaday.com/2015/06/16/prevent-failed-prints-with-a-filament-speed-sensor/ like this. At home I find it has limited usage, I am generally around the 3d printer or I can see it through the webcam. I find it is hard to hit that middle ground where the filament is flowing too slow, it is either good or totally stops. If it totally stops you lost time, but not necessary the whole print.

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