Introduction: 3D Printer "Filament Out" Detector
So at my internship with Fractal Antenna Systems in Bedford, MA, we often have up to six or seven 3D printers running at once. What we found was that sometimes, if we forgot to check if there was enough plastic on the spools, the printer might run out in the middle of a print. While with seven 3D printers, this isn't an economic problem, it's very frustrating when you find a print job half done, with the extruder flailing in the air some inches above. To solve this, we decided to make a cheap little device to detect when a spool is almost finished, and alert us so that we can exchange filaments in time.
Safety Notice:
This project involves using a soldering iron and (optionally) a 3D printer (to print a case for the device). Both tools use very hot elements that can easily burn the skin if touched. As with any such project, use proper precautions. Please be careful and use common sense when using potentially dangerous equipment.
Step 1: Materials:
To build this project, you will need:
- A Digispark microcontroller http://www.ebay.com/itm/Digispark-Kickstarter-USB-...
- A piezo buzzer http://www.ebay.com/itm/Good-New-1pc-Standard-Pass...
- A hall efect sensor http://www.ebay.com/itm/Hall-effect-magnetic-senso...
- Perfboard http://www.ebay.com/itm/5-x-7-cm-Single-Sided-Prot...
- Male breakaway header http://www.ebay.com/itm/Precision-Fine-10-Pcs-DIP-...
- Soldering iron
- Solder
- Some wire
- Neodymium magnet
- Micro USB cable
Step 2: Build It:
Depending on how you decide to lay out the board, your device could look completely different from mine. Follow the provided schematic to wire up the Digispark, sensor, and buzzer to the perfboard. If you want to make changes, refer to the Digispark reference site here.
Glue or tape the neodymium magnet to the edge of the spool of filament. The orientation will depend on how you positioned the hall effect sensor on your device.
You will want to mount the device somewhere on or near the 3D printer, where the neodymium magnet comes with range of the hall effect sensor every rotation.
To program the Digispark, you will have to install a custom version of the Arduino IDE. The easiest way for me was to download the zip file from here and extracting it to your folder of choice. Load up the Arduino sketch that I included, and plug the Digispark in after the IDE asks you to. The bootloader on the Digispark only listens for a program for the first five seconds after receiving power.
The sketch will count the number of times the neodymium magnet passes the hall effect sensor. When it reaches a number slightly less than the average number of rotations on the spool, than the device will make a buzzing sound to alert you. It can be reset with a power cycle. You will have to edit the sketch so that it counts the proper number of rotations. This will vary widely depending on the dimensions of the spool, and on the diameter of the filament you use. Currently, it is set to five, so that you can test out the device by manually passing the magnet over the sensor.
Attachments
Step 3: 3D Print a Case:
If you are making this project, chances are you have access to a 3D printer :). This makes it pretty easy to custom make a case for your device. There is very little point in my uploading the case that I made, as the size of your perfboard and the dimensions of your device in general could be drastically different than mine. If you do want to 3D print your own case but don't want to pay for expensive CAD software, I recommend using the free version of sketchup to make your model, export it as OBJ, load it into Makerware to save it as an STL, and than slice in your slicer of choice (I use Slic3r and Cura, depending on the application).

Participated in the
3D Design Contest
7 Comments
7 years ago
So does this mean you should know how many turns you spool needs to make for a given print? or does it detect if the spool hasn't done a turn?
Could you expand on how this would work in practice please.
Reply 7 years ago
Well in the 3D printing industry there are two filament standards: 1.75 mm and 3.00 mm. That means that for any 1 kg spool of filament there might be two ballparks of how many rotations are needed. Not to mention that many filament manufacturers use different diameters and widths of spool itself. Needless to say, there are a huge range of possible values for total rotations that may or may not be correct--you could calculate it using some measurements of the filament and the spool using some simple math, or you could experiment with a spool and use that number for the rest of the spools you buy. Unfortunately there is really no way to know until you actually either use an entire spool and count the rotations or unwind once and wind it up again.
8 years ago on Introduction
This is a good idea. I am wondering tho, why a Hal detector? Why not an optocoupler? then they will no need of a magnet. Right?
Reply 7 years ago
Using an optocoupler is an interesting idea which I hadn't thought of... I'd love to see if that works with better success, I just so happened to have the parts for my solution on hand. Thanks for the comment!
8 years ago on Introduction
wow, that's what I was loking for, fantastic idea
8 years ago on Introduction
Brilliant solution, nicely done!
Reply 8 years ago on Introduction
Thanks! I have yet to test it on the printers at work, so I'm sure there will be several revisions to come...