User avatar
Posts: 286
Joined: Wed Nov 14, 2012 9:34 am
Location: Potton, Bedfordshire
Contact: Website Facebook Twitter

3D printer and Raspberry Pi power control

Wed Apr 24, 2019 4:27 pm

Hi all,
Over on a Facebook group, we've been having a discussion about controlling power to a 3D printer and a Raspberry Pi from a common source.
Rather than figure out some way of using a buck converter to power the Pi *from* the printer, my preferred solution is to do it from the mains in some way. I'm especially not wanting to corrupt the Pi's SD card, as I'm sure you can appreciate.

My thinking is this:
1. Power both the 3D printer and the Pi from an Energenie plug (or 4-way strip).
2. Have a GPIO button on the Raspberry Pi.
3. When pressed, the button tells the Pi to shut itself down cleanly.
4. The Pi shuts itself down cleanly, *but* it triggers the Energenie to shut itself off just before the Pi is no longer in a state to do anything.

My question is: Is there a way for the Pi to send a command to an Energenie plug AFTER it's finished writing everything to the SD card but BEFORE it shuts down completely? I know there's all kinds of levels of Boot process, but is there a way to get the Pi to know where it is in the Shutdown cycle?

Hope someone can help! :-)
Michael Horne - @recantha
Raspberry Pi blog -

Cambridge Raspberry Jam
Follow the Cambridge Raspberry Jam on Twitter - @cambridgejam

User avatar
Posts: 2542
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: 3D printer and Raspberry Pi power control

Wed Apr 24, 2019 6:44 pm

I'd just leave the Raspberry Pi on, and switch the printer via X10 (like I currently do) or a GPIO-controlled power outlet (like I probably should). There are nice programmable power switches that have one always-on outlet for running the server from.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.


Re: 3D printer and Raspberry Pi power control

Wed Apr 24, 2019 6:59 pm

You can get some very very smart rack power strips (PDUs) designed exactly for this type of task giving TCP/IP control, monitoring, web view, timed on / off and delays in shutdown BUT they are not cheap (even compared to the blade systems on the end of them) :shock:

I would just pop the printer into one of these and just turn the Pi off with the Shutdown command as normal.

Return to “General discussion”