Hello Guest it is April 17, 2021, 11:41:10 AM

Author Topic: PWM vs Analog output for spindle control?  (Read 205 times)

0 Members and 1 Guest are viewing this topic.

PWM vs Analog output for spindle control?
« on: November 22, 2020, 04:13:26 PM »
I have a G0704 cnc that I built about 8 years ago.  It uses mach3, an ethernet smooth stepper and a C11g  breakout board.

For the spindle I'm using a 1.5hp bldc motor and a GlockCNC 1200 watt 1200WBD driver. The speed is controlled via the C11g breakout boards onboard 0-10v Analog converter, connected to the 1200WBDs Analog input terminals.  The breakout board converts PWM into a 0-10v Analog signal.

My spindle works well enough,  but either the Analog converters output isn't very linear, or the 1200WBD driver doesn't convert the voltage to RPM in a linear manner. 

I can easily tune the spindle speed to match the mach3 commanded speed using the C11g onboard potentiometer,. But it only ever matches @ that specific speed.  For example, if I enter 4000rpm into mach3, and adjust the potentiometer untill I have 4000 RPM at the spindle, entering 3000rpm in mach3 will get me about 2700rpm at the spindle.  The closer I get to 4000, the better they match.  Above 4000, they will start to diverge again.    This same non-linearity manifests no matter which RPM I use as the base for tuning.

My 1200WBD can also accept a 5v 1khz-2khz PWM signal to control the speed via PWM duty cycle.

My question is:. If bypass the 0-10v converter, and feed the PWM signal directly to the 1200BWD driver and use PWM duty cycle to control the speed, would I get better linearity?   

It's not difficult to bump the commanded RPM up/down untill the tachometer is where I want,. But it would be nice if I didn't have to do that.

Offline TPS

*
  •  2,110 2,110
    • View Profile
Re: PWM vs Analog output for spindle control?
« Reply #1 on: November 23, 2020, 05:23:36 AM »
are you sure your pullex Settings match to the real Speed of your spindle?
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: PWM vs Analog output for spindle control?
« Reply #2 on: November 23, 2020, 09:33:18 AM »
I believe so.

My motor is a 1-1 ratio belt drive BLDC 1.5hp 8000rpm.   My index pulse tachometer is an optical trigger with 2 slots.

My pulley setup in mach 3 is min=0, max=8000, ratio=2

The actual RPM read by mach 3 from the pulse card matches the RPM read by my motor driver perfectly.
Re: PWM vs Analog output for spindle control?
« Reply #3 on: November 23, 2020, 06:05:44 PM »
Hi,

Quote
My question is:. If bypass the 0-10v converter, and feed the PWM signal directly to the 1200BWD driver and use PWM duty cycle to control the speed, would I get better linearity?   

I doubt it, the non linearity is largely because the controller is actually a 'phase controlled rectifier bridge' and the transfer function ( the mathematical description
of the output verses the input) is highly non-linear with phase controlled bridges. It is in fact approximately linear to sin2 over a range of 0 to 90 degrees.

Is precise speed control that important?  For years a and years we used manual mills and lathes which which not adjustable so had to accommodate whatever gear
ratio that was available.....so why the fixation on spindle speed now?

Craig
My wife left with my best friend...
     and I miss him!
Re: PWM vs Analog output for spindle control?
« Reply #4 on: November 23, 2020, 09:04:16 PM »
Hi,

Quote
My question is:. If bypass the 0-10v converter, and feed the PWM signal directly to the 1200BWD driver and use PWM duty cycle to control the speed, would I get better linearity?   

I doubt it, the non linearity is largely because the controller is actually a 'phase controlled rectifier bridge' and the transfer function ( the mathematical description
of the output verses the input) is highly non-linear with phase controlled bridges. It is in fact approximately linear to sin2 over a range of 0 to 90 degrees.

Is precise speed control that important?  For years a and years we used manual mills and lathes which which not adjustable so had to accommodate whatever gear
ratio that was available.....so why the fixation on spindle speed now?

Craig

Thanks for the reply, that's the info I was looking for and approximately what I expected.

It's not so much a fixation with spindle speed, more a mild nagging curiosity.  I get by fine with it as-is.   

The reason I decided to explore it further, is because while reading the bldc driver manual, I realized the same terminals are used for both Analog and PWM inputs.   Bypassing the Analog would be a simple matter of moving two wires on the breakout board and changing a setting in the bldc driver.  I wouldn't have to do anything to the wiring harness.

Thanks for the response.