Hello Guest it is December 02, 2024, 12:06:24 PM

Author Topic: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller  (Read 12150 times)

0 Members and 1 Guest are viewing this topic.

PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« on: August 25, 2014, 11:32:25 PM »
Having some trouble  with getting my spindle speed setup correctly in Mach3.

The particulars:
Latest release of Mach3 Licensed
Dyna DM2400 benchtop CNC Mill
Spindle motor is a stock 90VDC motor, but originally ran from a 75V Controller calibrated about 60V to produce 5000rpm at the motor
NEW DC Spindle controller is a KBIC-120. Usually takes 0-7VDC input. I had to set the MAX trim pot on the KBIC down to give me the 5K motor RPM which resulted in a max signal voltage of 4VDC
Gecko G540 Control
VFD signals in the 540 are wired to the 3 terminals on the KBIC-120 where the pot would go.
Test the KBIC-120 with a 5K Pot and it works fine, get full range of RPM out of the motor. (after setting the KBIC-120 MAX RPM where the max input signal would be 4VDC)
Proximity index sensor on the spindle pulley, properly setup in Mach.

Mach3 is configured per Jeff Birt’s document on configuring the KBIC:

http://www.soigeneris.com/Document/Gecko/Using_the%20Gecko_G540_VFD_Output.pdf

I followed his directions verbatim. Wired it verbatim. (The Dyna DM2400 has a SPDT switch where you can put it in “LOCAL” mode which switches the signal to come from the 5K manual Pot or flip it to “PROGRAM” mode  from the G540’s VFD circuitry to the input of the KBIC-120.  Jeff, thanks for posting this)

The Dyna has 3 pulley grooves giving 3 different speeds. I set these up in Pulleys. 0 min, and the maximum is set to the name plate chart max rpm on the speed chart on the side of the headstock. Ratio is set to 1.

My problem, when commanding the spindle speed from Mach using the S10000, (Pulley 1 will give a max speed of 10K rpm), Mach turns on the spindle and while a few RPM off it was close. I tweaked the MAX rpm pot on the KBIC-120 so that it was at 10k rpm showing on the spindle speed display in Mach via the index pulse. I checked it with a laser tach and it was right on. KBIC input signal to spin 10K rpm is 4VDC. I commanded S7500rpm and actually got 6910rpm (2.86VDC signal), commanded S5000 and actually got 6325rpm (2.65VDC Signal), commanded 2500rpm and got no spindle speed. (.001VDC)

This happens with the other 2 spindle pulley settings. The output from Mach/G540 is not following linearly.

With that in mind, I put the SPDT switch in LOCAL mode,  I turned the manual speed pot and measured RPM and signal voltages (they differed slightly than the Mach/G540 Combo) here is what I got:

325rpm - .553VDC signal
650rpm - .659VDC signal
1250rpm - .867VDC signal
2500rpm – 1.31VDC signal
5000rpm – 2.19VDC signal
7500rpm – 3.07VDC signal
10000rpm – 4.0VDC signal

So, in a nutshell, I’m pretty sure my controller is good. I need help configuring Mach/G540 so it outputs the proper voltages to control my spindle properly. I can’t seem to get Mach/G540 combo to output the signal voltage not much lower than a volt. I could not get my spindle to turn less than 1250 rpm in the above example.

Lastly does the Auto Spindle Configuration in Mach really work?
How about using the spindle in closed loop?

Any advice/thoughts would be appreciated.
Thank you in advance!
Marty

Offline Vogavt

*
  •  260 260
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #1 on: August 26, 2014, 09:12:08 AM »
I don't have the VFD setup, but I do have G540 and a KBLC-19PM.

Sadly, I have yet to be able to get a matching number for the commanded speed vs the actual speed.

Not saying it can't be done, I just haven't had the time to really really dig into it.

I've tried differing pulley ratio numbers, etc. to no avail.

As far as you question about the calibration working, IIRC, I believe it does not work as intended (Could be wrong).  I do recall others using it, only to have to go delete its created file at a later date just to clear some things up.

Maybe someone will chime in soon as I'd also like to get a handle on what's going on.
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #2 on: August 26, 2014, 09:59:37 AM »
Hi,

This is a copy of the post I put on the Mach3 group.

There are quite a few things at play here.
Firstly, you cannot test the linearity of the G540 output using the KBIC's  as
the supply for the G540 analog circuitry.

If you want to test the linearity properly you need to use a stable supply. A
9V battery is a good choice. Connect the battery to the 10V+ and the Agnd
terminals on the G540. Then
1. in Mach3 set the spindle speed to max (10,000rpm in your case)
2. Measure the analog output between Aout and Agnd on the G540.
3. Multiply the measured voltage by 100 and enter that as the max pulley speed
into the Mach3 pulley setting. So a measured voltage of 8.90 would mean that
the max pulley setting entered is 890rpm.
4. Now you can test the G540 linearity. Enter 100rpm and the voltage should be
1.00V. Enter 250rpm and the measure voltage should be 2.50V

You should find that the linearity is very good.

Now on to your setup. If you are powering the G540 Analog supply from the
KBIC-120 connecting it in place of the 5K pot (which is exactly what I do) The
voltage supply is about 15V.

WARNING!!!!  This 15V supply is LETHAL. Terminal P3 is at mains potential
110V,220V,etc. P1 is 15V less than that. P2 varies between the two. If you are
not qualified to work on mains voltage, use someone who is. (a qualified
electrician)

Jeff's document instructs you to use the voltage following input setup which
not the same as just replacing the manual speed potentiometer with the G540
analog output.

I have always controlled the KBIC controllers by connecting to the three
potentiometer terminals, P1,P2,P3
I have done this with all my DigiSpeed Products and the G540.

One of the problems you are encountering is that the 15V supply is a diode
shunt regulator, capable of only supplying a few milliamps. Further more, the
MAX trimpot is just a potentiometer that is in series with the 15V supply.
Also the G540's dynamic impedance (load) that is across this supply varies
with the PWM signal. So as you vary the Mach3 speed setting, the supply
voltage to the G540 analog setting varies because of the voltage divider set
up by the MAX pots resistance causing a non-linearity in the 15V voltage
supply to the G540.

If you want to use the voltage following input as Jeff suggests you need to
power the G540's analog circuity from a separate isolated 7V supply and not
the 15V supply for the potentiometer.


And another issue to deal with is the non-linearity of the spindle motor. At
very low speeds, the motor needs to overcome the friction and drag in the
motor and drive train, so the actual speed will be less than the commanded speed.

Then at the top end, the spindle speed of the DC motor saturates (flattens
out) after about 95% of top speed. So in essence, the DC motors response is
actually an S curve, not a straight line. So when you are setting the Max
pulley you need to use the estimated speed that it would have reached if it
did not flatten out.
What this means that you should have very linear response is the 15%-85% speed
range. Above 85% you usually just want to go flat-out so the non-linearity in
that part is not usually a problem.

So to set up your spindle,
1. Connect the G540 analog lines in place of the P1,P2 and P3 potentiometer
terminals of the KBIC-120
2. Wind the MAX pot fully clockwise to reduce any non-linearity from it.
3. Run the spindle for 15 minutes to warm up so as to reduce drag in the
drive-train.
4. Set the Max pulley speed to the max speed that the spindle would reach if
it did not flatten out.
5. Adjust the Max pulley speed so that you get a linear response in the main
working speed range of your spindle.

Hopefully this will get you close. If you are not happy with the result you
may need to replace it with a Closed loop spindle control system such as a VFD
or servo.

Cheers,

Peter
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #3 on: August 26, 2014, 01:39:41 PM »
Peter,
First of all, thank you very much for the reply.
The G540's VFD terminals are wired to the KBIC-120's P1, P2, and P3 terminals. It does derive its power, ground from the KBIC and delivers its signal to it.
While the KBIC can provide 90vdc and the Electrocraft spindle motor has a terminal voltage of 90vdc, the machines max rpm is 10000. Running it at 90vdc almost doubles that at the spindle. That is why I adjusted the max pot on the KBIC to bring the motor RPM down to have  10k rpm at the spindle. I think this is part of the problem. The DM2400's spindle drive only went up to 75vdc and was adjusted down as well.

I will follow your instructions to check the G540's VFD circuitry to make sure its fine and then follow your instructions even though the RPM will be too fast for the spindle, and report back.

Thanks again for taking the time to respond.
Marty
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #4 on: August 27, 2014, 02:53:52 AM »
Hi Marty,

Sorry, I missed that you were getting double the spindle speed out at 100% PWM.

What you need to do is set up as I suggested with the MAX pot set fully CW.

Set the pulley max speed to 100. Then increase the the speed unit  you get 10,000 rpm and not the set speed value.

If the value was say 35, then the max pulley speed that you need to set is 100/35 * 10,000 = 28,571 rpm

This should put you in the ballpark to fine turn from there.

I thought that Mach3 has a max pwm setting but I can't find it. If set to 35, it would allow you to set the max pulley to 10,000rpm and when you set the speed to 10,000 it would only output a 35% pwm signal.

One of the problems is that you are only using the motor in the bottom 1/2 of it's range. This will mean theat the non-linearity at low speeds will be about twice what it would normally be.

One of the solutions would be to replace the pulleys doubling the reduction to allow the motor to use more of it's range.

Cheers,

Peter
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #5 on: August 27, 2014, 02:42:53 PM »
Hi Marty,

Sorry, I missed that you were getting double the spindle speed out at 100% PWM.

What you need to do is set up as I suggested with the MAX pot set fully CW.

Set the pulley max speed to 100. Then increase the the speed unit  you get 10,000 rpm and not the set speed value.

If the value was say 35, then the max pulley speed that you need to set is 100/35 * 10,000 = 28,571 rpm

This should put you in the ballpark to fine turn from there.

I thought that Mach3 has a max pwm setting but I can't find it. If set to 35, it would allow you to set the max pulley to 10,000rpm and when you set the speed to 10,000 it would only output a 35% pwm signal.

One of the problems is that you are only using the motor in the bottom 1/2 of it's range. This will mean theat the non-linearity at low speeds will be about twice what it would normally be.

One of the solutions would be to replace the pulleys doubling the reduction to allow the motor to use more of it's range.

Cheers,

Peter

Peter, what do you mean by "Speed Unit"? And where would that value be?

Thank you,
Marty
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #6 on: August 27, 2014, 05:35:39 PM »
Hi Marty,

I meant "Speed until"

Increase the speed via Mach3 until you get 10,000 rpm  measured spindle speed.

Cheers,

Peter
« Last Edit: August 27, 2014, 05:37:12 PM by Peter Homann »
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #7 on: August 27, 2014, 07:58:37 PM »
increase the speed via Mach3 until you get 10,000 rpm  measured spindle speed.
What kind of lathe has a 10000 RPM spindle and what does one turn with it? (!!)
Milton from Tennessee ya'll.
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #8 on: August 27, 2014, 09:00:04 PM »
increase the speed via Mach3 until you get 10,000 rpm  measured spindle speed.
What kind of lathe has a 10000 RPM spindle and what does one turn with it? (!!)

Not a lathe. A Dyna DM2400 benchtop mill. Its top speed is 10k rpm.
Re: PWM Spindle Calibration help. G540 & KBIC-120 DC Controller
« Reply #9 on: August 28, 2014, 09:44:49 AM »
Oops, my bad.  Most Dyna posts I've seen lately were about lathes & I made a wrong assumption.
Milton from Tennessee ya'll.