UGS spindle issue

Hey everyone, first time posting on here. I hope that I haven’t stirred up a common issue here as I did look in the discussions but couldn’t see anything similar. I also apologise if this is in the incorrect category. Happy to move if this is the case.

So I am doing testing on my UGS as I am about to install a VFD for my 3 phase spindle. I am looking to be able to control the spindle rpms as desired by the g code or by manual adjustment on the UGS software. There has been many videos and google finds on connections for doing this but as I am waiting for the VFD to get here I am just checking all my ducks are in a row with some testing on the software first. I am using a Arduino and cnc shield v3 controller with grbl 1.1.

The question or issue I have is that when I type in my m3 s1000 up to m3 s18000 commands I am getting no rpm response on the UGS screen. I get “ok”message when typing m3 with a s code spindle rpm or m5 codes into console but no change on display shown below. When I test the voltage for my spindle enable pin I see it the voltage go from 0 to 4.9v and back again when switched off. I’m under the impression from my online research that with grbl 1.1 my spindle pwm pin is “spindle enable”. This meaning that if I input half my spindle max rpm into my m3 code, I should get half my rpm and it should display 2.4v. I have checked the spindle speeds in the config $$ and adjusted accordingly the max spindle speed. When I move my axis I can see the feed speeds on UGS screen work well and those I also modified in the config $$.

I have watched videos of others with a similar system and there rpms change on screen so wondering where I’m going wrong. Is it cause I have not connected my VFD yet?

What are all of the grbl settings?

Side note: fyi, you might end up wanting to stand up the drivers, maybe placing the fins all inward and using a fan to blow fresh air across them, leaving them down like that will likely not provide adequate cooling… depending on usage of course. just my 2 cents on the layout :smiley:

Hey thanks buddy will do that asap. When I get home tonight I will send you my grbl settings.

1 Like

Hey hope this is what you were meaning. This is my settings a saved on a text document. They are all the same except i changed the $30 to 10000 for thats whats on my machine now.

Oh yeah, that’s the main reason I had asked for them, to See $30, 31 and 32. Which all look okay…
So before in the original post you had said you sent the commands “M3 S1000” this would cause a 10% of max spindle rpm. And the “M3 S18000” (or rather any S value 10,000 or above) would cause a 100% of max RPM.

IF the max RPM’s are a value other than 10,000 then I suggest changing $30 to reflect the Spindle’s Max RPM value. And using the correct S Values that align to this.

This is not entirely accurate Because PWM means Pulse Width Modulation, so the Signal Sent is 5V (or possibly 10V depending on the board set, I forget if grbl shield uses 5V or 10v for PWM output) AND PWM needs to be read on an Oscilloscope to be read properly. Yes, a voltmeter that is displaying averages COULD show the voltage average, BUT that’s not the right way to read a PWM signal.

MANY VFD’s do not accept 5V PWM signal directly and require a PWM to Variable DC Output Board. Like this one
It all depends on the VFD accepted inputs, this board accepts a pure PWM and 12-30VDC and then outputs variable DC voltage with 10V being max for full spindle RPM…
Side Note about the grbl settings shown in your chart: there’s no Max Plunge-Rate set ($112), so the Z axis likely has never moved unless that’s a typo… and the acceleration values seem very slow ($120,121,122) you can probably increase these to get some faster movement.

I Hope this helps guide towards the right path

Hey buddy, thanks for the replies. Super super grateful. The cnc shield has a 5v output. I have already bought the part you have suggested and it’s on its way and the Vfd is 10v compatible. My only concern is that it doesn’t seem to show that variation in voltage difference from a m3 s1000 code to a m3 s9000 code. If you don’t mind I have attached a video of a similar outcome I thought I would be easily getting. It’s a bit towards the end of the video. But all that aside I should get a value on my spindle rpm on the screen. Even if it is a low or high rpm I would think. And yes I still have some settings to finalise but I am just still have some mech things to test before I speed it up to much haha

Anyway see what ya think and see if it makes any sense to you

Actually have a grbl shield controlled CNC along with a 1.5KW water cooled spindle and VFD, but due to my initial rush to get it running I never bothered to set it up via PWM, I just press “Run” and turn the knob for RPM adjustment :laughing: :man_shrugging:

I believe that if you’re running grbl version 0.9 or newer on a shield board revision 3.0, that the Spindle needs to connect to the Z+ connection for the PWM output as shown here labeled “v3.0” the reference to “laser” doesn’t matter it’s PWM regardless of if laser or if spindle…:

You’d move the Z Limit Switch to a different plug (I’ll check mine when I get home to let you know where the limit switch is supposed to go on Shield 3.0 with grbl 0.9 or higher firmware) and then Move the Spindle Output to Z+ (Which is the same as D11)

See this Video for the setup (it shows the Arduino without the shield which makes it a little confusing and the pin layout change on Shield 3.0 with newer grbl also makes it confusing since the labels are no longer correct… but that’s why they released Shield 3.1 board by the way, to correct the layout for newer grbl versions to make the labels match properly…):

Haha I have watched this video many times hahaha and this is what I was basing mine on. If in the end I use a dial control for speed then that’s fine but when I saw you could control by the software I was hooked haha.

I’m wondering if it is my cnc shield or ardiuno that is causing this problem. I have tried the voltage on the z axis pin but it is a constant 5v with m3 command or not. The spindle enable is the one that goes on and off with 5v. It’s a version 3.00. I wonder if I should try find a 3.01

The ardiuno and the cnc shield are I’m guessing aftermarket ones so maybe that’s adding to my issues too. I have another cnc shield that I could try but it is aftermarket too. I’m not running a main seperate voltage to the cnc shield either. Do you think this may help?

I am running grbl 1.1


Just checked my wiring and limit swirches all go to their - locations. So z-, y-,x- this is because i beleive z+ becomes pwm when the grbl 0.9 or higher is utilized. And i know i have grbl 1.1h on this cnc.

O well I’m kinda stuck at this point as my z+ limit doesn’t give me any variation in voltage from spindle m3 s codes. I’ll keep trying I guess and see if I kinda figure it out. Doesn’t seem to bother many as there’s not a lot of questions about it. Thanks Seth it has been nice to talk to someone about it, even if it’s not a solution hopefully I will post the answer soon. Cheers

1 Like

Hello, Following along. From what I understand. If your Z- (And/or) Z+ is working as a limit switch then the PWM is likely disabled in the config.h file, at least that is how my stuff is working. Maybe that is why you are not getting the readings you are expecting.
Caveat I am really new to this stuff but am working on projects along similar lines.
Using IDE to flash the UNO, have both Protoneer and Elegoo shields. The Protoneer 3.1 the pins work as labeled from what I understand, have one but haven’t done the unboxing or testing yet.

Hey guys thanks for the advice and help. you guys both got me in the correct direction and i was able to solve it.

So AlFernandez and SethCNC you were on the right track with the config and pwm. So on my grbl 1.1 i found that the variable speed selection was disabled. So once i enabled it and reflashed my uno then all of a sudden my Z+ turned into the PWM I was looking for and even on the UGS software the spindle rpm now shows and changes at my bidding. Just thought i would put this up to help people who might have the same issue in the future. Thanks guys I appreciate your help.

so its was enabling line 339 on the config.h file


Well i intend to change my setup over to this if theres ever time, so i appreciate your follow-up in case i end up needing to make the same edit :laughing::+1::+1::+1:

1 Like

Good to here it worked out.

I would assume same for Z-, correct? I understand they both go to the same pin, and then for Z limit you use the SpnEn pin right below X- for Z limit?

1 Like

Yeah buddy exactly. Z is now spindle enable. Can’t wait till my Vfd arrives then I’m in business


Now I need to unbox the Protoneer 3.1 and see if all that is unnecessary!

1 Like

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