3D Printers Get a Fuel Gauge: Adding a Filament Scale to OctoPrint

It seems a simple enough concept: as a 3D printer consumes filament, the spool becomes lighter. If you weighed an empty spool, and subtracted that from the weight of the in-use spool, you’d know how much filament you had left. Despite being an easy way to get a “fuel gauge” on a desktop 3D printer, it isn’t something we often see on DIY machines, much less consumer hardware. But with this slick hack from [Victor Noordhoek] as inspiration, it might become a bit more common.

He’s designed a simple filament holder which mounts on top of an HX711 load cell, which is in turn connected to the Raspberry Pi running OctoPrint over SPI. If you’re running OctoPrint on something like an old PC, you’ll need to use an intermediate device such as an Arduino to get it connected; though honestly you should probably just be using a Pi.

On the software side, [Victor] has written an OctoPrint plugin that adds a readout of current filament weight to the main display. He’s put a fair amount of polish into the plugin, going through the effort to add in a calibration routine and a field where you can enter in the weight of your empty spool so it can be automatically deducted from the HX711’s reading.

Hopefully a future version of the plugin will allow the user to enter in the density of their particular filament so it can calculate an estimate of the remaining length. The next logical step would be adding a check that will show the user a warning if they try to start a print that requires more filament than the sensor detects is currently loaded.

This is yet another excellent example of the incredible flexibility and customization offered by OctoPrint. If you’re looking for more reasons to make the switch, check out our guide on using OctoPrint to create impressive time lapse videos of your prints, or how you can control the printer from your mobile device.

13 thoughts on “3D Printers Get a Fuel Gauge: Adding a Filament Scale to OctoPrint

  1. It is an interesting plugin. If you know the weight of the empty spool this is a precise way to know how much is left. But without a check from gcode analysis and filament parameters it is hard to know if you have enough. The slicer gives you the weight, but calculated from an average density of that material. It really knows the volume it would need for the print. Unfortunately, not all filament makers give you the datasheet of the filament.
    Many printers now have a simple filament switch to know if you are out of… which I think is a more usable solution.

  2. The combination of an empty spoolholder combined with: “Filament remaining: 824g” is a bit unfortunate :)

    It also does not seem to be very usefull to know that your filament is going to run out, it would be more usefull to know that your filament is not going to run out during the next print.
    And as this stuff is expecially made to be sticky when hot, why not make something simple to heat 2 ends of filament so you can easily splice them together?
    Any printer with an exposed flat spot on the hot end could use a bracket to hold 2 pieces of filament against it to melt the end, combine it with a way to easily align and press the ends together untill cooled again.

  3. I was curious as I used to work with load cells all the time and accurate, small value ones used to be pricey. It turns out the HX711 is a load cell amplifier, not a load cell. One of the big issues with load cells is thermal drift. This occurs in both the strain gauges that they are made from as well as the dimensional stability of the material the displacement is being measured on.

    Why not get around that by just running the filament through a rotary encoder or even the sensor from an optical mouse and measure the linear amount used. If you know what a foot of product weighs and you know you have a kilo of it, that should be pretty easy to do, avoid the all the problems of an analog solution, and I suspect cost less.

    Of course if you don’t need to be super accurate and just wanna know before you run out of filament you could mount a microswitch with a lever to your spool holder so the switch clicks off when the thickness of the spool is down quite a ways. This is of course assuming that the spools are all the same. You could also just make a trap that the filament goes through that has a microswitch or an optical interrupter that would pause the printer when the filament pulls through it.

    The load cell idea seems more like it was born out of having the parts on hand and not necessarily a simple solution.

    1. The rotary encoder works, if you press it well enough against the material, which sometimes can be problematic, but not super hard to engineer.
      The optical mouse sensor only works with certain materials. Black Nylon is transparent for IR for example.

      1. The prusa i3 3 uses an optical mouse sensor i think. They are saying that some materials are an issue. I also think that a rubber wheel pressed on the filament might perform better, but this is more expensive probably.

        1. Well, I know some of them are IR. Guess some have an “indicator light” as the user expects this, or use visible light.
          Still, visible light would give the same issue, just with different materials.

    2. Well mine broke during the first callibration? Showed 0 under Current reading. When I put on a spool (1303 gr) and pressed calibrate the current reading switch to NaN. Even after plugin reinstall it shows NaN. Suggestion?

  4. I would think that measuring the distance to the spool center would be easier way to measure (approx) amount of filament left. i.e. a spool level gauge using ultra sonic or mechanical level of the spool winding height to the empty spool center. I use a run out switch but always wonder if there is going to be enough filament when i begin. knowing the weight or approximate amount would alleviate the worry about run out. particularly on the 3/4 empty spools.

    Nice project.

    1. Yea, with different degrees of success. I went through the trouble of figuring out which standard drill had the same diameter as the filament and chucking that bit up in my drill pres and making a nice piece of oak about an inch thick I could hold what was left of the old spool and the start of the new spool over a candle and jam them in the each side of the hole and some times they would weld nicely together. Only now you have the wooden piece on there.

      Not to be stopped, I went back and cut a piece of oak in half, ran each face through my joiner so they were perfectly flat, drilled a couple through holes for bolts a bolt and a wingnut on each side, and than very carefully drilled my filament hole through the center of the cut. This sort of works if you are willing to screw with it. I have gotten some very nice filament welds out of it. Oddly enough if there is a bulge, it usually happens outside of the wood.

      I don’t have a mechanism to make my printer stop when it runs out so when I run low I really have to babysit it, When there are just a handful of turns left on the spool I will spool them, and do the weld and then wrap the mess up on the new spool.

      Sadly all of this does not help with material differences between the spools. It seems that I always have to screw with my settings a bit to get good prints out of a new spool, even with the same brand and color of material.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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