how to control router on/off



  • I have a WorkBee CNC router controlled by a Duet. All works fine apart from the human element, namely I have to remember to switch the router on via its mains switch. On several occassions I have started a cut only to watch my router dive into the work and almost destroy the WorkBee because I have forgottent to switch the router on.
    My plan is to control the router on/off with a relay control which I have already made. All I need now is a 24v or if necessary 5v source controlled by the Duet. Im considering picking up the 24v supply from heater 0 ( the 18amp). any controllable source will be OK.
    All I need is guidance on what M codes to use to do this. I intend to put these codes in the post processor of VCarve Pro.

    Thanks in advance


  • administrators

    Pick a spare heater or fan output and use it to drive the relay or SSR that controls the router. If using a heater output to drive a relay coil directly, you must add a flyback diode in parallel with the relay coil.

    You can control that output using M42 commands, see https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins.



  • @dc42 Thanks for the very speedy reply. Are the fan pins 24v ? or do I have to change relay


  • administrators

    @colin-kent said in how to control router on/off:

    @dc42 Thanks for the very speedy reply. Are the fan pins 24v ? or do I have to change relay

    The fan pins are VIN or 5V depending on the setting of the VFAN jumper.



  • Thank you. I will have a go and let you know when I get stuck



  • Could we control PWM or VFD that controls the spindle with this type of solution? anyone? I haven't tried this I am waiting until I gather enough information to know that I won't be wasting too much money in something that wont work. I am planning to build a delta style router for machining graphite for EDM work. Have a Duet Wifi 2 sitting around waiting for this. I promise I will post a video of this explaining my design if you help me :).



  • For me the solution turned out to be very simple. I used the fan0 connector and controlled it using M106 ie M106 S1 to turn on M106 S0 to turn off ( Fan0 being default) Works perfectly. All I need to do now is get the command, plus a short delay while the router runs up, into the Vcarve post processor. If anyone out there can give a pointer it would be appreciated.


  • administrators

    @joz9982 said in how to control router on/off:

    Could we control PWM or VFD that controls the spindle with this type of solution? anyone? I haven't tried this I am waiting until I gather enough information to know that I won't be wasting too much money in something that wont work. I am planning to build a delta style router for machining graphite for EDM work. Have a Duet Wifi 2 sitting around waiting for this. I promise I will post a video of this explaining my design if you help me :).

    Yes. You can buy PWM to 0-10V VFD converters.



  • The modification to the post processor is also quite simple just add the M106 commands in header and footer. works perfectly for me also controls my dust extractor


  • administrators

    @colin-kent said in how to control router on/off:

    The modification to the post processor is also quite simple just add the M106 commands in header and footer. works perfectly for me also controls my dust extractor

    You can also configure the fan output to respond to M3 and M5 spindle control commands.



  • @dc42 Thanks for that.


Log in to reply