Software apps and online services
Hand tools and fabrication machines
Watching the filament running out so you can switch to a new roll is like watching the paint dry. Thanks for ESP8266 and myDevices Cayenne, this IoT enabled filament runout switch will not only pause your 3D printer when the filament ran out, but also notify you using Cayenne APP push notifications. So you can feel free to walk away from the printer and return to change the filament roll when it happens.Hardware Design
This device contains a build-in filament ranout switch that will monitor the breakage of the filament. The microswitch will change the state and switch from On to Off when the filament ran out.
The WeMos Mini is a mini wifi board with 4MB flash based on ESP-8266EX. It has a micro USB connection that makes the flashing the Arduino sketch very easy.
The device is connected to the Servo port on the 3D printer control board. I used the MKS Gen. board which also supplies the 5V to the WeMos Mini. The D6 pin from the WeMos Mini is connected to the 3D printer control board Signal pin via a 1K ohm resistor as protection.
When there's filament, the micro switch will be triggered and connect to Low (GND), and the WeMos D5 pin will be low, the LED is off, and D6 pin is High at 3.3V. The MKS control board has a 10K pull up resistor on the Servo signal pin, the control board will read 3.3v as HIGH, indicates the filament is present and the printer will work normally.
When filament run out, the micro switch will no longer be triggered and become open (null), thus the WeMos D5 pin will be High, the LED is on, and D6 pin becomes low which will let the control board sense the filament is out and the Marlin firmware will pause the print and enter filament change mode.
The WeMos mini publishes the filament status to Cayenne MQTT with simple digital output, 0 indicates the filament is normal and 1 indicates the filament has run out. The alert can be set in Cayenne to notify the user by email or SMS when Cayenne sees the status changes from 0 to 1.
The enclosure is fully 3D printed. The physical design of the enclosure allows simple assembly of the device with no screws. It also has a specially designed filament movement and detection mechanism which will ensure the reliable operation of the micro switch as well as the smooth filament movement. Additionally, the enclosure also allows simple installation of the device to the printer extruder using a piece of regular PTFE tubing.
Uses KW11-N micro limit witch (10x20mm) with roller arm. For 1.75mm filament.Posting to Cayenne
The Cayenne MQTT library is used to post messages to Cayenne. This project is based on the example provided with the library.Final assembly
The wiring is straightforward. Once complete the switch can be connected to the extruder with a 4mmx50mm PTFE tubing. Suitable for Titan extruder. The switch is bi-directional, you can also make a small adapter connects to the PTFE tubing to install the switch near your extruder or near the filament roll.