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.
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
- 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.
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).