Hello Guest it is March 19, 2024, 07:36:44 AM

Author Topic: Stepper motor as spindle  (Read 30733 times)

0 Members and 1 Guest are viewing this topic.

Stepper motor as spindle
« on: May 07, 2009, 03:15:17 AM »

Hello,

I'm thinking of application where spindle motor is also stepper motor.

How can I configure Mach3 so that it can control this stepper motor as well using M3/M4 Sxx commands.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Stepper motor as spindle
« Reply #1 on: May 07, 2009, 04:08:13 AM »
If you are meaning just using a stepper as a spindle then its easy, just set up the ports and pins for the spindle then tune as you would an axis.
Problem will be that steppers loose torque the faster they turn so as long as your speed/torque requirements arent too big you will be fine.
Hood
Re: Stepper motor as spindle
« Reply #2 on: May 07, 2009, 05:44:37 AM »


Hi,

After look more carefylly I understand already a bit more. But still unclear what is relation for S xx to how many steps / s.

Can you please clarify which menu I have to use to define how many steps / s means example S200?


Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Stepper motor as spindle
« Reply #3 on: May 07, 2009, 05:53:04 AM »
If you have a stepper motor that has 200 steps per rev and your drive has 10 microsteps then you will put 2000 steps per unit as one unit is one revolution as far as the spindle is concerned.
Hood

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Stepper motor as spindle
« Reply #4 on: May 09, 2009, 07:18:21 AM »
You will be very limited in what you can do with a stepper as a spindle.

Consider using a servo. It is basically the same kind of motor as a typical DC spindle, just has an encoder so it knows where it is.

The caveat is that the only reason (that I can think of) to want a stepper for the spindle is to get positional accuracy and in Mach, there is no facility for that on the spindle, so you are really no better off thatn using a regular motor and an indexer.

You can set up the spindle as an axis, which gives you the positional accuracy, but then you cannot run the motor continuously without some tricks. For an example of this  see the recent post entitled 'Success - Mini machining center . . '. (sorry I don't know how to link to other posts here).

There is a development effort going on right now for threading that may change the landscape on this issue.


Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Stepper motor as spindle
« Reply #5 on: May 09, 2009, 08:00:19 AM »
As has been said before if positioning  is required then it is a simple mater of swapaxis until the positioning is done then when normal operation is required then swap them back, can all be done within code with a simple macro.
 As for being better or worse, the servo or stepper will give you an exact speed very easily where using an induction motor it will normally not be such an easy process.

Hood

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Stepper motor as spindle
« Reply #6 on: May 09, 2009, 09:51:48 AM »
The problem with swap axis . .  as has also been said before . . . is that once you go into 'spindle mode' you loose all reference to azimuth.

If there is some way to get that back, within code or simple macro, no one has yet posted it that I have seen.


The comment on motor speed is simply inaccurate.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Stepper motor as spindle
« Reply #7 on: May 09, 2009, 10:15:07 AM »
The problem with swap axis . .  as has also been said before . . . is that once you go into 'spindle mode' you loose all reference to azimuth.

If there is some way to get that back, within code or simple macro, no one has yet posted it that I have seen.

What is your definition of azimuth?

Quote
The comment on motor speed is simply inaccurate.
In what way?


Hood

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Stepper motor as spindle
« Reply #8 on: May 09, 2009, 12:28:06 PM »
The problem with swap axis . .  as has also been said before . . . is that once you go into 'spindle mode' you loose all reference to azimuth.

If there is some way to get that back, within code or simple macro, no one has yet posted it that I have seen.

What is your definition of azimuth?

Azimuth = location by degrees around a circle.

I think you are a practical hands on kind of guy so I'll put theory aside and go practical example.

Suppose I deliver the following design to you for fabrication:  A keyway to cut in a shaft end that will also be threaded for a retention nut. The shaft has a shoulder on it with wrench flats and a second flat that is on a precise angle from the keyway, and on the opposite side from the flat is a threaded hole.
This ia an actual for a packaging line, incidentally. The keyway locates a cam and the flat locates a trigger arm. Once the cams and trigger are installed the wrench flats can only be accesses from one angle as there is an access panel, so even the wrench flats have to be on a certain azimuth relative to the cam angle.

To avoid an interrupted cut, you turn down the nose first and cut the threads.  OK so far swap axis to 'spindle mode' is working.

Now you swap axis to 'indexer mode' and machine keyway.

Swap axis back to 'spindle mode' and face the shoulder for the trigger arm, and cut a concentric locating bevel for the cam, and  . . oh yeah . . . almost  forgot . . a grove for a circlip . . . and what the heck, throw in an o-ring groove too.


Swap back to 'indexer mode' . . . cut the flat in the trigger shoulder 36.5 degrees away from the keyway  . . .  problem  . . where is the keyway? We have lost azimuth . . i.e. the machine no longer knows where it cut the keyway.

This problem will be repeated with the wrench flats and the threaded retention hole . . if any 'spindle mode' operations are done in between.

Don't argue this p[articular part could be sequenced to do all indexed operations together becuase that's neither always the case, nor efficient.

If there is something I am missing about how swap axis works and Mach can indeed retain or regain it's orientation after a swap axis, please feel welcome to correct me.



Quote
The comment on motor speed is simply inaccurate.
In what way?

Induction motors with a tachometer (including Mach's use of an index pulse) can be closely controlled relative to speed.

The only possible reason to cosider using a stepped would be to gain full azimuth control for the purpose of doing hard tapping of some other operation requiring agular accuracy. So in that respect only, steppers and servos are 'equivalent'.

However, that is where the equivalence ends. Even putting the torque loss aside, there is no stepper I am aware of that can run 25,000 or 7,500 or even 5,000 RPM. Making a comparison between a stepper and a servo motor relative to spindle speed is not reasonable . . just my opinion. Your mileage may vary. ood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Stepper motor as spindle
« Reply #9 on: May 09, 2009, 01:11:21 PM »
Being a fisherman I knew what was meant by azimuth in my trade  but was thinking your definition may be different, they however seem to be the same :).
 Ok so what I would do is use the index pulse for the spindle mode  but also set it up as a home switch for the A Axis, should therefore be a simple matter of homing the A Axis each time you swap from spindle to A. The homing could easily be written into the swap axis macro or am I still not following?


As for the motors then I mostly agree, especially with the stepper not being the most suitable motor for a spindle but then that would depend on the aplication, it is certainly excellent for my coil winderbut then again that is used mainly as an A Axis ;D
 I have never used Mach to control a spindle via a VFD but I have certainly seen lots of very experienced people that have problems with linearity and even when one is set up correctly the commanded speed is unlikely to be exactly what the spindle will actually do.
 This probably isnt an issue in reality as long as it is close but a servo (or stepper) commanded to do a certain speed will do that speed.
 The problem I have with VFD is loss of torque at low speeds and that is why I have gone different routes but maybe that is just because the VFD or motors I have used are not up to snuff.
 AC Servo in my thinking is the best for a spindle, constant rated  torque  from 0 to constant  rated speed.

Hood