Turning off printer
- Eaglezsoar
- ULTIMATE 3D JEDI
- Posts: 7159
- Joined: Sun Apr 01, 2012 5:26 pm
Turning off printer
I do prints at night and it would be nice to be able to completely turn off the printer AND computer after the print completes.
Has anyone seen a device that can do this or am I on my own to develop something?
Has anyone seen a device that can do this or am I on my own to develop something?
Re: Turning off printer
There are network controllable power strips that you could use. Would be kind of harsh to have the computer plugged into it as well, but I suppose you could do that
Or maybe just plug the printer into one and send the commands to it to shutdown the printer then do a cleaner shutdown of the computer (how you do that would depend on what OS you're running).

- Eaglezsoar
- ULTIMATE 3D JEDI
- Posts: 7159
- Joined: Sun Apr 01, 2012 5:26 pm
Re: Turning off printer
I did not know IP controlled power strips were available and present interesting possibilities, thank you.dpmacri wrote:There are network controllable power strips that you could use. Would be kind of harsh to have the computer plugged into it as well, but I suppose you could do thatOr maybe just plug the printer into one and send the commands to it to shutdown the printer then do a cleaner shutdown of the computer (how you do that would depend on what OS you're running).
Re: Turning off printer
not only network controlled power strips, but also motion controlled strips.. put the sensor within sight of the hot end motion and once it stops power should shut down within a few minutes.
Last edited by bubbasnow on Wed Oct 23, 2013 12:05 am, edited 1 time in total.
- Eaglezsoar
- ULTIMATE 3D JEDI
- Posts: 7159
- Joined: Sun Apr 01, 2012 5:26 pm
Re: Turning off printer
Another good idea, thanks.bubbasnow wrote:not only network controlled power strips, but also motion controlled strips.. put the sensor within site of the hot end motion and once it stops power should shut down within a few minutes.
Re: Turning off printer
I know this isn't fully what you are looking for, but I setup a latch-and-hold circuit on the power-pin. This way, after issuing the M80 command (or pressing the Power toggle button in Repetier Host), I have to press a momentary button to latch the main power circuit (both heaters *and* the power supply mains are all on separate relays activated by the latch - I've got 6 small relays for power control - 2 mains, 2 heaters, 1 latch, 1 auxiliary 12V). In my slic3r post-print commands I wait for a cool-down with M109 R59 (my hot-end cooling fan is set for 60 degrees, this ensures the hot-end has cooled sufficiently) and then issue M81 to turn off the power at which point the only thing left running is the PC and the Arduino. It's not full-off, but the lowest power state I can automatically achieve at this moment.
While this same approach can be done without the latch circuit, it provides a bit of safety and peace of mind when operating unattended.
I have a plan to use an ATTiny with V-USB to emulate a keyboard, pressing the KEY_SLEEP or KEY_POWER to issue a shutdown when printing is finished. I've added it to my to-do list
While this same approach can be done without the latch circuit, it provides a bit of safety and peace of mind when operating unattended.
I have a plan to use an ATTiny with V-USB to emulate a keyboard, pressing the KEY_SLEEP or KEY_POWER to issue a shutdown when printing is finished. I've added it to my to-do list

My Thingiverse profile: http://www.thingiverse.com/edwardh
- Eaglezsoar
- ULTIMATE 3D JEDI
- Posts: 7159
- Joined: Sun Apr 01, 2012 5:26 pm
Re: Turning off printer
Most of my career before retirement was in electronics so I understand what you did. I have decided to go with the motion detector power strips which do require a control device that turns onedward wrote:I know this isn't fully what you are looking for, but I setup a latch-and-hold circuit on the power-pin. This way, after issuing the M80 command (or pressing the Power toggle button in Repetier Host), I have to press a momentary button to latch the main power circuit (both heaters *and* the power supply mains are all on separate relays activated by the latch - I've got 6 small relays for power control - 2 mains, 2 heaters, 1 latch, 1 auxiliary 12V). In my slic3r post-print commands I wait for a cool-down with M109 R59 (my hot-end cooling fan is set for 60 degrees, this ensures the hot-end has cooled sufficiently) and then issue M81 to turn off the power at which point the only thing left running is the PC and the Arduino. It's not full-off, but the lowest power state I can automatically achieve at this moment.
While this same approach can be done without the latch circuit, it provides a bit of safety and peace of mind when operating unattended.
I have a plan to use an ATTiny with V-USB to emulate a keyboard, pressing the KEY_SLEEP or KEY_POWER to issue a shutdown when printing is finished. I've added it to my to-do list
the strip, after 30 minutes without movement it turns off everything but the master control device which is normally a computer so everything gets powered down except the computer. I am going
to develop a simple control device that draws only 22 watts of power (the minimum that the strip will activate with) then everything (computer, printer) gets powered down after 30 minutes of no
hotend movements. There is a myriad of strips out there but they can get amazingly expensive depending on features. I have purchased the 30 minute one for $40 and I will use it for experimenting.
Once I get everything working to my satisfaction I would like to do a write up and give everyone the details on how to do it on their machines.
Bubbasnow gave me the idea and I would like to thank him for that. It will be my luck a stupid mouse gets in the printer room and runs around in circles getting detected as printer being on.

Re: Turning off printer
Eagle,
The RAMBo board has a PSU input connector to connect the green/blk wires to. From there, you can send M80/M81 to toggle the PSU on/off, so in your gcode, the ending gcode would have M81, which would power off the PSU. I havn't done it myself but i know it's there
The RAMBo board has a PSU input connector to connect the green/blk wires to. From there, you can send M80/M81 to toggle the PSU on/off, so in your gcode, the ending gcode would have M81, which would power off the PSU. I havn't done it myself but i know it's there
- Eaglezsoar
- ULTIMATE 3D JEDI
- Posts: 7159
- Joined: Sun Apr 01, 2012 5:26 pm
Re: Turning off printer
Thanks for the info, I did not know that and that I can put to good use. I have ideas going through my head now, you have definitely simplifiedjohnoly99 wrote:Eagle,
The RAMBo board has a PSU input connector to connect the green/blk wires to. From there, you can send M80/M81 to toggle the PSU on/off, so in your gcode, the ending gcode would have M81, which would power off the PSU. I havn't done it myself but i know it's there
my project with that information. Thanks again!
Re: Turning off printer
So if you put green wire on the PS_on, you need to power the RAMBo with the USB cord? how is sd card printing accomplished in this configuration?
[img]http://reprap.org/mediawiki/images/5/5c ... nn-all.jpg[/img]
[img]http://reprap.org/mediawiki/images/5/5c ... nn-all.jpg[/img]
- Eaglezsoar
- ULTIMATE 3D JEDI
- Posts: 7159
- Joined: Sun Apr 01, 2012 5:26 pm
Re: Turning off printer
This is not documented that well but I think what it is trying to say is that if you are using the 5 volt pin then the power supply jumper must not be installed. This has nothing tobubbasnow wrote:So if you put green wire on the PS_on, you need to power the RAMBo with the USB cord? how is sd card printing accomplished in this configuration?
[img]http://reprap.org/mediawiki/images/5/5c ... nn-all.jpg[/img]
do with the PS_ON they are separate entities and have nothing in common, they just squeezed two separate statements in that small box. This is my interpretation but I may be
wrong. I need to do testing to determine if how I read it is correct.
Re: Turning off printer
Careful, the green wire is 5v, i wouldn't stick in anywhere its not supposed to go. by reading that block i was under the impression that the PS_ON switches the PSU on and off by controlling the greens wire access to a ground. IF that was true, the RAMBo would need power from another source (or the always live wire from the PSU) in order to issue the command to turn on the PSU. I too am interested in a command that could be issued after a long print in the middle of a day or late at night that would power down the printer.
- Eaglezsoar
- ULTIMATE 3D JEDI
- Posts: 7159
- Joined: Sun Apr 01, 2012 5:26 pm
Re: Turning off printer
You bring up good points and I will be careful. Documentation is really poor for this area of the board but with the proper testing I will determine how it works.bubbasnow wrote:Careful, the green wire is 5v, i wouldn't stick in anywhere its not supposed to go. by reading that block i was under the impression that the PS_ON switches the PSU on and off by controlling the greens wire access to a ground. IF that was true, the RAMBo would need power from another source (or the always live wire from the PSU) in order to issue the command to turn on the PSU. I too am interested in a command that could be issued after a long print in the middle of a day or late at night that would power down the printer.
They put the pins on the card, they assign firmware commands to utilize these pins to turn off the power supply but facts or docs beyond that are really lacking.
I remember from my days in the Navy where everything had to be fully documented, now it's like pulling teeth sometimes to get information from some
manufacturers. I am too busy with other projects to stop everything and test just how the PS_ON works but I will get to it. Thanks for your advise.
Re: Turning off printer
What's documentation?
I hate how many manuals now have more legalese in them than relevant information.
I hate how many manuals now have more legalese in them than relevant information.

Re: Turning off printer
I'd have to think about it a bit more, but I'm sure you could devise some sort of dual-path latching circuit that allows manual power-on, but can be automatically powered off via the PS_ON pin. I'm pretty sure that's essentially how a PC handles things, although without a relay.
I see it as requiring the user to push a momentary button, which bypasses the latching relay, to activate the PSU, at which point the PS_ON output takes over the power circuit by activating the latch. On ATX PSUs, the "power" pin, i.e., the green wire, must stay at ground to maintain the on state.
These are the type relays that I'm using, FYI: http://goo.gl/lavccq
You can get them on Amazon, eBay, all over the place, really. They come in single to sixteen unit modules. They switch on Active LOW, so they work nice for this application.
Edit: Already I don't even think you would need a latch. Just a single relay, activated by the PS_ON pin, through which the green ATX wire is connected to GND via the NO contact (thus, when the relay is activated, the NO circuit closes and connects the green ATX wire to ground, maintaining the on state for the PSU).
I see it as requiring the user to push a momentary button, which bypasses the latching relay, to activate the PSU, at which point the PS_ON output takes over the power circuit by activating the latch. On ATX PSUs, the "power" pin, i.e., the green wire, must stay at ground to maintain the on state.
These are the type relays that I'm using, FYI: http://goo.gl/lavccq
You can get them on Amazon, eBay, all over the place, really. They come in single to sixteen unit modules. They switch on Active LOW, so they work nice for this application.
Edit: Already I don't even think you would need a latch. Just a single relay, activated by the PS_ON pin, through which the green ATX wire is connected to GND via the NO contact (thus, when the relay is activated, the NO circuit closes and connects the green ATX wire to ground, maintaining the on state for the PSU).
Last edited by edward on Fri Oct 25, 2013 1:58 pm, edited 1 time in total.
My Thingiverse profile: http://www.thingiverse.com/edwardh
- foshon
- Printmaster!
- Posts: 600
- Joined: Fri Mar 08, 2013 3:05 pm
- Location: Just to the right of SeeMeCNC
Re: Turning off printer
I don’t have experience with the type of networked power strip being talked about, generally speaking turning off power to a computer by removing power immediately is a bad idea. Hard drives write and read data even while inactive, if power is removed with the head not parked it will drop onto the spinning platter. I used to repair computers, made some serious cash because of power outages that happened before the machine was shut-down improperly. If this is not what you are talking about doing then never mind me.
Purple = sarcasm
Please do a board search before posting your question, many have been answered with very time consuming detail already.
Please do a board search before posting your question, many have been answered with very time consuming detail already.
Re: Turning off printer
What amazed me when fixing computers was how many people that lived near hospitals would go through power supplies, it wasn't uncommon for them to go bad every 3 months until they put it through a UPS.
- Eaglezsoar
- ULTIMATE 3D JEDI
- Posts: 7159
- Joined: Sun Apr 01, 2012 5:26 pm
Re: Turning off printer
You are quite right Neal and you were right to point that out. The newer drives and SSD drives no longer have that problem but you must be careful not to run a write back cache. Iffoshon wrote:I don’t have experience with the type of networked power strip being talked about, generally speaking turning off power to a computer by removing power immediately is a bad idea. Hard drives write and read data even while inactive, if power is removed with the head not parked it will drop onto the spinning platter. I used to repair computers, made some serious cash because of power outages that happened before the machine was shut-down improperly. If this is not what you are talking about doing then never mind me.
data is stored in the cache and has not been written to the disk when the power loss occurs you are gonna be a hurtin frog. Thanks for reminding me and it's good to see you on the
board participating. I don't see you as much lately.
Re: Turning off printer
Set the idle timeout in EEPROM to something like ten minutes and just leave the Rostock on. The RAMBo's power draw is probably somewhere around 500 milliamps at most. 500mA@12V is about the same as several night lights. As long as the idle timeout deactivates the heated bed and hot end, you're good. (Unless you don't trust it to run unattended without catching fire. Then there is no solution)
The computer is more difficult. You have a couple of options, set up an automated job to put the computer into sleep mode at a certain time (by which you know the print will either be done or ruined) or figure out a way to get Repetier to call a batch file when it's finished that puts the computer to sleep. Or just put the job on an SD card and be done with it?
In no case should you power off a Windows, Mac, or Linux machine by removing power. The filesystem journal is there to protect you against occasional accidents and it DOESN'T always work. If you do that every day you will multiply your chance of a corrupt FS exponentially. The one exception would be if you were running the OS off a "live CD" (or live USB key) as you can with Ubuntu and some other Linux platforms. In that case it doesn't matter because it doesn't involve the hard drives.
The computer is more difficult. You have a couple of options, set up an automated job to put the computer into sleep mode at a certain time (by which you know the print will either be done or ruined) or figure out a way to get Repetier to call a batch file when it's finished that puts the computer to sleep. Or just put the job on an SD card and be done with it?
In no case should you power off a Windows, Mac, or Linux machine by removing power. The filesystem journal is there to protect you against occasional accidents and it DOESN'T always work. If you do that every day you will multiply your chance of a corrupt FS exponentially. The one exception would be if you were running the OS off a "live CD" (or live USB key) as you can with Ubuntu and some other Linux platforms. In that case it doesn't matter because it doesn't involve the hard drives.
Questions? Ask in a thread - PMs are off.
AI Calibration | Dimensional Accuracy Calibration | Hand-Tune your PID | OctoPi + Touchscreen setup | My E3D hot end mount, Z probe, fan ducts, LED ring mount, filament spool holder, etc.
AI Calibration | Dimensional Accuracy Calibration | Hand-Tune your PID | OctoPi + Touchscreen setup | My E3D hot end mount, Z probe, fan ducts, LED ring mount, filament spool holder, etc.
Re: Turning off printer
626Pilot wrote:Set the idle timeout in EEPROM to something like ten minutes and just leave the Rostock on. The RAMBo's power draw is probably somewhere around 500 milliamps at most. 500mA@12V is about the same as several night lights. As long as the idle timeout deactivates the heated bed and hot end, you're good. (Unless you don't trust it to run unattended without catching fire. Then there is no solution)
The computer is more difficult. You have a couple of options, set up an automated job to put the computer into sleep mode at a certain time (by which you know the print will either be done or ruined) or figure out a way to get Repetier to call a batch file when it's finished that puts the computer to sleep. Or just put the job on an SD card and be done with it?
In no case should you power off a Windows, Mac, or Linux machine by removing power. The filesystem journal is there to protect you against occasional accidents and it DOESN'T always work. If you do that every day you will multiply your chance of a corrupt FS exponentially. The one exception would be if you were running the OS off a "live CD" (or live USB key) as you can with Ubuntu and some other Linux platforms. In that case it doesn't matter because it doesn't involve the hard drives.
with the @host commands you could easily run a batch or regular command line like shutdown -s at the end of a job and it will shut down the computer
Re: Turning off printer
I'm currently looking into a way to achieve the very same thing.
Did anyone manage to do it ?
I intend to print from SD, wait for cool down, then turn off the printer using M81 command.
Some very good information have already been given here, and that's a good starting point.
Did anyone manage to do it ?
I intend to print from SD, wait for cool down, then turn off the printer using M81 command.
Some very good information have already been given here, and that's a good starting point.
Re: Turning off printer
Ive done this using RaspberryPi and a logic controlled relayenggmaug wrote:I'm currently looking into a way to achieve the very same thing.
Did anyone manage to do it ?
I intend to print from SD, wait for cool down, then turn off the printer using M81 command.
Some very good information have already been given here, and that's a good starting point.
Re: Turning off printer
EDIT >> I removed my message, as the "solution" I described does not work.
It is not destructive, as far as my machine knows, but it does not achieve the desired function...
It is not destructive, as far as my machine knows, but it does not achieve the desired function...