What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

Overly complicated software solution to filament runout?


Well-known member
I know there exists proper mechanical solutions for this and I plan on looking at some. But I've been pondering a silly way to detect runout that didn't involve touching any filament. I'm pretty opinionated when it comes to the gross misuse of ML for some things but it can do some really cool things. Jeff Gearling's "alarm system" video plus a project someone was doing at work had me thinking - what if I connected some cameras to a spare Pi (so as not to impact printing). Each camera can be connected to my filament dry-boxes in the same place looking at either the filament spool or the filament itself before it goes through my PTFE connector, optionally with a few LEDs for light.

I could then do some ML training for when a spool is getting low (or in the case of the single filament, when none is seen) which I can then use to fire off an alert, say over MQTT to alert Home Assistant or even pause a print.

It's overtly complicated compared to other solutions but might fare better with translucent of clear filaments compared to an optical solution (like the older Prusa MK3 solution, which I actually really liked since it was touchless) and fewer parts than a mechanical solution at least for me since I already have a spare Pi and some cameras. It's also printer agnostic which I like since I have several printers over a mix of Prusa's and Vorons (though one doesn't need ML to make an agnostic solution).

Either way the idea of detecting filament run-out on my dry box size vs printer side is something I find really compelling since I can deploy that the same way regardless of the printer. I know there's some advanced dry box/spool holders out there already that do this but none that I have found for jumbo spools (3-4kg) which I use frequently.

Curious as to if anyone has thought about this as well and, if so, how things went?
That’s a clever, and as advertised, overly complicated solution! I use the BTT smart sensor for my printers since it measures extrusion rate and filament presence at the same time. If you were to mount an array of these at your filament box and monitor them with an independent pi, you could achieve the same result as with a machine vision based solution, but with the benefit of clog detection. It would still be printer-agnostic since you would be monitoring with the independent pi rather than the printer, but would greatly simplify setup and configuration since you wouldn’t need to train visual conditions. ( Black filament on black spools seems especially tricky if you would be using any algorithms that apply contrast/edge filters as part of the detection process. )
Oh yeah that's a thought! I was trying to figure it out but it looks like Smart Sensor is touchless? That solves one big concern I had at least with the MK3s sensors, though I haven't had any issues with them once setup. This thing could mount right where my existing PTFE ports are in my existing boxes and then everything else would be the same. All my MK3s are monitored using a single Pi which is why having it agnostic was nice. That Pi can monitor multiple of these (via GPIO or perhaps a small BTT controller board or something) and then just fire an event to MQTT and/or I can write a plugin for each of the octoprint instances that's associated with each printer (and thus each spool box) and issue a pause.

My Vorons may end up being next to each other too but they'll have their own Pis where I think just adding the Smart Sensor to those makes the most sense.

This is cool thanks for sharing this! I had no idea the Smart Sensor even existed!

The only benefit of the ML option would be tracking the filament amount remaining on the spool. I could do some math to guestimate how many meters are left for instance. But I don't think that's really all that useful over actual filament runout.
The smart sensors do touch the filament. It passes over a rubber wheel that measures the extrusion rate and compares it to wha the firmware expects the extrusion rate to be. If it’s low, then the print is paused for you to address the issue. I’ve been running one for at least 3000 print hours and it’s going strong. No issues or maintenance at all. And it works quite well at the end of a spool or with nozzle jams.
Ah gotcha. Still yeah looks like a really nice option (way more compact than mounting a camera and some lights to a filament box :)