View Full Version : CNC Mill Servo Spindle Conversion

01-22-2012, 10:29 PM
One of the last major modifications to my mill that I have wanted to make is replacing the 3 phase spindle motor, vfd, and vari-speed drive with a servo motor. Several years ago I had picked up a 3.5kw Mitsubishi MR-J2S series servo motor when one popped up on ebay for a couple hundred bucks. The plan was I would use that motor to replace the 2kw servo motor in the 10EE with this once I found a drive for it and then move the 2kw motor to the mill.

Well, in the two years that it took for the correct drive to show up on ebay I got that injection molding press and used the 5kw motor and drive in there to replace the 2kw in the lathe. So that left me with the 3.5kw.

Now that I am out of work and have some time on my hands and no projects I need the mill for I figured I would give this project a try.

Last week I pulled the motor off the mill and took some measurements off the old motor and drew up a mounting plate that would allow me to mount the servo in the hole of the existing motor and allow it to swing to adjust belt tension. I sent the drawing off the IRC Aluminum in Portland for water jet cutting. Three days later I had the part in my hands. Only $110 for the cut with material. The aluminum alone (1/2" 6061) would have cost me at lead $60 shipped. Not bad. The part came out perfect, drilled and tapped the motor bolt holes and installed it on the motor.

https://farm8.staticflickr.com/7150/6746434777_abcccf6afd_b.jpg (https://flic.kr/p/bhaf1Z)Spindle motor mounting plate (https://flic.kr/p/bhaf1Z) by macona (https://www.flickr.com/people/67292116@N00/), on Flickr

I decided to use HTD style belts to drive the spindle. The top speed of the motor is around 2500 RPM so and I want about 5k at the spindle. I had a 28 tooth, 8mm pitch, 50mm wide pulley so I bought a 56 tooth version off ebay NIB for $25 shipped. The SK bushing for the 35mm shaft on the motor I got from Applied Industrial for $30. The belt was about the same price but ended up having to get that from Motion industries. That should be here tomorrow. I had to bore out the bushing on the small pulley to fit the shaft on the spindle side of the vary-speed to 35mm. Technically it was too small but I got it to fit.

https://farm8.staticflickr.com/7155/6746436677_c51a9a8d61_b.jpg (https://flic.kr/p/bhafzK)Spindle Servo Motor and Drive (https://flic.kr/p/bhafzK) by macona (https://www.flickr.com/people/67292116@N00/), on Flickr

Last night I pulled the top of the head apart to get at the rest of it. Pulled out the top half of the pulley and the mechanism that adjusted it. While it was apart I found the top support bearing to be so-so and the bottom was dry. I could shake the bearings and they rattled around. I dug though my bearing collection and found NOS bearings to match the top and bottom. The bottom was an open style and the grease was dried so I cleaned that and put some new Kluber grease in it. Much smoother now! I reassembled everything and dropped the motor in place. Just need the belt now.

https://farm8.staticflickr.com/7163/6746455243_93f77e5939_b.jpg (https://flic.kr/p/bham6R)Spindle drive pulley (https://flic.kr/p/bham6R) by macona (https://www.flickr.com/people/67292116@N00/), on Flickr

https://farm8.staticflickr.com/7150/6746454033_288fb62e60_b.jpg (https://flic.kr/p/bhakJZ)Spindle servo installed (https://flic.kr/p/bhakJZ) by macona (https://www.flickr.com/people/67292116@N00/), on Flickr

Today I started on the wiring. Unwired the old motor and pulled out the old vfd. I had to move the internal 240-120m, 500va transformer so while I was at it I replaced it with a 750va one to give me a little extra aux 120v on the machine. I got the drive wired with its supporting contactors and terminal strips.

Thats where I am at for now. Still need to do a little signal wiring and remove the pwm to analog board that used to control the speed. The new drive has step and direction inputs built in. Hopefully the belt will show up tomorrow and I can get it up and running. I want to add some other features like rigid tap and homing on the spindle. That may take a bit. I am looking at the Dynamotion for motion control.

01-22-2012, 10:35 PM
Dang... it's posts like this that makes me rearrange my project list. :D

Will you have braking (tool hold/change) as part of your servo or external?

Edit -I see you are just replacing the motor - not the stuff below - and it's a real CNC BP...

01-23-2012, 12:02 AM
The servo does have a brake, but they are mostly intended for holding when the motor is off. The drive does have and output that will control the brake if I wanted.

But it will servo lock when "off" so I really don't need it. I am planning on indexing the spindle is rotated to home when it stops. I am not sure how I am going to implement it yet though. I may just do it though an external board that on power off it sends a pulse train to the motor until it hits the zero marker on the encoder. Another option is to do it in software making a call during the tool change macro to index the spindle to home. I know mach does not officially support it but I think I can OR the signal outputs for C and Spindle axis together to so the home routine.

It's not a BP, its a SuperMax. Basically equivalent to a Series II BP. About 50% heavier than a standard BP. Its a good, solid machine. Came out of the model shop at Tektronix.

01-24-2012, 01:12 AM
Go it working tonight. Took a while to find one bug, turned out to be not enough current getting to the drives optos. Also finding the parameters for Mach and the drives electronic gearing was pretty time consuming.

lll post a video tomorrow.

https://farm8.staticflickr.com/7143/6753441033_4849378f8b_b.jpg (https://flic.kr/p/bhM9Jv)CNC Drive Cabinet (https://flic.kr/p/bhM9Jv) by macona (https://www.flickr.com/people/67292116@N00/), on Flickr

01-24-2012, 05:12 PM

01-24-2012, 05:29 PM
So you can now do rigid tapping?


tyrone shewlaces
01-24-2012, 05:32 PM
The motor control seems nice and smooth.
But holy cow ! What's all that rattling?

Looks like a good job on the servo work. Kudos.

01-24-2012, 06:15 PM
No rigid tap yet. Need a motion controller that can handle that. There are a couple of them out there like the dynomotion:


The rattling is the clutch between the main pulley and the back gear. There is just a tiny amount of play and it rattles when there is no load. Once there is a load it quiets down.

01-24-2012, 08:21 PM
nice work, i want one too!

i am also looking at dynomotion. having trouble with granite drive setup and may switch to something else

01-24-2012, 08:45 PM
nice work!

01-24-2012, 09:01 PM
Nice I like it:cool:

Looks like your next upgrade will be a bigger electrical cabinet:)

01-24-2012, 09:47 PM
Very nice...

I'm not sure how you dealt with the lower bearing on the motor. Didn't that bearing locate in a stationary seat? Yet you have the motor pivoting on the adapter plate for belt tightening.

Edwin Dirnbeck
01-24-2012, 09:48 PM
This is truly impressive.When people say to me ,people just don"t know how to do things anymore,I am going to wip out a copy of Macona"s project and hand it to them.Thanks for sharing. Edwin Dirnbeck

01-24-2012, 11:03 PM
There was no lower bearing on the motor. And the new motor's shaft is 35mm/1-3/8" so no worries there.

01-25-2012, 03:01 AM
No rigid tap yet. Need a motion controller that can handle that. There are a couple of them out there like the dynomotion:

You could ;)

01-25-2012, 03:13 AM
Have you messed with one?

01-25-2012, 03:17 AM
Have you messed with one?
one what?

01-25-2012, 03:25 AM

01-25-2012, 03:28 AM
No, not tried one of them. I was simply saying you could rigid tap now that you have a servo spindle, presuming you are using Step/Dir to control it of course :)
Well better get off to the workshop, lots of welding to do today :(

01-25-2012, 05:48 AM
How are you handling the programming for it?

01-25-2012, 06:28 AM
You would just treat the spindle as an axis and use a macro to SwapAxis() and another to ResetAxisSwap()
So when wanting to rigid tap just call your macro to change it to for example the C axis and then programme the feed as units in C and units in Z then once finished your tapping just call your other macro to reset it to a spindle.
Simples as Alexander the Meerkat would say :)


01-25-2012, 07:33 AM
Thanks, I will look in to that a little more. I need to find some sample code to visualize it a little better. Are you using generic tool holders or a T/C tapping holder?

I will probably still go with one of the external motion controllers. I can't run the spindle at a very high resolution and be able to get full speed out of it. Same with the axes as well. If I try to get anything past 65khz out of the parallel port things get wonky fast.

01-25-2012, 02:14 PM
Thanks, I will look in to that a little more. I need to find some sample code to visualize it a little better. Are you using generic tool holders or a T/C tapping holder?

I mainly just use a floating holder, not bothering with the SwapAxis(),
Few reasons,
don’t have the slight pause that you will get when calling the SwapAxis() another is I have a lot of backlash on the spindle as it has a gearbox as well as wear in the splines and lastly it just so much quicker to whack in the floating holder and call a G84 rather than work out the actual movement of each axis.
The floating holder hardly moves and I have actually tried doing the rigid tapping (G84) without the floating holder in some plastic and it worked ok once I got the backlash dialled in correctly, was in G95 mode BTW, Not brave enough to try in SS or Steel as really there is no need when I have the floating holder.

This is how you would do the SwapAxis()
Because I use metric mainly it is relatively simple to work out the A axis value (I used A but equally could be B or C), for example the code below would be for 1mm pitch, Z is moving 11mm so A axis moves 11 units (revs in this case)

M1111 macro would have something like this in it
SetOemDRO(803,0) ‘ this sets A axis DRO to zero
Sleep 100 ‘Just makes sure DRO has time to update
SwapAxis(3,6) ‘ This swaps the spindle and A axis

M1112 macro would have something like this

ResetAxisSwap() ‘This would reset the spindle and A axis to normal


I know at least one production place that use floating holders on their machines that have rigid tapping as each time it comes to do a tap there is a pause whilst the spindle and Z sync, with the floating holder they can do things a lot quicker as no pause for sync. Its older machines they are using so maybe ultra modern ones don’t have that delay but likely they do.

I will probably still go with one of the external motion controllers. I can't run the spindle at a very high resolution and be able to get full speed out of it. Same with the axes as well. If I try to get anything past 65khz out of the parallel port things get wonky fast.

Yes that is the main reason I went with the SS/Scorpion/ESS, just couldn’t get much over 45KHz safely with the PP and I don’t like electronic gearing.


Actually thinking about it I didnt do the G84 without the floating holder as backlash comp is not on the spindle it was only the swap axis I did without.

01-25-2012, 08:26 PM
Rigid Tap works!

I did it a little different than Hood, probably breaking a few rules while I am at it.

Mach will allow you, at least with the parallel port, to set the same output pins for two different axis, in my case, I am using pins 1 and 17 of port 1 for step and direction for both spindle and C axis.

So, I go to my starting height, figure the RPM I want to tap X*360= feedrate, and how many turns in degrees Y*360=C, and distance to travel for that amount of turns.

So for the video I did a program like this:
G00Z.1 (.1 Above work)
G00C0 (make sure C is at 0)
F72000 (200 RPM)
G01C7200Z-.9 (20 turns 1" down)
G01C0Z.1 (Back the other way)

Works great!


01-25-2012, 08:34 PM
I am impressed.

01-26-2012, 03:04 AM
Yes I think that most external devices wont allow dual setting of axis pins, I know the SS wouldnt. It may now as I remember a lot of people requesting it before SwapAxis was implemented and I do know Greg at least allowed it in one test plugin, whether that was a general release or not I cant remember.
Now you can do it you will probably get bored with working it all out and end up with a floating holder :D

01-26-2012, 03:15 AM
Yeah, maybe I will upgrade the motion controller when I am working again. For now, I am happy.

Another option down the road with an external motion controller is OR the output pins together.

This is sure going to save some wear and tear on my hands!

Thanks for the heads up on the tapping.


01-26-2012, 04:26 AM
There's some interesting aliasing going on in that video!

The spindle and tap appear ro be rotating in opposite directions.

01-26-2012, 05:36 AM
You're right. I hadn't noticed it. Probably something to do with the scaling as well as the rolling shutter on the sensor. Its not quite as apparent if you watch the HD version on youtube.


Anyone else not able to get the link on the video to transfer you to the youtube site?

01-26-2012, 05:45 AM
Waiting for the peck tapping vid ;)

01-26-2012, 08:55 AM
Man, that was great. I really need a cigarette now.;)

01-26-2012, 12:16 PM
Great work! Can you also do thread milling with this setup?

01-26-2012, 01:28 PM
Threadmilling can be done with any cnc mill that supports helical interpolation. The cutter runs like a standard end mill.

01-26-2012, 05:33 PM
Macona, everytime i see one of your projects i am amazed. Could you write a post touching on what types of servo controllers you can use with various motors? Do you have to stick with a mitsubishi controller for a mitsubishi motor for example, or are some controllers universal? Also, is there a difference between a servo used for an axis vs a spindle? Is there reference material somewhere that explains all this or is it just knowledge you have picked up over the years?
Thanks, paul

01-26-2012, 09:31 PM
Threadmilling can be done with any cnc mill that supports helical interpolation. The cutter runs like a standard end mill.

Sorry.. I wasn't clear.... Are you able to do this with your controllers/sw? Or is it just a matter of feeding the right G codes?

I see thread milling as very useful. In theory I can do it on my system, but only if I put the G code directly (not available in conversational mode)

01-27-2012, 12:00 AM
Thread milling can be done in mach but there is nothing like a canned cycle. There is a wizard, which is kind of like a conversational, that allows you to program a move at the control. I have never done it, treadmills are expensive.

02-03-2012, 03:46 AM
I am working on turning a pile of cast and brass swarf into a working CNC Barker PM. Levers no leadscrews.
One of the next steps is spindle, bearing don't sound good.
It's got a bent pulley and a old beat up motor and the rest of the pulleys and various bits missing. When I was working on it today I was thinking that a small servo might be just the thing. Looking over the specs it looks like a 1/3 HP motor with speeds down to 100 RPM and I would love 5 - 10K top end so I could use some small end mills in the 3C when not using it as a horizontal.

What's your opinion. I was thinking a 500W servo? With a 2 to 1 ratio.

02-03-2012, 04:50 AM
500w is kind of an odd size. I would do a 750w. The will give you extra low end power when belted up.

Better make sure the bearings can take that high. 5k should be no problem, but 10 might with grease.

02-03-2012, 11:37 AM
Thanks for that tip.
So how big is a 750W servo going to be?
AC or DC?

02-03-2012, 02:31 PM
Newer ones are about 3.5" square, maybe 8" long. There are also pancake versions that are wider and shorter. Way smaller than the equivalent induction motor.

02-03-2012, 02:56 PM
I will continue looking. You are right 750 seemed more popular on EBay.
Thank you.

02-03-2012, 03:18 PM
I will continue looking. You are right 750 seemed more popular on EBay.
Thank you.

Mitsubishi also sells a 600W that will be fine.