Duet 3 spindle configuration via SSR
-
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 offIf 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 -
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 likeM950 R1 C"out9+out8"
Assuming you aren't using out9
-
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?
-
@bOesu what type of relay is it? if its a 24v one try a heater or fan output
-
Yes, it is a 24V SSR (3-30V range). I will try that, thanks!
-
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 offFor 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!!!