I really want to use Octoprint for my Snapmaker A350, for all the reasons Octoprint is awesome.
The 2 features I really want is the filament runout sensor and power loss recovery - I know these aren’t currently available to 3rd party apps like Octoprint.
So, I decided to use the BigTreeTech Smart Filament sensor - it’s about $25 ($30 CAD) and hooked it up to my Pi. This unit is even more advanced in that if the filament isn’t moving, like if the head is jammed, it will also trigger, whereas other filament sensors just detect the presence of filament, whether it’s moving or not. If it triggers, the plugin will pause the print.
Here’s a guide to how I did it:
- Smart Filament sensor cable: take the 3 pin end of the cable and take out the connectors after seeing which is V, ground and signal - see picture
- Connect the 3 pins to your Pi GPIO pins. I used pin 1 for 3.3V, pin 9 for ground and pin 13 for signal
- In Octoprint, install the plugin Octoprint Smart Filament Sensor (Octoprint-Smart-Filament-Sensor)
- Configure the plugin: see my screenshot, but I need advice for the best pause command for Snapmaker 2.0.
- Make sure to press the “Save” button, then reload the plugin, and start the test to see if the filament movement is detected (I didn’t hit save before and it didn’t work til I did).
But, I’m wondering about these issues: help appreciated!
- What is the best Pause command for the Snapmaker 2? They offer M0 (stop), M1 (Sleep), M25 (Pause SD print), M226 (G-code pause), M600 (Filament change), M601 (Pause print)
- What Gcode is best for “After print job is paused” “resumed” or “cancelled”? Here’s what I have so far but not sure what I really should have:
After print job is paused
{% if pause_position.x is not none %}
; relative XYZE
G91
M83; retract filament of 0.8 mm up, move Z slightly upwards and
G1 Z+5 E-0.8 F4500; absolute XYZE
M82
G90; move to a safe rest position, adjust as necessary
G1 X0 Y0
{% endif %}
Before print job is resumed
{% if pause_position.x is not none %}
; relative extruder
M83; prime nozzle
G1 E-0.8 F4500
G1 E0.8 F4500
G1 E0.8 F4500; absolute E
M82; absolute XYZ
G90; reset E
G92 E{{ pause_position.e }}; WARNING!!! - use M83 or M82(extruder absolute mode) according what your slicer generates - S3D uses M82, ? Cura too?
;M83 ; extruder relative mode
M82; move back to pause position XYZ
G1 X{{ pause_position.x }} Y{{ pause_position.y }} Z{{ pause_position.z }} F4500; reset to feed rate before pause if available
{% if pause_position.f is not none %}G1 F{{ pause_position.f }}{% endif %}
{% endif %}
After print job is cancelled
; disable motors
M84;disable all heaters
{% snippet ‘disable_hotends’ %}
{% snippet ‘disable_bed’ %}
;disable fan
M106 S0
- Anyone have tips on how to do the filament change when it does run out? Should I do it using the Snapmaker’s own Filament change function or the filament change function within Octoprint?
===
I just got this working software wise but haven’t yet tested it with a live print, because I wanted suggestions for the pause and resume commands.