# Stepper Motor Question



## Bill Gruby (Jun 24, 2013)

Not using a stepper motor for CNC, only to move the cross slide in and out for auto-facing, what do I need to drive it and control the speed?

 "Billy G"  :thinking:


----------



## stupoty (Jun 24, 2013)

Hears some info on steppers

http://homepage.cs.uiowa.edu/~jones/step/types.html

if you dont wish to have positioning a motor may be simpler than a stepper.

Stepper requires the coils to be energised in a sequence that causes reasonably smoth motion, also the pulse rate must be 'ramped' so the stepper has time to accelerate.

You may be able to find a self contained stepper controler that will do that for you or maybe an audrino based driver would be possible.

Stuart


----------



## GaryK (Jun 24, 2013)

Usually a computer to control it and drivers to drive it.

I'm sure someone makes everything in one package but a stupid one that have speed only.

A driver just need something to supply pulses which if you're any good at all with electronics you could build one
using a 555 timer. Use a switch for direction.

Stepper stuff: http://www.kelinginc.net

Good information:  https://probotix.com/


Gary


----------



## stupoty (Jun 24, 2013)

GaryK said:


> Usually a computer to control it and drivers to drive it.
> 
> I'm sure someone makes everything in one package but a stupid one that have speed only.
> 
> ...



yeah thats true you could use an off the shelf psu and step sequencer with a variable frequency pulse input such as a 555 with a way to change frequency to alow for acceleration and de-celeration.

Stuart


----------



## Bill Gruby (Jun 24, 2013)

I only wish to use the stepper motor as if it were a DC motor with variable speed. I want to use it because of its small size. I am thinking Nema 23 w/400+ in oz torque. Can this be done?

 "Billy G"


----------



## jgedde (Jun 24, 2013)

Bill Gruby said:


> Not using a stepper motor for CNC, only to move the cross slide in and out for auto-facing, what do I need to drive it and control the speed?
> 
> "Billy G" :thinking:



I can help you there, but I need a bit of background information:

1) What kind of stepper motor is it? (Bipolar, Unipolar, 3-phase, etc.) Manufacturer and part number would be valuable information.
2) Does the motion need to be dead smooth? (I'm alluding to microstepping)
3) What is your electronics skill level? (Can you build your own circuits from scratch? Or from a kit?)
4) How cost sensitive is your need? (Do you want to buy something ready made?)
5) Do you need position control, or just rate control? (I'm guessing you just want it to feed in or out at a given rate and not precisiely stop anywhere)
6) Presumably simplicity is what you want, right? (No PC, Mach 3, etc.)

There's no question in my mind that a stepper motor is a good choice for your application. While smoothness can be an issue, it can also be largely overcome by either microstepping or voltage control (current control of steppers is fraught with problems - although it appears good on paper if you're just considering I=E/R and ignoring the BEMF).

A brushmotor or a servo motor would not be a good chocie since really all you can do without a closed loop (servo) controller is regulate voltage or current. Voltage regulation which forces the motor to run on it's torque speed curve which means that any changes in required torque will affect the speed. Regulating the current regulates the torque delivered, but speed regulation will still suffer. 

Another approach could be a simple brushed DC gearmotor with a large reduction ratio. If the torque capability of the selected motor is selected to be much higher than the required torque, you will get reasonable speed regulation because the reflected load back to the motor shaft will be small in proportion to other losses (friction in the gearbox, viscous losses due to the lubrication, etc).

John


----------



## itsme_Bernie (Jun 24, 2013)

Bill Gruby said:


> I only wish to use the stepper motor as if it were a DC motor with variable speed. I want to use it because of its small size. I am thinking Nema 23 w? 400+ in ox torque. Can this be done?
> 
> "Billy G"



Wow Bill- that is a project I had on the back burner myself- I even have the 425oz stepper and some hardware.  Says "Deepgroove  425oz  2.8A  4V  1.8 Degree"

I was hoping for some sort of "solid state" looking answer to making a dial-speed-operated, reversible drive for the SHerline mill, without getting into software control.

I am meaning to get more into electronics, but I wouldn't mind, for now, a "turnkey" approach depending on the cost.

John, you are blowing me away- but I think I am following you-  


Bernie


----------



## Bill Gruby (Jun 24, 2013)

Now we are getting somewhere. Thank you John.

 #1 Bipolar

 #2 I need auto facing to improve my finish

 #3 Average Skill Level. ( Can kit build. never tried scratch building)

 #4 What-ever the cost is, it is.

 #5 Just need rate control. #6 Big yes on simplicity.

 The motor

http://www.ebay.com/itm/1-PCS-NEMA-...398?pt=LH_DefaultDomain_0&hash=item257effb1ee


"Billy G"


----------



## jgedde (Jun 24, 2013)

Bill Gruby said:


> Now we are getting somewhere. Thank you John.
> 
> #1 Bipolar
> 
> ...



OK. How about this: http://www.piclist.com/techref/io/stepper/linistep/index.htm

The circuit is is only good to 3A, so you'd want to wire your motor with the windings in series... These circuits take three inputs: step, direction and enable. Enable is simply on/off. Direction is obvious. Both direction and enable can come from switches. Step is a bit more complicated. You want to feed this from a circuit to generate pulses that represent your desired feed rate. A frequency generator or a little 555 circuit can take care of this. http://www.ramseyelectronics.com/cgi-bin/commerce.exe?preadd=action&key=UT5

Here's another one from the same distrbutor as your motor: http://www.automationtechnologiesin...rs/kl-4030-24-40vdc-3-0a-microstepping-driver  It also requires generation of step, direction and enable.

A thrid option is basically turn key - just build it and go. Again no microstepping, but it gives you a front panel control of speed, on/off etc. http://www.ramseyelectronics.com/cgi-bin/commerce.exe?preadd=action&key=SMD1C

My only concern with not microstepping comes if you drive the motor too hard or rigidity of your cross slide is an issue. I hate to see the motor's vibration ending up on your workpiece. ut at $40 for a non-microstepping controller (3rd option), it may be worth a try since all you need to supply is power and a motor. Nowhere can I find the current handling rating for this controller. It looks "light duty" to me.

John

- - - Updated - - -

Never mind the third option. It's only good for 0.5A.

John

- - - Updated - - -

Damn. Option 1 is NG either. Not for bipolar motors. I'll look some more for a simple OTS solution.

john


----------



## jgedde (Jun 24, 2013)

Here's my final answer:

This: http://www.automationtechnologiesin...rs/kl-4030-24-40vdc-3-0a-microstepping-driver

Plus this (to generate the pulses): http://www.ramseyelectronics.com/cgi-bin/commerce.exe?preadd=action&key=UT5

You can let the oscillator free run at whatever freuency you set it and use the enable signals from a switch into item one.   You likely won't need to accelerate/decelerate the motor...  

John


----------



## DMS (Jun 24, 2013)

You will need

1) A motor (you have one picked out)
2) A driver like this http://www.automationtechnologiesin...rs/kl-4030-24-40vdc-3-0a-microstepping-driver or this http://www.automationtechnologiesin.../geckodrive-g251-50v3-5a-stepper-motor-driver
3) Something to generate pulses to the driver. You could build something with a 555, but it might be easier to go with something like an Arduino. If you don't feel like programming it, I would be willing to help out. In any case, they are cheap. Amazon sells them for around $25.
4) A Power Supply. Lots of folks seem to use old PC power supplies. They only go up to about 12V. This will limit your maximum speed, but it seems like you want SLOOOOOW anyway. 
5) Misc parts (couple switches, potentiometers, a box to put everything in, and some wire).

I'm guessing you want forward/reverse, start/stop, and speed control right?


----------



## Bill Gruby (Jun 24, 2013)

I am sold on the KL-4030. Will order today. By Arduino so you mean this? http://www.ebay.com/itm/Arduino-MEG...390?pt=LH_DefaultDomain_0&hash=item3a82566d8e

Motor is on the way. Can I use a single Toggle switch for Forward-Neutral-Reverse, Neutral being off, F & R on?

 "Billy G"


----------



## jgedde (Jun 24, 2013)

Bill Gruby said:


> I am sold on the KL-4030. Will order today. By Arduino so you mean this? http://www.ebay.com/itm/Arduino-MEG...390?pt=LH_DefaultDomain_0&hash=item3a82566d8e
> 
> Motor is on the way. Can I use a single Toggle switch for Forward-Neutral-Reverse, Neutral being off, For R on?
> 
> "Billy G"



Yes. It will need to be a dual pole, dual throw (DPDT) with a center off position wired like this:



Note I specified 5V. If you want to use a higher voltage, you'll need to add series resistors in the DIR+ and ENA+ lines. If you need to use a higher voltage, we can help you pick he right resistor.

If after wiring it all the motor turns the wrong way for your switch position, just reverse one pair of motor leads.

I tend to think you'll have more aggravation with an Arduino and programming then just using a pot and a 555 circuit (which can definieitly sink enough current to drive the optocoupler in the KL-4030). All you need is a variable frequency pulse train and an Arduino has vastly more capability... This thing is cheap! http://www.ramseyelectronics.com/cgi-bin/commerce.exe?preadd=action&key=UT5 This circuit will feed the "STP" inputs: not shown above.  There is no need to turn off the step pulses when the motor is disabled.  The driver simply ignores them.

John


----------



## DMS (Jun 24, 2013)

There are a couple versions of the Arduino, I think that is one of the "high end" versions. Here is the basic one, few bucks cheaper

http://www.amazon.com/Arduino-Duemilanove/dp/B001VK18HC/ref=aag_m_pw_dp?ie=UTF8&m=A30ZYR2W3VAJ0A

You may be able to use a single switch for on/off, start/stop, but I would have to ponder on it. Basically you have 3 inputs on that motor driver. 

* Step (that's where your pulses go)
* Direction (ON is one direction, OFF is the other)
* Enable (turns the thing off when you connect 2 things together). By OFF, that usually means the motor is free-wheeling.

You can also "stop" the motor by not sending any more pulses to it. If you use enable though, it will be easier to wind the tool back by hand if that is what you want to do. If you use the enable signal, I think you will want a separate switch for on/off and direction.

- - - Updated - - -

Ok, Jgedde is obviously smarter than me, his proposal looks just fine  Though, it wasn't clear in the docs whether tying enable to 5v enabled, or disabled.


----------



## jgedde (Jun 24, 2013)

DMS said:


> There are a couple versions of the Arduino, I think that is one of the "high end" versions. Here is the basic one, few bucks cheaper
> 
> http://www.amazon.com/Arduino-Duemilanove/dp/B001VK18HC/ref=aag_m_pw_dp?ie=UTF8&m=A30ZYR2W3VAJ0A
> 
> ...



You're right the documentation is poor. Looking at the documentation again I saw the note about leaving the ENA pins disconnected meaning enabled. Nope, I'm not so smart... Dumb as a stump and twice as ugly, actually. Thus, the wiring diagram I gave above will not work. The motor will only run when the switch is in the neutral position!

The driver wants to see 10mA of current on its input pins, so you'll need a transistor in there too, like this (or two separate switches):




John

- - - Updated - - -

Oops, The second resistor in the base of the transistor is not needed. I forgot to erase it (it's the one oriented horizontally).


----------



## Bill Gruby (Jun 24, 2013)

OK people, we are looking good. Please let me digest what is here so far and we will go from there if there are no questions. Thank you one and all.

 "Billy G"


----------



## awander (Jun 25, 2013)

Just a bit of a quibble-the stepper motor is not "bipolar" or "unipolar"-the linked motor is an 8-wire motor and that means it is about as versatile as a 2-phase stepper can be. It can be run from a unipolar drive, or it can be run from a bipolar drive in series, parallel, or half-winding modes.

The Linistepper is a unipolar drive, and it would work fine with this 8-wire stepper motor.

A 4-wire motor would not be capable of unipolar operation, but any 6- or 8-wire 2-phase stepper can be driven by either a unipolar or a bipolar drive. 

I know the OP stated the motor was "bipolar", but that is incorrect. And the question itself was not really a good one, "What kind of stepper motor is it? (Bipolar, Unipolar, 3-phase, etc.)". I think a better question would have been "What kind of stepper motor is it (how many wires, how many phases)".

It looks like a pretty nice motor, BTW,

Andy Wander


----------



## Bill Gruby (Jun 25, 2013)

So you are saying I need this driver instead?

http://www.ebay.com/itm/Linistepper...787?pt=LH_DefaultDomain_0&hash=item43baf98ddb

 "Billy G"


----------



## DMS (Jun 25, 2013)

He's just saying that the motor you chose can be hooked up as either Unipolar or Bipolar. If I were you, I would stick with your original driver choice; running in a bipolar configuration usually lets you get more "oomph" out of the same motor. Bipolar drivers are usually a bit more, but I think it's worth the extra $5 or $10.


----------



## Bill Gruby (Jun 25, 2013)

I'm lost. This is what happened the last time I asked. I've run the lathe without auto cross-feed till now Ok, guess I'll keep doing without. Thank you all for the help, it is greatly appreciated, I just don't know how to use it. I'm old school.

 "Billy G"


----------



## DMS (Jun 26, 2013)

Just disregard the last two comments, and you'll be fine Bill


----------



## Bill Gruby (Jun 26, 2013)

No, I won't I'm afraid. I am going to modify a mechanical unit to fit my lathe. I will have to redesign the carriage somewhat but this is what I do and what I am good at. You all for the most part have been patient with me and I appreciate that.

 "Billy G"


----------



## Bill Gruby (Jun 26, 2013)

Thank you for the offer . but I'm afraid that electric is out of the question.  As before when this was brought up everything was OK then someone says it's not OK. Someday CNC things will become an equal opportunity for everyone.  Mechanical is straight forward.

 "Billy G"


----------



## jgedde (Jun 26, 2013)

awander said:


> Just a bit of a quibble-the stepper motor is not "bipolar" or "unipolar"-the linked motor is an 8-wire motor and that means it is about as versatile as a 2-phase stepper can be. It can be run from a unipolar drive, or it can be run from a bipolar drive in series, parallel, or half-winding modes.
> 
> The Linistepper is a unipolar drive, and it would work fine with this 8-wire stepper motor.
> 
> ...




You're mostly right. Bill's motor can be run as you state. But, there is a difference between _dedicated _unipolar and dedicated bipolar motors motors internally. A unipolar is wound a bit differently to maximize the torque you can get with only one of the four "phases" energized. In addition, unipolar driven motors generally microstep poorly. In other words, there's a discontinuity in the position as the commutation sequence crosses through the motor's inhernent detent.

Bill's motor can indeed be run as as a unipolar, but he would get significantly less torque (usually 50% of the bipolar torque, but could be 70.7% if commutated differently). 

Electrically, a unipolar motor is like a bipolar motor with a center tap brought out of each of the two active phases. So what do we have: unipolar=ease of commuation, less torque per unit size (K sub m), bipolar=harder to commutate (more circuitry required), better suited for microstepping, more torque per unit size.

John


----------



## DMS (Jun 26, 2013)

If you're talking about a regular DC gear motor, I think you'll be happier with that anyway. The controls are simpler, and they are analog, so you should get smoother output. I have some motors that were intended for a power windows in a car, and they would work fine for this. Another option is a cordless electric drill. Once the batteries go, people are eager to get rid of them. They have powerful motors, a decent gear train, and a built in speed controller.

Incidentally, this is exactly the setup that hardinge uses on their toolroom lathe; power feed (not threading) is controlled by a DC gear motor. Never used one, but supposedly it works fabulously.


----------



## jgedde (Jun 26, 2013)

DMS is right. Using a DC gearmotor with an output torque rated as described earlier, will work exceptionally well. Raiding a cordless drill for parts could be good idea.

John


----------



## jgedde (Jun 26, 2013)

Or throw one of these on your lathe: http://www.ebay.com/itm/High-torque...ltDomain_0&hash=item257cb37b8f#ht_4073wt_1165  add a DPDT switch for reversing and a cheap variable DC supply and you're all set.

John


----------



## Tom Griffin (Jun 26, 2013)

A DC motor with a gearhead would be much simpler for your application Bill. Rather than a "cheap" DC supply though, I would suggest using a pulse width modulated (PWM) supply (still inexpensive). They pulse full power to the motor and generate a lot more torque than just varying the voltage to control speed. Power feeds use PWM supplies, which is why you can feel them pulse at slow speeds.

*Herbach & Rademan* is an excellent source for DC motors and I believe they have PWM supplies as well.

Here's a *PWM supply* with reverse for $10. It's only 10 amps, but larger ones are available.

Tom


----------



## stupoty (Jun 26, 2013)

TomG said:


> A DC motor with a gearhead would be much simpler for your application Bill. Rather than a "cheap" DC supply though, I would suggest using a pulse width modulated (PWM) supply (still inexpensive). They pulse full power to the motor and generate a lot more torque than just varying the voltage to control speed. Power feeds use PWM supplies, which is why you can feel them pulse at slow speeds.
> 
> *Herbach & Rademan* is an excellent source for DC motors and I believe they have PWM supplies as well.
> 
> ...



arn't most milling table power feeds made this way?  

Does have a lot of advantages of simplicity.  Combined with a high reduction geat box you could achive some good torque.

Stuart


----------



## jgedde (Jun 26, 2013)

TomG said:


> A DC motor with a gearhead would be much simpler for your application Bill. Rather than a "cheap" DC supply though, I would suggest using a pulse width modulated (PWM) supply (still inexpensive). They pulse full power to the motor and generate a lot more torque than just varying the voltage to control speed. Power feeds use PWM supplies, which is why you can feel them pulse at slow speeds.
> 
> *Herbach & Rademan* is an excellent source for DC motors and I believe they have PWM supplies as well.
> 
> ...



A PWM driver is ideal!  I wasn't aware they made them that inexpensively...  But, now that I think about it, it makes sense.

Sounds like you've got your answer Bill:  A DC gearmotor and a PWM driver.  Doesn't get much simpler than that.  All you need is a 12-40V source.

John


----------



## Bill Gruby (Jun 26, 2013)

One more question. Will a gear motor also freewheel? I know that some won't with the worm gear drive.. There will be times that hand movement will be better. If it can't this can be overcome by letting one cogged pulley slip when needed.

 "Billy G"


----------



## awander (Jun 26, 2013)

Bill Gruby said:


> So you are saying I need this driver instead?
> 
> http://www.ebay.com/itm/Linistepper...787?pt=LH_DefaultDomain_0&hash=item43baf98ddb
> 
> "Billy G"



No, you can use the KL-3040, and will probably get better performance with motor hooked up bipolar.

Just saying that you could also have used the linistepper.

Unfortunately, folks sometimes label motors as "unipolar" or "bipolar", when this is really describing the drive, and the hookup..

As I mentioned, an 8-wire motor will work with either unipolar or bipolar drives, So will a 6-wire motor. A 4-wire motor will only work with a bipolar drive.


----------



## DMS (Jun 27, 2013)

A gear motor won't freewheel (well, worm drives won't, a regular gear reduction drive _will_ with a lot of effort). Easy solution is to slip the belt, or to add a dog clutch. 

MrPete had a video where he did this on this on an atlas I believe. He used an industrial controller and motor out of an old welding wire feeder. IIRC, he just had a V belt pulley on his lead screw, and removed the belt when he wasn't using the power feed. This was for the longitudinal feed of course, but no reason you couldn't do it for the cross slide if you can get access to the screw. 

Here's the video [video=youtube_share;3DlPDr4f6xQ]http://youtu.be/3DlPDr4f6xQ[/video]

If you go the DC route, that speed controller TomG posted looks like a great deal.


----------



## jgedde (Jun 27, 2013)

Hi Bill,

I'm not sure if you mean freewheel as in overtravel after you shut off, or backdrive. It's true that the stepper motor will just stop and hold. A gearmotor, especially one with a high reduction ration (like the ones given as examples), will generally stop very quickly. You can stop it even quicker if you wire your motor switch such that the (+) and (-) leads are shorted when you turn it off.

Whether a motor will or will not backdrive is another matter. Generally speaking, a worm drive gearbox will not backdrive, but you can under certain circumstances - usually causing undue wear to the worm gear (the gear that's normally driven by the worm).

A non-worm gear box _can _be backdriven, but you have to satisfy some requirements first. All motors (even so-called cogless motors) have some detent torque. In addition, there is static friction (AKA stiction) and kinetic friction (AKA running friction) to consider. Assuming the gearhead is 100% efficient (which they never are), the torque required to backdrive a gearmotor is the gear ratio times the sum of the restraining torques (stiction + detent for a stopped motor). There are a few more contributors, but those described above are the major players.

_All that theory being what it is, I've been presuming all along that you're simply planning to drive your existing leadscrew with a stepper or gearmotor. If this is the case, no worries. It's difficult to backdrive a leadscrew alone. Adding the gearmotor to it, menas you have to overcome the backdrive torque of the leadscrew PLUS the backdrive torque of the gearmotor. If you have a ballscrew, the situation is a bit different, but you still have to overcome the backdrive torque of the gearmotor.

_All in all, I strongly believe things will all work out fine with a gearmotor -especially if you use one with a large reduction ratio.

If you end up using a stepper, you have one more thing to consider.  Steppers have significant unpowered detent torque which you'd need to overcome when using the cross slide manually.  The best bet, in both the gearmotor and stepper case, would be to have some method of disengaging the motor from the leadscrew for manual operation.  Say a mechanical or solenoid operated tooth clutch or particle clutch or one of your own design.

John


----------



## Bill Gruby (Jun 27, 2013)

By freewheel I mean the motor must be able to be disengaged so I can adjust manually for OD cutting and bore cutting. I only want the auto mode to face cut.

 "Billy G"


----------



## Tom Griffin (Jun 27, 2013)

Bill,

In my experience, back driving gearmotors is generally a bad idea, it's not only cumbersome, it's also hard on the gear train. I would drive the feed through a dog clutch. Then the clutch could be disengaged for manual feed or re-engaged for power. Make the dog clutch with lots of teeth to make it easier to engage, or better yet, use a toothed clutch. They are easy to engag and will probably handle more than enough torque for your application.

Tom


----------



## DMS (Jun 27, 2013)

Just found this vid via a link from CNC Zone http://www.cnczone.com/forums/gener...1-home_made_cross_slide_power_feed_small.html

He's got the motor and drive box mounted to the carriage, and then just uses a rubber belt to drive the dials directly. Pull the belt off to disengage.

[video=youtube;08fmpfDY0I4]http://www.youtube.com/watch?v=08fmpfDY0I4[/video]

His looks like maybe a 9x20. What type of machine is yours Bill?


----------



## Bill Gruby (Jun 27, 2013)

DMS;

  That is a Jet 9X20 same as mine. Gonna look close at that one. Tom, Dog Clutch is also a good idea. John, we're missin a little closer.  :lmao:

 "Billy G"


----------



## Bill Gruby (Jun 29, 2013)

OK these for me



 PWM --  http://www.ebay.com/itm/Reversible-...510?pt=LH_DefaultDomain_0&hash=item4d015e815e

 Power Supply -- http://www.ebay.com/itm/Facts-Engin...496?pt=LH_DefaultDomain_0&hash=item232c22c4e8

 Motor -- http://www.ebay.com/itm/High-torque...ltDomain_0&hash=item257cb37b8f#ht_4073wt_1165


 As for disengaging for manual  I will use an arbor with a Dog Clutch at the motor, Already on paper.


"Billy G"


----------



## Tom Griffin (Jun 29, 2013)

Yup, that'll generate enough torque to twist your arm off.


----------



## Bill Gruby (Jun 29, 2013)

Thanks Tom. Everything is ordered. This story will be continued in  "Other Projects"

 "Billy G"


----------



## Bill Gruby (Jul 2, 2013)

Everything should be here over the next 2 weeks.

 "Billy G"


----------



## Bill Gruby (Jul 3, 2013)

Power Supply has arrived. It larger than I expected but will fit where I want it to.

 "Billy G"


----------

