Powering off Duet wifi via an M code
-
I wish my machine to switch off after completing a print. My machine has a built in contactor which I activate by a push switch.. I need a way to power an electronic relay which will interrupt the contactor`s solenoid in turn switching off the machine. I have read various ideas but I am afraid to put my board in jeopardy risking burning something. I use simplify 3D which lets the machine switch off heaters etc and the idea is to add another M code which will activate this relay and switch everything off. Thanks for any ideas.
-
@mendelevium
You can do this with the PS-ON pin. It is described here. Instead of just turning off the power supply, you can also turn off the power to the whole machine.
In combination with a smart home switch you can also boot.
This is what I do. Smart Remote Power Control
This is otherwise only possible when 5V is applied permanent to the Duet board. -
@DIY-O-Sphere
Thanks for this. Basically you have figured out a good way to meet your needs. Can you please confirm what I have understood....I wish to understand this.
from the circuit you have, the center pin (PS-ON) pin will pulse a ground signal. when you send M81 it is switched off and M80 is switched on right? I will figure out how to go round this... Your diode is just a protection right? I think you have explained the method nicely. Well done and thanks for sharing> -
@mendelevium
You got it right.Edit:
Except that you can not switch on the printer with M80. This must be done with the push button or the smart home switch. -
@mendelevium
Basically, the PS-ON pin supplies a switched negative ground. Taking a positive from the PSU 12v provides a supply of 12vdc. I use simplify 3d so I put M80 in my start script when a print is started and M81 when a print is finished after all cools down and machine returns to idle state. This can be used to trip my contactor and switches everything off. Thanks for the tip DIY-O_Sphere. -