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.
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
. And I like the idea of the M42. Thanks.
I tried the M42 command, but no matter which pin I tried to control, the all work as PWM. With M42 and S255, the output is slightly more than 3 volts. This is not enough to turn on the relay. Is there a parameter in the firmware that a certain pin can be configured so that at S0 it is completely turned off, and at S1 5 volts are fully turned on.