Hello

Hoping someone in here could help me setup my spindle in Mach3. I`ve been happy setting up the rest of my cnc machine, but I must admit, I`m a little out of my deapth with this spindle and pwm setup!!

I`m using a brushless DC motor which runs using a control driver (ESC) which apparently accepts a standard "remote control" RC signal pwm pulse width of between 1-2ms. Apparently, it is only within this narrow range that you go from slowest speed 1ms to fastest 2ms. My understanding is that Mach3 and your PC alone can no generate this correct pulse width and certainly not a good enough range within. A kind fellow cnc`er has sent me a PIC microcontroller which was simple to setup, provide it 5v and ground, and then simply an input from the MAch3 PWM and a the PIC processes this signal and sends it out within the correct range.

He only uses however, emc/linuxcnc and so his setup .HAL file shows:
setp pwmgen.0.pwm-freq 40.0
setp pwmgen.0.scale 100000
setp pwmgen.0.offset -0.0396226415094
setp pwmgen.0.min-dc -0.0396226415094
setp pwmgen.0.max-dc 0.3
setp pwmgen.0.dither-pwm false


Now in EMC, I`ve set my "base frequency" to 40 (as I presumed was the mach equivelent setting to pwm-freq in the linuxcnc file above), but I get very little movement. Through randomly experimenting, if I set the base freq to 100, and then set minimum freq to 30, I get some good speeds but not much resolution!

Clearly the PIC is working and doing its job, but I don`t really understand what I am aiming to do in Mach3 to get it working properly. So for example, I`m having to tell it Speed = 6000 before it`ll actually start to move!

I suppose in truth, I don`t really understand what all the controls options are for in Mach and what I`m aiming to even try and do to get this working from 0 - 20,000 RPM which my motor is apparently capable of.

I have ordered some Hall Effect sensors so hopefully soon I will intgrate a feedback for RPM.

Any help appreciated.