Here’s a conversation I had with Bart Dring on this subject a while back. I didn’t make the mod since I am not confident in my skills with futzing with the grbl programming and fear I would screw it up rendering my machine non-functional. As it is, it’s working satisfactorily, I just turn it on and off manually and adjust the speed with the speed controler.
JkWestphalJul 18
HI Bart,
I recently purchased the 300w QC spindle, 48v power supply , speed control, and optical relay.
If I read your schematic correctly, can I use the no D11 pin to trigger the relay powering up the spindle?
In anything I have found on the forum regarding triggering seems to be pre arduino/gshield and indicates pin d12 which is now in use by the limit/homing switches.
I would really like to be able to control the spindle via software yet having manual speed control is attractive too.
Reply
Reply as linked Topic
BartDringInventablesJul 19
@JkWestphal Pin D11 (Port B.3) is used for spindle control in the configuration of grbl we ship. The pin is setup for PWM speed control. You should not drive a relay with PWM. If you set the speed higher than 12000 RPM (the max) the PWM is steady state and can drive a relay, but that is not a very robust way of doing it because it is prone to errors. You can recompile grbl to not use variable speed, but that requires some Ardunio programming skills.
D11 is also only a low power signal and cannot drive a relay directly. Use a relay circuit like this one.7
Reply
Reply as linked Topic
JkWestphalJul 19
Thanks for the reply Bart, I’ve been scratching my head for a while on ths.
That is the relay circuit that I purchased, (yay ,no shipping delay!) apologies offered that I wasn’t clear on this.
Again my question is where would I acquire the signal to trigger it? Based on your reply, just making connections and seeing what happens probably would not be the best approach stuck_out_tongue_winking_eye I would not do that anyway (See the part about shipping delays…)
Reply
Reply as linked Topic
BartDringInventablesJul 19
@JkWestphal You need to modify config.h to comment out (add // in front) this line,
#define VARIABLE_SPINDLE // Default enabled. Comment to disable.
This will also swap the Z limit and spindle pins due to some legacy grbl issues and what pins can do PWM. Spindle will now be on D12 and the Z limit on D11.
The issue of having to recompile for speed control comes up a lot lately with all the AC spindles in use. @SungeunJeon is seeing if there is a simple solution that will fit in the the code. Having a $ setting for max speed, where you can set max speed to 1 for on/off would be cool.
grbl has very little code space left so it will take some tricky code work to pull it off.
Reply
R