I’m sure most of us do our 3D prints unattended and after the print, it will just leave the 3D printer there eating away at your electricity. There are similar mods around using end stops trigger or a timer, solutions that ain't neat. I did some searching and found the perfect electro mechanical device that can simply turn off your printer with the M81 gcode command and also a soft switch to turn on the printer just like on the desktop computer. The printer is completely shutoff with no stray or standby current. Here's how the auto shutdown looks like at the end of the print: https://youtu.be/3tQqf38rrog
Refer to the wiring diagram for build.
The essential part of this mod is the 5V Relay Module which is able to trigger on low signal. You can build one using an optocoupler but that's just too much work :P I got mine directly from Shenzhen, China at like USD $0.5 for a piece.
The wiring diagram (not drawn to standard) basically shows the connections, color coded to represent the labels and the corresponding connections.
The housing for the circuits and socket fits exactly between the joints on the rails if you are using the same instructions from spauda01’s wonderful D-Bot Core-XY printer. It will only fit if you have the exact space or more, not less.
The housing comes with a sliding lock lid so you don’t waste extra screws securing it.
The soft switch push button is 12mm diameter on the threaded part. If you are not able to get the exact one, you can just try to edit my STL files and fit a button to your liking, as long as it supports your AC power rating. The LED light connection for the button is optional, I left mine out.
Before turning on, the hard switch has to be at the ON position.
Turn on your printer by pushing the soft switch push button, hold for 1 or 2 seconds for the relay to trigger. Your printer should be turned on and running stable.
Using Repetier-Host, in Slic3r, go to ‘Configuration > Printer Settings > Custom G-code’. On the right, in the box ‘End G-code’, add in ‘M81’ on the last line. This command will send a HIGH signal from your RAMPS to the relay module that will cut off power to your printer.
At this point, any new print object you “slice” will turn off after the print. To disable just remove the M81 command line.
After the printer auto shutdown, turn on the printer again simply by pressing the soft switch push button.
- To turn off the printer at any time, you can only do it with the hard switch if it's a standalone unit. However it is possible to create a gcode file with just a M81 command in it, select that file for print and it will shutoff the printer.