Spindle control via UGS

Hi folks,

I am having some difficulty getting my arduino/gshield to play with my 48V quiet cut spindle via an isolated relay circuit.

Mostly the issue seems to be with triggering the relay.
the relay needs 5v power, a ground, ( D14) and a trigger, (D12) according to a write up found on the inventables website,https://www.inventables.com/projects/quiet-cut-spindle-upgrade-for-gshield

Once all the connections are made, I get primary power but cannot trigger the relay via UGS.(M03/m05 etc)
i found something on the Jtech photonics site that says it uses D11 to trigger the laser, so i thought if D11 can fire a blaster, maybe it can turn on a router.

D11 energizes the relay but again i cannot alter it’s state, ie; turn it on or off.
i updated the hex file from Grbl 0.9i to Grbl 1.0c thinking the older version was not compatible somehow but no dice

D11 is the pin that would be used to control a laser and I hesitate to order that upgrade until I know that i can control it via UGS or picsender. The spindle is no biggie since i have been controlling that manually since I installed it.

I am beginning to think something is wonky with that part of my arduino.

Thoughts or similar experiences from anyone?

What commands are you sending to turn it on?

To trip my relay I have to send an S12500 M3

the spindle speed is irrelevant, but is required to trip the relay.

You might want to go back to version 0.9j because it is the latest stable release of grbl. Version 1.0c is currently being developed and is not recommended for production work as it is constantly changing.

D11 is the appropriate pin to use for spindle control (version 0.9j and beyond), I believe that the laser people use it to control the power of the laser beam.

Depending on which control you are using for your Quiet Cut spindle, you could also use G-code to set the spindle speed.

[Edit] Took a look at your link, those instructions would work for grbl version 0.8, but they moved the PWM pin in version 0.9 (from D12 to D11, D12 is the Z axis homing switch for version 0.9)

I think I may go back to 0.9j with the info you put up here @LarryM.

@ErikJenkins I have been trying to use M3 S10000 to no avail. does having the spindle speed first in the line ahead of the M3 make a difference?

I think I will go out and find out! And put 0.9j in…

Not sure if the order matters…I send speed first always :slight_smile:

Order doesn’t matter. S10000 is too low to get a full width PWM signal you need at least S12000 (going higher is OK) with Inventables version 0.9j grbl.

Can you post a picture of the relay hookup with the wires labeled? Would need to clearly see the yellow terminal area.

Houston we nhave achieved lift off!

One more lesson learned on this cnc journey.

It seems the s12000 was the key. I was using 10000 as a speed but it obviously was not a high enough signal to do the deed.

I attempted to load grbl 0.9j but only managed to get myself confused between hex files. config.h, xloader, arduino IDE etc etc until it was all just alphabet soup. Grbl 1.0c is back in place and so far its running as expected.

Thanks goes out to both Larry ans Eric, now I can look ahead at the laser upgrade!

2 Likes

The reason that you need to use 12000 rpm or higher to get Inventables grbl version 0.9j to output a steady high signal on the PWM pin is that the maximum rpm value specified in the grbl config.h file is 12000.

So, calling for a spindle speed of 12000 rpm would be asking for a 100 percent duty cycle on the PWM pin.

The mechanism for obtaining a full on or full off condition of the PWM pin is changing in grbl version 1.0c which hasn’t been release yet (and so the change is not official yet).

1 Like

As soon as the 12000 was posted a little light came on in the back of my mind that lit up the “DUH!” sign…

1 Like