Switching on and off the high-voltage load using a relay

Hello, is there an opportunity in the firmware to establish such a contact that would simply turn on and off the actuator, and not regulate its power. I want to control a high-voltage load, such as an engraver, through a relay. It is only necessary by the command G-where to supply power to the engraver and by the command to turn off the power. And also when you press the “HALT” button, the power would turn off. Thanks.

1 Like

You can use something like an ssr to any one of the fan ports to control a number of mains voltage devices.

Looking specifically at Marlin firmway, you can use M106/M107 g-codes to turn on/off any fan pins (12V) on your board. In addition, you can use M42 g-code to set the state of any available pin (typically 5V or 3.3V). A number of people on this forum use this IOT relay. Others use relay modules like this or this, both are available in 12V and 5V models. And as Ryan mentions, an SSR relay like this one will also work and takes a range of input voltages.

I have my M106/M107 g-codes inserted automatically at the beginning and end of my g-code scripts.

Oh, I chose just this relay

:+1:. And I like the idea of the M42. Thanks.