Adding Control Switches to Printer


Just wanted to know if anyone knew of a way to add some switches to the spare pins on my rumba printer so that when the print finishes it would leave the heater bed enabled, or another one that would automatically shut down after completion?
Say i was in the garage and a print only took less then half hour, and i went inside for tea, the printer would finish and the bed would turn off and cool down, not so much of in issue if the bed didn't take upwards of 30min to heat up.
Or if i was going to bed, i could flick another switch which would turn off the PSU when finished.

Any help is greatly appreciated!


  • This is detemined by your gcode. Slicer normally add a set bet to 0 command at end. If you remove it it would skip that, so you would need to disable it manually. But you can not say ignore it or not.

  • Would it be possible to check the switch at the end of every print and if it is on then set bed temp to 100c if not turn off?
    I print from sd card and am usually 50% the way through a print when i decide to go to bed.

    Thanks again
  • So i did some digging and have found events.
    is there a way to get print complete event or use the kill steppers event and then have the event run custom code that checks the status of the 2 switches, if the power is off then it just turns the power supply off and ends there or if the bed one is on then turn the bed back on to 100c?
  • No event, but you could just implement it e.g. in 100MS timer. Check


    if it is 0 no sd print is running. So add a flag was printing using this and check if printing is finished and then disable depending on your switch state.

  • i will give that a try when i get a chance, i also saw in the events.h

    // Allow adding new G and M codes. To implement it create a function
    // bool eventUnhandledGCode(GCode *com)
    // that returns true if it handled the code, otherwise false.
    // Event define would then be
    // #define EVENT_UNHANDLED_G_CODE(c) eventUnhandledGCode(c)
    #define EVENT_UNHANDLED_G_CODE(c) false
    #define EVENT_UNHANDLED_M_CODE(c) false

    Does that mean i could create a gcode that i can add into the end of every file that i put on the sd card that runs after the print has finished?
  • Yes, if G/M code is not detected it will call that event so you can implement additional codes like disable if switch is on/off.
Sign In or Register to comment.