Relay for spindle control

Trying to control a spindle and vfd with M3. Trying to use an octocoupler relay but there is current at PWM before it is turned on with M3. The relay is latching on at startup. Should there be any current at PWM? The relay is sensitive to very low voltage, my meter is reading .1 volts at pwm. If the relay is set to high it takes 3 volts to trigger which would have to be 14000 rpm. I see some have used SSR relay but they are documented to not trigger until 3 volts also so it would be the same. 3 volts takes away the possibility of running below 14000, I have read all I can find on this and not finding any threads leading to a solution.

It also depends on which GRBL you’re using. In 1.1 there is a setting for speed at “full pwm” as well. If you’re using a VFD, why aren’t you running the PWM directly into it? Using an opto w/ relay is going to lose your speed control at the vfd.

I have the 2.4. If I run the pwm directly to the vfd the spindle is always on. pwm does not go to zero. That is why I was asking if it should. When you are learning if things do not do as they should you don’t what is not working as they should.

I reflashed with custom grbl settings at the time to rebind the Motion Controller’s DIR (spindle direction) pin to spindle enable via loosely following http://www.eyemonline.com/?p=331 when I hooked up my SuperPID. I’d imagine a VFD has a enable input to take advantage of as well. Not sure if that’s what others did when they hooked up a VFD. (Disclaimer, I don’t have a VFD nor use Carbide’s motion controller anymore)

1 Like

It should be zero.

Look at these two settings:

$30=1000. Max spindle speed, RPM
$31=0. Min spindle speed, RPM

$31 should be zero- this sets the “spindle speed” specified in the M3 that corresponds to a zero PWM (ie. all low).
$30 is the “spindle speed” that corresponds to maximum PWM (ie. all high)

I operate an IOT relay with exactly this setup.

A number of people use the PWM from GRBL to run a superpid or vfd, you shouldn’t need to do anything special. I’d recommend not using an opto coupled relay as a go between.

1 Like

$31 is zero
$30 is 24000 I have 24000 rpm capable spindle
I hear you on not using the opto relay so to not lose the speed control. I was going to use it to break the connection between DCM and FOR. PWM and Ground would be a direct connection to the VFD. I tested that so was trying to take the step with relay. But with PWM not going to zero it would not work. PWM not going to zero perhaps was my original problem. Guess what I am trying to sort out is, is it me or the board?

Without using a scope, you can’t know that the pwm “isn’t going to zero” - a small average offset like that could be totally normal, but you can’t tell if it’s an offset or a low frequency pulse from a voltmeter.

Does the .1v/ave signal actually cause a problem with the vfd? Isn’t there a setting in the vfd for this (I remember something like that, but it’s been a long time since I’ve been through a vfd manual) .

Do keep in mind that there are separate g-codes for on and off, and setting the spindle speed to zero isn’t exactly the same as turning off the spindle. You would think they would be, but I’m not 100% positive they are - so likely best not to make the assumption.

M3 S10000 / Set spindle to 10000 RPM and turn it on, clockwise
M5 / turn off the spindle

If you don’t have the DIR set up (you likely don’t) then M3 and M4 are interchangable.

When the VFD 01 is set to 1 for remote control the spindle starts. On the restart of the VFD the spindle also starts automatically (shouldn’t). No M3 command is given. M5 does not turn off the spindle. Right now I am thinking even that small signal is turning it on. I do understand all the g code I have a machining background and have spent a fair amount of time with programming gcode. I have reviewed and went over every recommendation of settings I can find relating to this and reviewed every VFD parameter setting I have. I have documented all 250 settings. So if I ever get this I can share with anyone. I have several mentions that I have a VFD parameter wrong just no suggestion what even to try.

Sorry, hard to tell background from a single questions. All I’ve got at this point is the shapeoko forum here: https://forum.shapeoko.com/viewtopic.php?t=1989&p=15172 . and the Wiki, here: https://wiki.shapeoko.com/index.php/Spindle_Control that might be helpful.

1 Like

No harm, not taken negative. I struggle over what to include or not. Can make it messy and confusing also. I will take a read and see if there is anything new in there. Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.