Issue a pause command from sensors

The place to discuss your hardware and software/firmware modifications...
Post Reply
corsecprops
Posts: 6
Joined: Thu Dec 22, 2016 8:46 pm

Issue a pause command from sensors

Post by corsecprops » Fri Feb 24, 2017 5:40 am

So I've been wondering if I can issue a pause or even a full stop command to the hardware from an external source. I'm not seeing any I/O on the board but I'm also not sure if I can inject a pause command through Gcode on the LCD interface. It would require a small microcontroller external to the machine to generate the gcode and restarting might be tricky but before I dig deeper I wanted to see if others have an idea of if its even possible.

I have considered building an alarm system for the machine. I want to monitor the filament. I can add a small switch to the filament feeder at the back and have it trigger when there isn't any filament available. Still gives me a few mins if its just an auditory and light alarm so I don't lose the print. The other sensor will be on the filament holder. If I get a tangle then the spool lifts and I can trigger an alarm when its no longer touching the top of the holder. Both of these alarms are more powerful if I can record the position of the Gcode and issue a retraction script that will pull the filament back and pause the printer. I can then fix the problem and resume from that gcode position. I'm a Gcode noob so some of this might be crazy talk or require a complete inline external gcode processor. (basically I'd be rolling my own LCD module) Which I might be ok with because that would allow me to send the gcode through the SPI port and maybe make it so that I can push new code to the card through another USB port to the SD card. No need to remove it for file transfers. It would probably require some interesting code to prevent overwriting a file being accessed and sent to the machine but seems doable. Now finding the time to program it all and being willing to test it on a machine I need for my business will be interesting but its something to think about while laying in bed hoping my print doesn't fail :)

User avatar
atomic_peach
Posts: 37
Joined: Sun Dec 04, 2016 2:14 am
Location: Philadelphia, PA

Re: Issue a pause command from sensors

Post by atomic_peach » Sat Feb 25, 2017 12:33 am

Since you bring up adding a microcontroller outside the machine, have you looked into Octoprint? They support filament sensors and given it is open source you can add in the spool tangle sensor. Octoprint will be your printer controller and deliver any GCode for the print (i.e. same as printing over USB). I like Octoprint since I can control my printer via my desktop in another room, laptop wherever, or my phone. I also have a webcam set up to monitor it remotely since I don't have any sensors. There are a few threads about this floating around here somewhere.

User avatar
insta
Posts: 2007
Joined: Tue Sep 16, 2014 3:59 am

Re: Issue a pause command from sensors

Post by insta » Sat Feb 25, 2017 10:26 pm

Marlin already supports this. You can use an optical sensor and one of the MAX endstops. It will pause the print for you when you're out of filament.
Custom 3D printing for you or your business -- quote [at] pingring.org

corsecprops
Posts: 6
Joined: Thu Dec 22, 2016 8:46 pm

Re: Issue a pause command from sensors

Post by corsecprops » Sun Feb 26, 2017 5:38 am

I assume you mean the Max End stops that are marked as unused on the board. How do I start it again after triggering the pause? Does clearing the issue start it over again?

If it just pauses like when I hit pause in Simplify3D then it will not retract the filament and result in a glob of filament on the print. That is not desirable and probably means the print is lost anyway as I can't continue it. Using the simplify interface I have paused and then moved using the jog commands to replace the spool. So it would be great to issue a few commands and cause the machine to retract or just move off the print with no extrusion. Then I can fix the problem and start it over.

Post Reply