Having a spindle control issue if anyone has any ideas.

Having a spindle control issue if anyone has any ideas. I am trying to run my spindle from my rasberry pi with bcnc. It runs it and changes speed from 0-12000 rpm but no higher. From 12000-24000 the spindle speed remain the same. If I change back to manual control it will run faster. Any ideas as to why it might be doing this? Possible setting change on spindle control or in bcnc? I have just tried imputing m3s and the speed but no difference.

What is the path from the pi to the controller? Are you running straight off the GPIO pins or are you going through a controller? I have not set up for speed control as of yet but there are settings in Tiny G for maximum dwell on the spindle pins. I am using them to run a laser right now and I have the laser settings bookmarked if you have not checked the Tiny G.

I am running a gradua m1 pro

Looking through the VFC manual the only things that come to mind is making sure the jumper is set to control speed with volts and not current. Then I would check to see if your controller is outputting 10V on full speed. If it is not it may have a setting to change the mac output voltage or the mapping between g-code commands and output voltage.

@Jamie_Wilson thanks for posting this here. It will help others in the future.

For guys using GRBL, we need to make sure first the GRBL settings are correct, specifically $30 and 31, if memory serves right. The min and max RPM. Need to match the spindle. A setting of 4000 min, 24000 max fits the 800w well.

@Colin_Kaminski the VFD directly plugs to the M1. This would be the same, as a post in here somewhere, as running the VFD directly off the TinyG. Although I was never really happy with the linearity of the signal. Many settings in TinyG though and Alden stated it would be possible to get it correct.

Ok I have looked at the controller and $31 is set to 4000 and $30 is set to 24000.
I tested the voltage coming out of spindle control on m1 and I used m3s and different speeds for spindle. It runs spindle but maxes out at 12000 rpm at 9.8 volts and 252 hz on spindle control. M3s11500 is 5.4volts and 129 hz, m3s11000 is 3.3 volts and 76 hz, m3s10000 is 2.58 volts and 58 hz. Any ideas??

Hey @Jamie_Wilson change the P0 value on the VFD we had set at 275 to 400 and see if this helps.

@Brandon_Satterfield the PO 7 is set to 400. If I change the control to run in manual then it will run spindle up to 400hz but just not from the m1.

Yes sir set P0-024 to 400 and try it again. Looks like I had a setting wrong.

@Brandon_Satterfield ok changed that. Now m3s11000 is 187hz and m3s12000 is 368 hz. It seems to jump from 11000 rpm to 24000 rpm and nothing in between.

Wow, that is a heck of a jump. It looks like something may be buggy between GRBL and the VFD.

Let me get into the VFD manual later today. The settings I posted on the video are directly from our machines here on site.

There is also a linear piece-wise function that was added to GRBL to assist making the signal to read RPM match really well. This most likely needs to be done. I’m kind of getting hammered right now with personal stuff but will give my best shot to complete this ASAP. I’ll shoot out a new GRBL file on the forum for R7 guys once complete. Also I’ll let you know when I get it hammered out.

@Brandon_Satterfield thanks

@Jamie_Wilson change $30=255 $31=1.

Type M3 S255 and let us know what the hertz readout is on the VFD.

@Brandon_Satterfield it is reading 386 hz

Perfect thanks.

What is your P0-027 set at currently?

@Brandon_Satterfield 0

What is the header gcode under bcnc, tools, config for? It is m3s12000 g4 p3

Good Note but not sure if it effects anything. Feel free to change it 24000 and min really should be around 800 but 0 will work.

You were doing almost 24000RPM at S255.

I just loaded a bare bones GRBL on to a machine. Ran a Python script from GRBL. It is almost dead linear out of the box.
See below