Hello Guest it is November 27, 2022, 06:26:09 AM

Author Topic: Looking for help with a spindle motor.  (Read 1233 times)

0 Members and 1 Guest are viewing this topic.

Looking for help with a spindle motor.
« on: February 21, 2022, 05:54:23 PM »
I've been trying to get this motor working to try as a spindle motor on a small lathe.
https://www.omc-stepperonline.com/nema-23-integrated-easy-servo-motor-130w-3000rpm-0-45nm-63-73oz-in-20-50vdc-brushless-dc-servo-motor.html

It's a plain jane Mach3 setup on a Win7 computer.  Parallel port to simple breakout board to the motor.

When I first wired it up, the motor ran really slow.  Mach3 wouldn't let me put in a large enough number in the velocity box in motor tuning.

This morning, I edited the xml file and got part way there.   Line 1383 (see picture) seems to be a percentage.  Changing it to 100 got results.  This changed the velocity in motor tuning to 6000 (see picture).  No clue what the relationship is.

After making this change (here comes the good part) setting the S speed to 200 gave me an actual speed of 200rpm.  Measured frequency was 6.68 KHz - spot on.

At S400 and S600 results were also perfect.  At S800, it all fell apart.  The frequency went to an unstable 23.49 and the rpm a ragged 720.

Any suggestions on how to make this thing work?

Re: Looking for help with a spindle motor.
« Reply #1 on: February 22, 2022, 02:34:42 PM »
Hi,
Mach3's parallel port has by default a kernel frequency of 25kHz. With a well behaved PC you might be able to increase that to 45kHz or maybe 65kHz, or with an extremely
well sorted PC 100kHz.

The kernel frequency is the maximum pulse rate the parallel port can produce. In the case of a default installation that is 25kHz. Lets also guess that your servo requires 10,000
pulses to turn one revolution. At a max pulse rate of 25kHz then the servo could rotate only 2.5 revolutions per second or 150 rpm. As you can see the kernel frequency limits what the servo can do.

What is the encoder resolution of your servo? Is it programmable, ie have 'electronic gearing'. If so you need to set it to about 500 pulse per revolution. The at 25kHz pulse input:
25,000 / 50 =50, so the servo could do 50 revolutions per second or 3000rpm.

According to the manual the lowest resolution you can get with the servo is 1600 pulse/rev. With a pulse rate of 25kHz:
25000 /1600 =15.625 revs/sec or 937 rpm. With a default parallel port installation this is as fast as you could expect  for a Step/Direction driven servo.

You either have to increase the kernel frequency to 65kHz or more, possible but commonly fraught with difficulties, PCs just don't like it OR get an external motion controller like a UC100 (max frequency 100kHz)\
or an ESS (max frequency 4MHz).

Craig

My wife left with my best friend...
     and I miss him!
Re: Looking for help with a spindle motor.
« Reply #2 on: April 07, 2022, 08:18:53 PM »
Hi, I'm back. Thanks for all the great info.  I suspected it was something like that.

So, I went ahead and bought an ESS.

I haven't actually got it to turn the new step/dir motor as of yet but I did find some troubling info on the 'setting up the ESS' page.
https://www.warp9td.com/index.php/gettingstarted/setting-up-the-smoothstepper-and-mach#MachThreeInitialESS



It appears that the Smoothstepper will indeed produce a kernel frequency of up to 4mhz for the axis motors, it will only do 32khz for the spindle motor.

That leaves me little better off than I was with the parallel port.  The whole deal is beginning to look like an expensive boondoggle.

Walt
Re: Looking for help with a spindle motor.
« Reply #3 on: April 07, 2022, 08:24:07 PM »
Hi,
click the drop down menu, you can use vastly more than 32kHz.

My new servo driven mill runs 416kHz to each of the three axis servos and 466kHz to the C axis....so yes you can use way more than 32kHz.

Craig
My wife left with my best friend...
     and I miss him!
Re: Looking for help with a spindle motor.
« Reply #4 on: April 07, 2022, 08:29:57 PM »
Hi,
note also that you have selected PWM as your spindle control mode? Is that what ypou want? I thought you wanted to run Step/Dir, in which case uncheck
the PWM box and check the Step/Dir box.

Craig
My wife left with my best friend...
     and I miss him!
Re: Looking for help with a spindle motor.
« Reply #5 on: April 07, 2022, 08:36:31 PM »
Hi,
click the drop down menu, you can use vastly more than 32kHz.

My new servo driven mill runs 416kHz to each of the three axis servos and 466kHz to the C axis....so yes you can use way more than 32kHz.

Craig

Nope.  Like I said, all of the axis motors will go up to 4mhz.
The spindle only goes to 32mhz.
Re: Looking for help with a spindle motor.
« Reply #6 on: April 07, 2022, 08:37:46 PM »
Hi,
note also that you have selected PWM as your spindle control mode? Is that what ypou want? I thought you wanted to run Step/Dir, in which case uncheck
the PWM box and check the Step/Dir box.

Craig

I should have clarified that picture.  That's not my setup, that's the example given on the Warp9 site.
Re: Looking for help with a spindle motor.
« Reply #7 on: April 07, 2022, 08:44:18 PM »
Hi,
well what is your set-up then? Have you tried cliking the drop down menu?

Craig
My wife left with my best friend...
     and I miss him!
Re: Looking for help with a spindle motor.
« Reply #8 on: April 07, 2022, 09:53:43 PM »
Well, you're absolutely correct.  I'm not sure how I missed it but the spindle will indeed match the axis frequencies. That should not be an issue.

Now all I need to do is figure out why the motor isn't moving.
Re: Looking for help with a spindle motor.
« Reply #9 on: April 07, 2022, 10:25:40 PM »
Hi,
what I would do is just to prove that I can get the motor to turn....hook up the power and apply a 5V square wave from a signal generator to the Pul+ input with the Pul- input hooked to 0V com.

Craig
My wife left with my best friend...
     and I miss him!