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

Duet 3 spindle configuration via SSR

Scheduled Pinned Locked Moved
CNC
2
6
264
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.
  • undefined
    bOesu
    last edited by 17 Feb 2025, 20:17

    Hey all

    I am setting up a Ratrig Stronghold One CNC-Router with a duet 3 6HC board. So far I had a lovely journey and the forum here helped me out several times already. But now I am stuck with a stupid simple problem: I cannot get my spindle to switch on =). Spindle is maybe also not the right word. Currently I am trying to set up everything for my Makita router which is wired via an SSR.

    Some detail information about my setup:

    • Firmware: RepRap Firmware 3.5.4
    • Board: Duet 3 6HC with a raspberry Pi 4B
    • Control: Via DWC for CNC (no screen)

    Initially I set up the Firmware with the RRF Configuration tool but I have made quite some changes since. I installed two SSR's which are connected to the out7- and out8-pins on the duet. One is controlling a shop vac, the other should control my makita router which a use as a spindle for now. The SSR for the shop vac works flawlessly, it is set up as follows:

    ; Solid state relais Vacuum
    M950 P4 C"out7" ; allocate GPIO port out7 to the SSR for vacuum control
    M42 P4 S0 ; set status of the earlier created GPIO port P4 (out7) to off

    If I set up the spindle in the same manner, this also works fine, but M3/M5 does not work. If i try to set up the spindle properly and define a tool for it, nothing works anymore. I cannot start the spindle with M42 nor does M3/M5 work. I add my spindle config below. Feel free to roast me =). What did I do wrong? Please HEEEEEELP 😃

    ; Spindle
    M453 ; select CNC mode
    M950 R1 C"out8" ; create Spindle 0 and map it to the pin out8 (SSR)
    M563 P1 S"Spindle" R1 ; Map Spindle 0 to Tool 3 and call it "Spindle"
    T1 ; activate Tool 3
    M3 S0 ; Switch spindle on at 0rpm (needed?)
    M5 ; switch spindle off

    undefined 1 Reply Last reply 17 Feb 2025, 21:06 Reply Quote 1
    • undefined
      jay_s_uk @bOesu
      last edited by 17 Feb 2025, 21:06

      @bOesu

      C can have 1, 2 or 3 pins.
      The first pin defines a pwm-capable pin to set the spindle speed.
      If a second pin is defined it is used as spindle on/off.
      If a third pin is defined it is used as spindle forward/reverse.

      Basically you're using an on/off pin but trying to set it up as a pwm pin.
      Try something like

      M950 R1 C"out9+out8"
      

      Assuming you aren't using out9

      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

      undefined 1 Reply Last reply 19 Feb 2025, 12:49 Reply Quote 0
      • undefined
        bOesu @jay_s_uk
        last edited by 19 Feb 2025, 12:49

        @jay_s_uk

        This sound good, thank you. I tried that but unfortunately still no luck. The spindle does not switch on/off when using M3/M5. I can try some more things tonight. Maybe I have to use a real PWM-pin insted of out9?

        undefined 1 Reply Last reply 19 Feb 2025, 13:23 Reply Quote 0
        • undefined
          jay_s_uk @bOesu
          last edited by 19 Feb 2025, 13:23

          @bOesu what type of relay is it? if its a 24v one try a heater or fan output

          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

          undefined 2 Replies Last reply 19 Feb 2025, 14:18 Reply Quote 0
          • undefined
            bOesu @jay_s_uk
            last edited by bOesu 19 Feb 2025, 14:18

            @jay_s_uk

            Yes, it is a 24V SSR (3-30V range). I will try that, thanks! 👍

            1 Reply Last reply Reply Quote 0
            • undefined
              bOesu @jay_s_uk
              last edited by 19 Feb 2025, 19:23

              I finally got it working without even switching the physical pins. My config now is as follows:

              ; Spindle
              M453 ; select CNC mode
              M950 R1 C"out9+out8" L0:24000 ; create Spindle 1 and map the PWM pin (which is not used) to out9 and the ON/OFF pin to out8 (SSR)
              M563 P1 S"Spindle" R1 ; Map Spindle 1 to Tool 1 and call it "Spindle"
              T1 ; activate Tool 1
              M3 S1 ; Switch spindle on at 1rpm (needed for some reason to activate M3 without S-parameter)
              M5 ; switch spindle off

              For some reason I have to configure the rpm-range although I do not have PWM-control of the spindle, it is only a ON/OFF switch for now. Then also I had to "trigger" (?) the spindle with an M3 S1 command in the config file and then switch the spindle directly off again with M5. If I do that, the spindle starts up if I send M3 in the console of DWC. If I comment it out in the config file, the spindle does not start when using only M3. The first time I always had to add a rpm range. After that, M3 alone was sufficient. I dont know if that is how it is supposed to be for some reason, but thats how it seems to work for me know.

              Let me know if this is not a smart move for any reason. Currently I am happy that it works 😃

              Thank you so much @jay_s_uk , it was your comments that pointed me in the right direction!!!

              1 Reply Last reply Reply Quote 1
              2 out of 6
              • First post
                2/6
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA