Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Katoh on June 19, 2011, 08:30:40 AM

Title: Spindle speed fedback?
Post by: Katoh on June 19, 2011, 08:30:40 AM
Colleagues
I am slowly acquiring parts for a lathe conversion, and the subject had arisen of spindle speed feedback.
Please excuse my ignorance here but is that a necessity?
I can see how it would be beneficial on threading, and if needed, can someone recommend what to look for and were to purchase, as I really have no idea and have never needed anything like that in the past.
Lastly the lathe is belt driven.
Cheers
Katoh
Title: Re: Spindle speed fedback?
Post by: Hood on June 19, 2011, 10:03:06 AM
Normally your programme in feed per rev on a lathe, If you dont have the Use Feedback In Sync mode chosen Mach can still be programmed in feed per rev but will not go on the true spindle speed but rather the programmed, that could be a bit dodgy especially if you have a manual spindle and dont set the RPM right.

I now just use the encoder on my spindle motors as I use the SmoothStepper and it can read the very short index pulse, if however you are using the parallel port then you need a longer pulse.
Previously I used a slotted disc and opto to good effect. The Opto I used was an OpTek OPB916B or OPB917B. The only other thing you will need with that opto is a 220 ohm resistor to limit the current to the optos LED.

Hood
Title: Re: Spindle speed fedback?
Post by: Katoh on June 19, 2011, 10:24:07 AM
Hi Hood
I will be using just a standard Break out Board. The motor is controlled with VFD  and speed through mach.
I'm just trying to get my head around this, with the Optek that will send the speed back to mack and will mach compensate for that?
IE: so I need to put spindle speed back into mack for things to work correctly?
Where would I find information or setup diagrams on how to make these work on our machines?
sorry If sound Silly, I am going into the unknown.
Title: Re: Spindle speed fedback?
Post by: Hood on June 19, 2011, 01:21:28 PM
Yes ideally you need spindle feedback if commanding in feed per rev also you definitely have to if wanting to thread. As threading is a dream with CNC you would be mad not to.

As far as connecting to Mach, just a single input from the Opto to your BOB (well also a 5v and 0v supplied from BOB) and then tell Mach which port and pin the Index signal is connected to and thats it, piece of cake :)
Hood
Title: Re: Spindle speed fedback?
Post by: Katoh on June 19, 2011, 07:24:08 PM
Many thanks Hood!
I will get organised as well.
Cheers
Katoh
Title: Re: Spindle speed fedback?
Post by: BluePinnacle on June 19, 2011, 08:19:01 PM
This looks like the beginnings of turning the spindle into effectively a big servo. Doing this with my mill spindle would enable rigid tapping ... I like that idea. Distant dream, or not?
Title: Re: Spindle speed fedback?
Post by: Hood on June 20, 2011, 03:11:25 AM
This looks like the beginnings of turning the spindle into effectively a big servo. Doing this with my mill spindle would enable rigid tapping ... I like that idea. Distant dream, or not?

If using the parallel port then its likely just going to be a dream.
Hood
Title: Re: Spindle speed fedback?
Post by: BluePinnacle on June 20, 2011, 10:07:38 AM
Shame :(

Hope you're feeling better by the way.
Title: Re: Spindle speed fedback?
Post by: djc on June 20, 2011, 10:45:17 AM
This looks like the beginnings of turning the spindle into effectively a big servo. Doing this with my mill spindle would enable rigid tapping

The way to work around this with Mach is to have a true servo motor physically turning the spindle. Most servos have three control modes: velocity, position and torque. You use it in velocity mode as a spindle and then have to change it to position mode and drive it as a C axis for your tapping. Even doing this, I would be happier to semi-rigid tap with a flating holder than go full-solid. Dare I say EMC?
Title: Re: Spindle speed fedback?
Post by: Katoh on June 20, 2011, 11:21:34 AM
I maybe way off the mark here but is it not what your describing just basically spindle speed feedback? using a servo to drive a spindle will give you what advantage?
So wont the Optical sensor giving feedback back to mach control all other motors, eg feed speed, to compensate while threading, if you get slip or loose rpm.
Title: Re: Spindle speed fedback?
Post by: Hood on June 20, 2011, 01:08:22 PM
The opto will provide feedback to Mach for reading RPM and on a lathe will also provide a means of the index pulse for threading, it will not however allow you to synchronise your spindle to axis as you would need for rigid tapping. As has been said a servo can allow you to do that if you use SwapAxis() and tell Mach the spindle is actually an axis. Doing that will allow you to sync moves between the spindle and any other axis so rigid tapping would be possible. I believe the DSPMC can use a normal motor (with encoder fitted) to do rigid tapping and also I think the Centipede allows that.
Hood
Title: Re: Spindle speed fedback?
Post by: Katoh on June 20, 2011, 07:36:50 PM
Just a thought , could you not use a servo motor in place of the main motor and set it up as a 4th axis, there's plenty of servo's with enough  power and speed to do the main motors job.
Title: Re: Spindle speed fedback?
Post by: djc on June 21, 2011, 02:41:47 AM
I maybe way off the mark here but is it not what your describing just basically spindle speed feedback? Using a servo to drive a spindle will give you what advantage? So won't the Optical sensor giving feedback back to mach control all other motors, eg feed speed, to compensate while threading, if you get slip or loose rpm.

Quote from: Katoh
Just a thought , could you not use a servo motor in place of the main motor and set it up as a 4th axis, there's plenty of servo's with enough  power and speed to do the main motor's job

Yes it is spindle speed feedback but it boils down to 'how much' of it and 'what you do with it'. Mach only accepts a _single_ index pulse per revolution; servos use many, many more pulses (e.g. 2^17). Mach only uses the pulse for one or two things: to sychronise the feedrate when screwcutting/threading; to do PID spindle speed control; to do constant surface speed facing.

The computational gymnastics Art forced Windows to perform simply cannot cope with doing much else.

Most servo motors are constant torque from zero up to full revs., unlike a VFD controlled motor which has less torque at low revs.

You can set the servo up as a fourth axis, but then it is difficult to use as a spindle. There is no G-code for 'rotate indefinitely at x rpm' (irrespective of what other axes are doing). Doing a toolchange on a rotary axis is not a meaningful concept.

If you want to do this kind of stuff, and more, you have to accept that wonderful though it is, Mach is perhaps the wrong tool to use. EMC has been built conceptually to do all this, but making concepts into practical applications is hard work.
Title: Re: Spindle speed fedback?
Post by: RICH on June 21, 2011, 06:54:00 AM
You could always use an external device such a Smoothstepper which can utilize the higher encoder counts. Using a servo will give higher rpm and constant torque as compared to a stepper where
you are limited by torque at the higher rpms .....in fact the feedrate will not be very linear with a stepper and will be limited in application. For indexing stepper iuse is fine.

RICH
Title: Re: Spindle speed fedback?
Post by: Katoh on June 21, 2011, 08:38:14 AM
This has all sort of gone beyond me, but like always I just had another thought, Why can't we run two separate motors to the spindle joint mechanically, so you do either one job or another. You could have your main 3ph vfd controlled motor for general turning and threading with feedback of course (RPM FEEDBACK)  and then have a servo or a stepper to run the the spindle , mechanically changed to do your rigid tapping, you could even theoretically do rifling with that set-up.
One motor is treated as the spindle and the other as a 4th axis.
The only thing you need here is a quick change gearbox, from motor to motor, and there would be no crossover in mach.
Title: Re: Spindle speed fedback?
Post by: Hood on June 21, 2011, 08:45:19 AM
As mentioned before, fitting a servo on the spindle as a spindle allows you to do this without messing with extra gears etc associated with two motors. All that is needed is to command a SwapAxis() in Machs VB to change from spindle to axis mode. I have servos on the spindles of all my machines, 12.5KW on the lathe, 8KW on the Beaver mill and 5KW on the Bridgeport..
Hood
Title: Re: Spindle speed fedback?
Post by: Katoh on June 21, 2011, 09:07:38 AM
Sorry Hood just shows that I am way out of league here, I have to read it 2-3 times before I understand, and now Im learning pretty quick, Just out of interest were would you even look for a  12.5kw servo, and is that AC or DC? what drives it?
The largest servo's I have seen are 60v  DC's on a friends Bridgeport mill, they make my 1000oz steppers look like toys.
"I Don't think I'm in Kansas Any More"
Katoh
Title: Re: Spindle speed fedback?
Post by: Hood on June 21, 2011, 09:15:01 AM
I got mine from eBay, paid £250 for the 12.5KW and £102 for the 8Kw, I also got the drives from eBay, two 22KW ones for £180 each and a 10KW one for £50. All were new except the 10KW drive and it only had a few hours on it :)

They are AC servos and drives and are 415v 3 phase input.

Hood
Title: Re: Spindle speed fedback?
Post by: Katoh on June 21, 2011, 09:23:28 AM
Would I be better off looking for a servo motor to drive the spindle?
would you connect the motor via timing belts , v-belts or direct drive? This is just opening up a hole new can of worms for me, I really thought the norm was to go a 3phase  motor driven by VFD, but now I know better.
Do you still need the optical input (rpm) for spindle or does the servo drive input the information back into mach.
Title: Re: Spindle speed fedback?
Post by: Hood on June 21, 2011, 09:34:34 AM
The norm is VFD as it is the cheap easy option but is far away from the best, VFD/Induction motor will lose torque the slower it goes and on a lathe slow speeds are where you want the torque, AC servos and for that matter DC servos have an almost flat torque curve from 0 RPM to full rated RPM.

The reason as said most dont go the servo route is price, if you know what you are looking for and can find deals like I did then it may actually be cheaper but if I had bought my 12.5KW new from Rockwell it would have been over £4000 likewise the 22KW drives would have been that kind of price as well.

As mentioned deals are out there, I have just bought two old Siemens spindle drives for £10 each and also a 30KW VFD for £57, dont have a use for them at the moment but I pick up the bargains when they are going just in case I find a use ;D


I use the Index pulse from the encoders on my servos but I use the SmoothStepper which is fast enough to read the short index from the encoder, if using the parallel port you would either have to electronically lengthen the pulse or go with the opto.

I drive mine with timing belts, you really need to if you are going to use it as an axis. The belts are amazing, on the lathe the belt is a Gates GT3 and is only 20mm wide and stands up no probs to the torque of my motor (83Nm cont 152.5Nm peak)

Hood
Title: Re: Spindle speed fedback?
Post by: Hood on June 21, 2011, 09:35:47 AM
Oh just to add a bit to the VFD route, if you oversize the motor and VFD then you can compensate, to some extent, for the loss of torque at lower revs.
Hood
Title: Re: Spindle speed fedback?
Post by: Katoh on June 21, 2011, 09:52:34 AM
Hood Cant thank you enough
That's just a wealth of knowledge, Your on money when you say its money driven, I just did some searches then and AC servos are not cheap by any means of the word.
A good lesson is be learnt here not to just jump in with two feet, I have put on some bids on bits and pieces and if won  I am committed, so I will be heading down the the VFD  Induction motor road. but I always have a whopping great wood lathe here that's crying out for something special as well. I will keep my eyes open like you for a bargain in the servo world, I see its a much better option.
Do you run the servo through a VFD or just straight 3 phase?
Katoh
Title: Re: Spindle speed fedback?
Post by: Hood on June 21, 2011, 10:00:35 AM
Just take care with any servos and drives you are looking at as you will really need ones that can accept Step/Dir inputs if you are planning to use it as an axis. Also care needs to be taken that the AC servos and drives match as often the encoders have commutation on them and the drives need to accept the same type of commutation signalling. Best to get matched motors and drives unless you know what you are doing, also watch out as some AC servos have resolvers and not all drives can accept resolver feedback, I have swapped out resolvers for encoders on some motors before and its fairly easy if you have a dual trace scope. Some drives can do self sensing for the commutation but that will require they move the motor a bit (12 to 1 turn) to find find the motors coils each time you power the drives, unless you keep the logic side of the drives alive when you power down the main power side of them.

I have mains 3 phase in the workshop, VFD wouldnt be any use for powering the drives, you would need a rotary phase converter to get true 3 phase from single phase mains for that.

Hood
Title: Re: Spindle speed fedback?
Post by: Katoh on June 21, 2011, 10:10:37 AM
Again Thanks hood!
I have 3 phase power as well, which I use to drive my Fimec 3.5kw spindle on the router , its just easier moving the single phase stuff from place to place, that's all. You have totally lost me on encoders/ resolvers, ect. I see a few nights coming up with some heavy study, trying to sort this out.
Katoh
Title: Re: Spindle speed fedback?
Post by: Hood on June 21, 2011, 10:17:52 AM
You will be doing well if it only takes a few nights ;D

Hood
Title: Re: Spindle speed fedback?
Post by: BR549 on June 21, 2011, 02:47:05 PM
IF you  use a 4pole(1800rpm) mpotor they have more torque down low.With the VFD you can overspeed it up to the 3600 level as well. SO that gives you great low end and good top end torque.

Just a thought, (;-) TP