Translate

Sunday, March 1, 2020

3D Printing - Adding Emergency Stop Button



Another article related to OctoPrint.

Sometime things can go wrong during a print.

If using OctoPrint to start/control a print, not always you can quickly go from the printer to the website in order to cancel the print and stop the printer.
Also using the printer console require some time to go on the stop.
Would be nice to have a Stop button.

IMPORTANT !  It is assumed OctoPrint is running on a Raspberry Pi connected to the printer !!

OctoPrint - adding STOP button






It can be very handy to have an emergency stop button capable to stop the printer in case something is going wrong.





Ideally pressing the stop button, would be nice to have these things to happens :

  • stop the current printing
    • stop heating bed
    • stop heating nozzle
  • move the Z axis up to 20 mm
  • move the Y axis up to 50 mm
Let see how to do that with OctoPrint.

Hardware

First of all we need a Stop button.
Many different choices, it can be bought or printed (on Thingiverse many projects for that).
Because I'm quite pragmatic, is more cheap and fast to buy one/use something I have around rather than print it out.

The choice of what button to use in the end depends where you want to place it.
For now I can just use the first pushbutton I have around in my junk box.

A couple of wires will be connected to the button to the GPIO of the Raspberry Pi running OctoPrint.

Schematic :
Schematic done using EasyEda


Connect the button to the Raspberry following the above schematic.

We are using the GPIO 17 on the Raspberry Pi.

Here's a prototype I did build to see if everything is working.

The prototype board with the two connectors, one for the temperature/humidity sensor (with a cable connected) and the one for the pushbutton (close to the resistor)

The pushbutton connected

Enclosure Plugin

To mange the button the enclosure plugin will be used (see also on Thingiverse), so first thing to do is to install it on OctoPrint.
Then some customizations are necessary.
Let see step by step what to do.


  • Go on the OctoPrint page and select Settings 
  • On the Plugin section, at the end (maybe is needed to scroll down) will be the Enclosure Plugin.
    Click on that
  • On the right will be possible to create an output setting or an input setting

  • Click on the button Add Inputs in the Raspberry PI Inputs section
  • Fill up the fields :
    • assign a name
    • leave the Input type as GPIO Input
    • select Action Type on Printer
    • Input IO number : 17
    • Input Pull Resistor : Pull
    • Event trigger : Fall
    • Printer Action : Printer Cancel
Save.

Now time to test.
Start a print then push the button. It should cancel the print.



No comments:

Post a Comment