Pauses or stops OctoPrint if the 3D printer filament jams or runs out
- Purchase:
1.1) Quadrature encoder. The STL files are designed for the "Signswise 600p/r Incremental Rotary Encoder Dc5-24v Wide Voltage Power Supply 6mm Shaft" [Amazon link]
1.2) M3-0.5 x 20mm screws [Amazon link]
1.3) Adafruit Metro Mini 328 - 5V 16MHz [Adafruit link]
1.4) Optional: 2 x 0.1" pitch header blocks [Adafruit link]
-
Print the base and wheel to hold the encoder in place.
-
Optional: 3D print the mini metro enclosure
-
Wire up the Metro Mini 328 to the encoder, optionally soldering on the header blocks first:
4.1) Encoder red (power) - 5V
4.2) Encoder black (ground) - GND
4.3) Encoder green (output 1) - digital pin 3
4.4) Encoder white (output 2) - digital pin 2
-
Connect the Metro Mini by USB to the computer running OctoPrint. Attach the wheel to the encoder and place it in the base. Feed the filament through the base.
-
Check out this git repository onto the computer running OctoPrint.
git clone https://github.com/rllynch/filament_watch.git
- Compile and flash arduino/filament_watch/filament_watch.ino into the Metro Mini using either the Arduino IDE, or the command line scripts shown below:
cd filament_watch/arduino
./setup.sh
./upload.sh
cd ../..
- Recommended: create a virtualenv for filament_watch and activate it
virtualenv filament_watch_env
. filament_watch_env/bin/activate
- Install filament_watch
cd filament_watch
python setup.py install
- Go to Settings in OctoPrint and in the API page, note the API key, enabling it if necessary. Launch filament_watch with --apikey argument, supplying the API key, and an open TCP port for the web interface.
filament_watch --apikey 11111111111111111111111111111111 --httpport 8081
- Point a web browser at the selected port and start a print. The graph will show the actual movement of the filament graphed against the movement specified in the gcode (averaged over two minutes). If the two lines approximately track each other, then filament_watch is working correctly.