Topic: [WIP] Out of Filament Alarm - Auto-Pauses/Heater Shutoff when Idle
So as inspired in http://www.soliforum.com/topic/2266/hey … arm-175mm/ , I've been working on making this a reality. This code is shortly to be published over in my firmware thread at http://www.soliforum.com/topic/2470/bet … t-chg-etc/ , so to use this, you will need to download the code from that thread and compile it after tweaking the configuration.h to your needs/liking.
Basically the idea is to have the filament run through a guide with a fitted Microswitch (preferably with a Roller). You connect this microswitch using the normally closed pin to an input pin and ground. On the Sang you can do this to A4 and GND on the IO expansion section, on a RAMPS you can use say D63 and the GND next to it. Its set in the configuration file via FILAMENT_ALARM_PIN.
With filament passing over the switch, its inactive. Every 2500ms the firmware will check the status of the switch. If it detects that its gone low (pulled to ground), it triggers the filament alarm sequence.
First the printer will send a Pause to Repetier-Host. Then it will issue an M600 and return to Home based on what printer you have set in Configuration.h . Due to a current bug in my code I'm trying to resolve, the buffer ends up moving the head back over the workpiece - in the next version it should hopefully avoid this issue! .
Once parked, the printer will disable the extruder motor, allowing you to easily remove the existing filament that remains and insert and manually prime the new one.
If however you are not present, the printer will automatically disable the extruder heater after the preset time in PAUSE_HEATER_DELAY (default is 300 seconds or 5 mins). You will need to re-enable it when you return, as the host does not re-enable it automatically.
To restart printing, simply send M601 via the console and then click continue in repetier-host. Your print will now continue as before.
You can use this mechanism to also swap colours over mid-print - simply cut the filament near the extruder, and pull it out of the guide - this will cause the alarm to trip and begin the process.
To avoid the position being lost, once the alarm is tripped, it will wait 2.5 minutes before it will register resetting. This is to enable you to perhaps fumble feeding the filament without accidentally triggering another pause sequence
To mount the microswitch, I made up the attached guide/mount. I designed it to clip to the top frame of the SD - if you use an enclosure that covers the top or whatever, feel free to modify the sketchup/stl and post up your mods for others to use - My one is crap and was a quick job tonight to allow me to at least publish this much
If you don't want to do this using the filament guide, then just mount a momentary push button and connect it up - You can simply press this button for 2.5 seconds and you will trigger the filament change process!
I'm hugely open to suggestions and feedback here - on both the code in the firmware thread, or in here regarding the process/procedure. I'm also going to finalise very shortly the code to allow a seperate beeper (piezo actually) to be attached to pulse an alarm audibly to bring you back to the room - currently it can use the LCD's Beeper but I want a non-LCD solution for you all as well (for people like lawsy with the tablets etc).
Heres a quick demo video of the process at work; please note in the interests of me debugging this code still to iron out this buffering issue, the switch is mounted on the side of the SD frame and I manually trigger it by wrapping/unwrapping some tape. Obviously though you can see how that would normally be operating as part of the filament guide!