Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    how to control router on/off

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    8
    21
    1.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Colin Kentundefined
      Colin Kent
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        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.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        Colin Kentundefined 1 Reply Last reply Reply Quote 0
        • Colin Kentundefined
          Colin Kent @dc42
          last edited by

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

          dc42undefined 1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @Colin Kent
            last edited by

            @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.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • Colin Kentundefined
              Colin Kent
              last edited by

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

              1 Reply Last reply Reply Quote 0
              • joz9982undefined
                joz9982
                last edited by

                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 :).

                dc42undefined 1 Reply Last reply Reply Quote 0
                • Colin Kentundefined
                  Colin Kent
                  last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators @joz9982
                    last edited by dc42

                    @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.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    1 Reply Last reply Reply Quote 0
                    • Colin Kentundefined
                      Colin Kent
                      last edited by

                      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

                      dc42undefined 1 Reply Last reply Reply Quote 0
                      • dc42undefined
                        dc42 administrators @Colin Kent
                        last edited by

                        @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.

                        Duet WiFi hardware designer and firmware engineer
                        Please do not ask me for Duet support via PM or email, use the forum
                        http://www.escher3d.com, https://miscsolutions.wordpress.com

                        Colin Kentundefined HalifaxAlexundefined 2 Replies Last reply Reply Quote 0
                        • Colin Kentundefined
                          Colin Kent @dc42
                          last edited by

                          @dc42 Thanks for that.

                          1 Reply Last reply Reply Quote 0
                          • HalifaxAlexundefined
                            HalifaxAlex @dc42
                            last edited by HalifaxAlex

                            @dc42 how does one configure a fan output to respond to M3 and M5? Can that be used in conjunction with using a heater output to also respond to M3 and M5? RRF 2.

                            droftartsundefined 1 Reply Last reply Reply Quote 0
                            • droftartsundefined
                              droftarts administrators @HalifaxAlex
                              last edited by

                              @halifaxalex You set the spindle output pin in the M453 command that switches the Duet to CNC mode: https://duet3d.dozuki.com/Wiki/Gcode#Section_M453_in_RepRapFirmware_1_x_and_2_x

                              Then you can use M3, M4 and M5: https://duet3d.dozuki.com/Wiki/Gcode#Section_M3_Spindle_On_Clockwise_CNC_specific_Laser_on_Laser_specific

                              You can map up to four spindles in RRF. Use M453 S parameter for each one. You should be able to use fan and heater outputs; refer to the following document for pin numbers as you're using RRF2 (update to 2.05.1 for bug fixes if still on an earlier version). Don't forget to disable the corresponding heater (using M307) or fan (using M106) first.
                              https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins#Section_Logical_pin_numbers

                              I don't think you can run the fan output 'in conjunction' with a heater output, and have them both respond to the same M3/4/5 command. You need to have a separate M3/4/5 command for each spindle if you wanted them both running at the same time. But as M3/4/5 only turn the spindle on and off, I don't think this is a problem.

                              See this for general guidance for setting up a CNC machine: https://duet3d.dozuki.com/Wiki/Configuring_RepRapFirmware_for_a_CNC_machine

                              Ian

                              Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                              Tyzundefined 1 Reply Last reply Reply Quote 0
                              • Tyzundefined
                                Tyz @droftarts
                                last edited by

                                @droftarts I've had a look through some of this and the links you have provided, I can see how to output the PWM signal and configure it using M453 but cant see how to configure it to make M3/4/5 as well to control the ON/OFF of an output pin of my choosing. It would also be useful to configure other M codes to switch outputs for say a vacuum or air mist compressor.

                                dc42undefined 1 Reply Last reply Reply Quote 0
                                • dc42undefined
                                  dc42 administrators @Tyz
                                  last edited by dc42

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

                                  @droftarts I've had a look through some of this and the links you have provided, I can see how to output the PWM signal and configure it using M453 but cant see how to configure it to make M3/4/5 as well to control the ON/OFF of an output pin of my choosing.

                                  You can do that using RRF3 but not with RRF2.

                                  It would also be useful to configure other M codes to switch outputs for say a vacuum or air mist compressor.

                                  For any M-code that RRF does not implement at all, you can create a macro file that is executed when you send that code. For example, if you want to implement NIST code M8 (flood coolant on), create a file called M8.g in the /sys folder, and inside that file put the commands that you want to execute in response to M8.

                                  Duet WiFi hardware designer and firmware engineer
                                  Please do not ask me for Duet support via PM or email, use the forum
                                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                                  Tyzundefined 1 Reply Last reply Reply Quote 0
                                  • Tyzundefined
                                    Tyz @dc42
                                    last edited by

                                    @dc42 Thank you, I had seen that I could create files for the unsupported M codes in the /sys folder. It does however seem very lacking for support of M3/4/5 codes when they've been implemented in to RepRap but don't actually do anything like switching a pin/port on/off to actually control a spindle. The only way to do this now is to modify a post processor to use the non standard commands for a spindle such as M7/8/9 which are normally used for coolant/air mist or M10/11 which are normally used for CNC axis clamping.
                                    Thank you.

                                    jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                                    • jay_s_ukundefined
                                      jay_s_uk @Tyz
                                      last edited by

                                      @tyz they do turn on the router/spindle if you run RRF3.

                                      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                      Tyzundefined 1 Reply Last reply Reply Quote 0
                                      • Tyzundefined
                                        Tyz @jay_s_uk
                                        last edited by

                                        @jay_s_uk I know, but that's no use to me as my Duet from Ooznest doesn't have RRF3 on it.

                                        jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                                        • jay_s_ukundefined
                                          jay_s_uk @Tyz
                                          last edited by

                                          @tyz but its fairly easy to upgrade and there is now a CNC version of DWC for RRF3

                                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                          Tyzundefined 1 Reply Last reply Reply Quote 0
                                          • Tyzundefined
                                            Tyz @jay_s_uk
                                            last edited by

                                            @jay_s_uk It may be if you know what your doing, but the configuration on this is done by Ooznest and I don't know what else would have to be reconfigured as a result of differences between RRF2 & RRF3, some commands are different and others have the functionality moved to a different M code.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA