# Basic CNC



## Bill Gruby

I have gone over this board a several times now looking for basic info. Most times I have found that it is assumed that you already know what happens up to a certain point or you would not be asking. This is not true in a lot of cases. Also there are some who will not ask for various reasons.

So here is my plan -- Ask a basic question and get the answer in this thread. Simple --- not really. I would bet there are dome here that do not know how a stepped motor works. I didn't till this morning? I didn't even know that there is more than one type.

 This is stickied to the top so it does not get lost. You neophytes just post whenever you feel the need to ask about something.

One thing I woud ask of those answering, please do not assume anything. And remember you startes an sero knowledge too.

"Billy G" :thinking:


----------



## Bill Gruby

What is a Stepper Motor and why is it needed instead of a normal DC Motor?

 "Billy G" )


----------



## Mid Day Machining

Great topic Bill. I'm sure there will be lots of questions. I'll chime in where ever I can help.


----------



## joe_m

I'm still trying to figure out what I need to do for CNC, but I think I can answer the stepper motor question.
A regular motor just goes round and round (or back and forth if it's a windshield wiper motor.) A stepper motor shaft goes round in *steps or increments. *It takes a pulse of power and the shaft rotates a set amount. That amount doesn't vary - one pulse of power and it moves one step. The step might be 1/10 of a full rotation, 1/4, 1/3, whatever - but it will be the exact same each time. And since CNC relies on the computer moving the x/y/z axis of your mil or lathe in very precise measurements you need a stepper motor. 
For example: Your computer program says "move the X axis .01 to the left before making this cut" and if your stepper motor is geared up to the x axis in such a way that each pulse of power makes it rotate just enough to move .005 then the computer will tell the motor to take two steps. 
With a normal motor you get on and off and you just can't control the on/off precisely enough to  get the controlled movement you need. 

That's my understanding of stepper motors. 
Joe


----------



## xalky

That's a very good explanation. A servo motor does basically the same way except that it has feedback that tells the controller that it did indeed move 2 steps, at least that's how i understand the difference between a stepper and a servo.


----------



## Bill Gruby

Let's try not to add to any confusion. The original post was Stepper versus Normal DC. Once this is answered we can move to Servo Motors. We need to go sloooow here. No harm done yet folks, just staying on top of things.

 DC motor move in a continuous rotation. Stepper moves in steps caused by electric impulses. Simple as that???

 "Billy G"  :thumbsup:


----------



## jumps4

I have nothing to add here joe is right about how it moves
the size of the motor has to be large enough to make sure the step is made or everything goes out of position. the computer tells the motor to move the required amount of steps. but in most hobby machines has no way of knowing if it did move that exact amount.
the dc motor you set a speed and direction and "you"  have to stop it when it reaches the point you wanted
are we going the direction you wanted bill?
steve


----------



## Bill Gruby

In less that three hours this thread is off the original question. Yes Servo motors are used -- Reason, greater accuracy. If this thread is going to work we have to stay on track. DC Motors (as in tread mill) vs Stepper Motors. That is the original deal. One step (pun intended) at a time please.

"Billy G"


----------



## jumps4

if you just want to turn a motor at a set speed: dc motor
if you want to turn at a exact speed and number of turns: stepper motor
steve


----------



## 7HC

So to sum up so far in regard to 'regular' DC motors vs stepper motors, a regular motor will spin continuously when current is applied, while a stepper motor requires a more specialized input, usually from a computer, to tell it to move a step at a time like a ratchet.
The computer tells it how many steps and how quickly to go from step to step.  If it moves from step to step really quickly it can appear to be moving like a regular motor, but that's just an illusion.

So far so good?


M


----------



## jumps4

here is a training artical in laymans terms that explains everything including the inner working of both types of motors the videos are really good and easy to follow. well worth reading and watching.
http://pcbheaven.com/wikipages/How_Stepper_Motors_Work/
steve


----------



## Bill Gruby

Steve;

The original objective was this:

1 -- What is a Stepper Motor

2 -- What is the differance between a Stepper Motor and the normal DC Motor.

3 -- Why is the Stepper Motor necessary

Thats it. It is to bring everyone to the same level slowly. There are many out there that would like to know these things in the order they are used. I for one only know enough to be dangerous. This thread is to start at square one and build from there. Assume nothing.

Nothing is off topic yet, just out of order. All motors will be touched on in the next question that I have. Let's get this one out of the way first. I know it will be tough not to jump right in with what is known by some. I just want to move slow so no one is left behind.

Hope that explains where I am comming from with this thread. If for some reason it starts to wander, all of you feel free to pull it back. I can't be here 100% of the time. This is your thread, all of you, slow it down if you start to lag behind.

"Billy G"


----------



## Bill Gruby

Can and will do. I started a file on my computer for just that reason. Thank you Steve. I see a long road ahead for this thread, with a great destination.

 "Billy G" )


----------



## DMS

I'll take a shot at the 3 questions here

1 -- What is a Stepper Motor

A stepper motor is a electro-mechanical device used for positioning. Specifically it uses electrical signals to change the physical configuration of the device. The most common is to rotate a shaft (rotary stepper), but linear steppers are also available which convert electrical impulses into linear motion. Rotary steppers rated as having a certain number of steps per revolution (the number of pulses, or steps, that cause the shaft to rotate 360 degrees). The most common are 200 steps per revolution (1.8 degrees per step).

Things to keep in mind about stepper motors.

* They have high torque at low RPM.
* They have low torque at high RPM
* When power is removed they have only a small amount of holding torque
* They are relatively heavy for the amount of power they put out.
* You can't just hook a battery up to them and make them "go", they require some sort of controller.
* There are several ways to make a stepper motor, but this doesn't matter in practice (IE, doesn't matter how they work, as long as they have enough torque)
* There are several ways to wind the coils of a stepper motor, and this DOES matter in practice because there are different types of controllers, and the controller has to match the motor you are using. The 2 winding types are "bipolar" and "unipolar". You will commonly see these words listed on both motors and controllers. Bipolar motors have 4 leads, and require a bipolar controller. Unipolar motors have 6 wires, and are best driven by a unipolar controller; they can be used with a bipolar controller, though it is not optimal (usually you need to run them at reduced current or they overheat). Some motors have 8 wires, and these can be used as either unipolar or bipolar depending on how they are wired.

2 -- What is the differance between a Stepper Motor and the normal DC Motor.

By "normal DC Motor", I will assume this refers to a brushed, permanent magnet DC motor, the kind you find in kids toys, model cars, and cordless drills. As stated above, stepper motors move in a controlled fashion based on electrical input.

Would it surprise you to learn that DC motors ALSO move in a controlled fashion based on electrical input? They do, but the behavior is different. With stepper motors, 1 pulse == 1 step == a known amount of rotation of a shaft. With DC motors, a fixed voltage == fixed RPM, and a fixed current = a fixed Torque. If you reverse the voltage, the motor reverses direction (think, drill forward, drill reverse). 

While trying to stay on topic, and not go too far down this path, if we put a sensor on the output of the DC motor (this is called an "encoder") that tells us the exact position of the motor shaft, we can adjust the voltage (hence speed) and current (torque) on the motor to zero us in on the position that we want. This is a servo-system, and the dc motor in this system is called a servomotor.

So let's see if I have answered the question here. Stepper motors take pulse inputs, and require a controller to make them "go". We talked about how we can make a DC motor go at the right speed, but we don't know _where_ it is unless we add an encoder. Something has to look at the output of the encoder, and adjust the input of the motor to get it in the right spot. We can't do it by hand, which means, you got it, a controller.

So, for position control (the thing we really need in CNC to move the cutter to point A in a controlled fashion) we can use

1) Stepper motors + controller
2) DC Motor + encoder + controller (a servosystem)
3) Any number of other technologies that let a computer control the position of the machine axes. (see, the how is not as important as the what).

There are benefits and drawbacks to all systems, including speed, torque, cost, ease of use.

3 -- Why is the Stepper Motor necessary

In the answer to #2, my conclusion is that "stepper motors are not necessary". Rather, positional control is necessary, get it however you can. Steppers are a good choice for this. They are certainly the lowest cost, easiest to use solution, and they give good performance. 



Sigh... this post is already TLDNR, and I haven't even touched on closed vs open loop control, which is the main difference between steppers and servos...


----------



## Bill Gruby

You stopped in the right place. I am taking notes while I watch this thread. Closed vs open loop steppers will be covered later. Thanx Matt.

 "Billy G"


----------



## Bill Gruby

Thank you all, great stuff to this point. Let's move ahead a little to "Open and Closed Loop" motors. I believe we can also add "Servo Motors to this one. It's all yours. Any takers?

 "Billy G" :thinking:


----------



## DMS

John Hill said:


> As I understand DC motors, those with brushes and commutators are really like stepper motors in that they have multiple coils that are energised in turn.  In a stepper motor these coils are energised in turn by the controller electronics whereas in a commutator motor it is the commutator that as it turns energises the coils in sequence.  As an aside, I am sure that some sort of commutator could be fashioned on a stepper to make it run as a DC motor.
> 
> Permanent magnet motors have a static magnetic field and the coil that is currently (excuse the pun) energised will seek a particular position according to the field so energising coils in turn causes the motor to rotate. This is true of commutated DC motors and stepper motors.
> 
> AC motors are quite different in that it is the magnetic field that moves and the armature of the motor turns to follow the moving field.



What SSSFOX was (I think) what is referred to a "Brushless DC Motor" or BLDC motor. They look a bit like a stepper motor internally. They don't have a commutator and brushes (one of their benefits). Instead, they have a controller which serves the same purpose. They are referred to as "electrically commutated".

And yes, they can also be used to drive a CNC axis, or a spindle for that matter.


----------



## jumps4

to add a little there are encoders for stepper motors that send pulses to the software to say if a step is missed and correct it or stop if not possible, that is a closed loop stepper motor system and glass scales can also be used instead of encoders. the more accurate of the two is glass scales in this method the software is always correcting for flex and backlash because it knows where the part is and not just if the motor moved
steve


----------



## DMS

To add to what John and Steve have said...

A closed loop system lets you not only know where you want to be, but where you actually are. An open loop system only lets you know where you expect to be. This is something to keep in mind when designing a stepper based system. Always get steppers that are large enough, and don't push them past their limits. If you try to get more torque out of a stepper than it can deliver it will "loose step". In other words, you will send a pulse, but the rotor will not move as expected. You think you are at 1.010" in X, but really, you are 1.0095. In practice, if you loose steps, you tend to lose a bunch. Every time you loose a step, the controllers idea of where you are gets further and further from reality, and you end up with bad parts. This should not happen if you don't overload the system.

If you try to overload a servo system you will still be in a bad place, but instead of finishing the part, the controllers will fault. This will shut the controllers down down, and let you know things are bad. Maybe letting you save the part if things haven't gone too far, or maybe just letting you know to dial down your feeds.


----------



## jumps4

mine are micro stepping they are set to 2000 steps per rev or since i have 5tpi screws 10000 steps per inch
the 200 steps 1.8 degrees is in their most basic operation and way to jumpy of a setting for most cnc machines. when they are set that way there is a lot of vibration that is sent back to the table the motor sitting still will vibrate bouncing back and forth like a tuning fork vibrates.
are we still in line with the goal bill or jumping too far too fast?
steve


----------



## Bill Gruby

You guys are right on track, but soon you will be in unknown territory for me. That is what I expect to happen. You will have to set the pace yourselves then. I hope there are some new people watching this. The view count is tough to read and get an indication from. Great information. I don't think this approach has been tried anywhere. Keep up the good work.

 "Billy G" :thumbsup:


----------



## Bill Gruby

We will give this a day or so before moving on. I want the new to CNC guys to be sure they understand so far. Please if you are new to this ask any questions you have. If something was left out that you wish to know ask. We don't know id you are understanding the info if you do not tell us. If you do not want to post the question here PM me and I will put the answer out here to be seen.

Again thank you to all who have shared their knowledge with us so far.

"Billy G"


----------



## Bill Gruby

I got three good questions in a PM I will list them one at a time. As one is answered I will list the next. Here goes.

What is the differance in wired motors. One has 4 wires, one has 6 wires, one has 8 wires? Feel free to take this question right thru BiPolar. UniPolar.

"Billy G" :thinking:


----------



## DMS

I mentioned this in one of my earlier posts, but it was pretty long, and didn't go into much detail. I guess, lets start with what we mean by unipolar and bipolar wound motors.

Unipolar motors:

These are the "6 wire motors". They have 2 windings, each with a center tap (2 ends+1 center tap = 3 wires per winding). The benefit of unipolar motors is that they are simple to control. In practice, the center tap is connected to the (-) side of your power supply. One switch (usually some type of transistor) is connected to each end of each winding (a total of 4 switches). Only one switch per winding is activated at a time, meaning, only half of the winding is in use at any one time. This is kind of wasteful (unipolar motors are less powerful than bipolar motors for a given weight). Keep in mind that the switches are almost always integrated into the controller. They are one of the costliest part of the controller, hence the desire to limit the number.

Bipolar motors:

These are the "4 wire motors". They have 2 windings, just like a unipolar motor, but with no center tap. The benefit of the bipolar motors is that they are lighter than unipolar motors for a given amount of power. They also tend to be capable of higher speeds than unipolar motors. The key drawback of bipolar motors is that they require a more complicated controller. Instead of having one wire from the coil always connected to (-), the controller with connect the wires from a given winding between (-) and (+) of your power supply. It alternates which side is positive, which side is negative, and which coil is on or off at any given time. Here is a table to illustrate what is going on

	Coil 1		                Coil 2	
	Wire A	Wire B	Wire C	Wire D
0	(+)	         (-)	        nc	        nc
1	nc	         nc	        (+)	        (-)
2	(-)	         (+)	        nc	        nc
3	nc	         nc	        (-)	        (+)

After sequence 3, the cycle repeats. Going in reverse order reverses the direction of the motor.

You may be asking yourself how the controller switches the inputs on and off, and reverses the polarity on the coil. It does it using a circuit called an "H-Bridge". It's very common in power electronics. It is made up of 4 switches (transistors), and we need 1 for each coil, which means for a bipolar controller, we need 8 switches (twice as many as we need for a unipolar driver). The truth is that he relative cost of high current transistors has come down considerably in the last 10 years, so the reasons for using unipolar motors have mostly evaporated. If given a choice, I would always go for a bipolar controller/motor.

Where do the "8 wire" motors fit?:

8 wire motors are wound with 4 separate coils (2 wires per coil * 4 coils == 8 wires). Because of this you can wire them in either a bipolar or a unipolar configuration. The trick is doing this the right way. You can figure things out with a voltmeter, and and some trial and error, but its better if you can track down the manufacturers datasheet.


----------



## 7HC

DMS said:


> I mentioned this in one of my earlier posts, but it was pretty long, and didn't go into much detail. I guess, lets start with what we mean by unipolar and bipolar wound motor.................................



If I understand you correctly, unipolar motor is heavier and less powerful than a bipolar motor, and the only disadvantage of a bipolar is that it requires a more complicated controller?

However, the controllers I've looked at (assuming that a controller and driver are the same thing?), make no distinction as to the configuration of motor that they control.

What puzzles me me is the eight wire motor that can be wired as either a unipolar or a bipolar.
What purpose does a motor serve that can be used as the least favorable option as well as the most?  :thinking:


M


----------



## arvidj

Bill Gruby said:


> Let's try not to add to any confusion. The original post was Stepper versus Normal DC. Once this is answered we can move to Servo Motors. We need to go sloooow here. No harm done yet folks, just staying on top of things.
> 
> DC motor move in a continuous rotation. Stepper moves in steps caused by electric impulses. Simple as that???
> 
> "Billy G"  :thumbsup:



I think the group may have moved on but I wrote this yesterday and did not wasn't to just throw it away ...

Ok, here is my take on it.

First, lets talk about how any electric motor works.

Lets start with just a very simple bare shaft inside a very simple empty housing. Add bearings on the end of the shafts as necessary so the shaft can easily spin.

Great prototype, except it doesn't do anything because it is just a shaft and a housing. We need to improve on this design. Setting the prototype aside for a moment go back to our childhood days and think about the fun we had with two magnets. We thought it was magic that if we had two magnets and tried to push the two 'N' of the magnets together they would repel one another and if put the 'N' and 'S' ends together it would take some force to pull them apart.

The interesting part was that the 'force' was invisible and therefore somewhat magic. If we used used a lever or a pry bar to push things apart it was not magic as we could see the lever or pry bar touching the two items and therefore it was obvious what was pushing them apart. The same way if we used a bolt and a nut to pull two things together ... it was obvious what was happening. But these magnets and this thing called magnetism ... able to push thing apart and pull thing together without the need for a physical connection between the two items. It was an invisible magic force with the only minor constraint being that both items had to be magnetic.

"the only minor constraint being that both items had to be magnetic" ... lets address that immediately. There are two common ways to "be magnetic". One is to be a magnet in the first place ... like the kind you were playing with as a kid. The other way would pass electricity thru a strand of any conductive material. Around this strand of conductive material will be a magnetic field ... i.e. be a magnet. Great, we now have a magnetic we can can control by simply turning the electricity on or off.

But our solution to the 'we need a magnet' has a minor problem. The magnetic field around a single conductive strand is relatively weak. It can be measured ... has been since the early 1800's ... but it is not strong enough be of much use. But again, we can resolve that issue by taking a long strand of our conducting material, covering it with an insulating material that does not conduct electricity then wind the strand up in to a coil. Note that we need to use an insulated conductive material to keep the conductive material in each wind of our from touching each other. If the conductive material of one winding touches the conductive material of another winding you have what is called a 'short' and very shortly will utter the words "where did that smoke come from".

Anyway, now that we have a coil we will notice that when we pass electricity thru the conductor the magnetic field is much stronger and something that we may be able to put to use. Of course we can improve on this basic design by winding the coil around a suitable material ... like an iron core ... and being very careful and creative about the exact winding of the core, but at least we have a basic understanding of what id going on.

So now, back to our prototype shaft and housing. What would happen if we put a magnet ... either the static kind we used as a kid or our second generation controllable "electromagnet" on the shaft and also put another magnet ... again static kind we used as a kid or our second generation controllable "electromagnet" on the housing. If we put the magnets on the shaft and the housing in the proper orientation we would see that the magnets would attract or repel each other and in the process turn the shaft.

Great, we now have a "magnetic" motor in that the shaft will turn ... with a minor issue to be resolved. The shaft turned part way and then stopped. Not exactly what we had planned but at least it is progress. What has happened is that our design has a magnetic field on the shaft and a magnetic field on the housing that are static ... they do not change. So the two magnetic fields did what they were designed to do ... either were attracted or repelled each other and caused the shaft to turn ... but the shaft quickly reached a point of equilibrium and stopped turning.

Think about it for a minute. Lets assume the magnet in the housing and the shaft repelled each other. The magnet on the shaft would start turning away from the magnet on the housing but as the shaft rotated it would eventually rotate far enough that the magnet on the shaft would start going back towards the magnet on the housing ... and that can not happen because the magnets are set up to repel one another. So the shaft would turn and stop at a point where it was "happy" because it had turned as far away from the housing magnet as it could but also was "happy" because the magnet was not moving towards the housing magnet.

Note that we can apply the exact same logic if the magnets attract each other, just the shaft would "be happy" in a different location ... probably 180 degrees from where it "was happy" if they repelled each other.

At least our shaft was happy even if we aren't happy with our motor. We have to resolve this minor issue.

It would seem that if we could exert come control on the magnetic field we might be able solve this problem. Given that we have no control over the magnetic field if we use the static "kids" magnets we will throw out that design. No control means no improvement so to the trash with that one. But we are still left with three alternatives ... controlled magnetic field on the housing and static magnets on the shaft; static magnetic field on the housing and controlled magnetic field on the shaft; controlled magnetic field on both the housing and the shaft.

Now that we have agreed we will used a controlled magnetic field, what will we do with it. The obvious 'control it' but how. We saw that the shaft turned until it reached an equilibrium point. What would happen if we then altered the magnetic field in such a way that this equilibrium point changed. Maybe we put in a second coil mounted in a different location and orientation in either the housing or the shaft. We then turn on the original configuration and as soon as the shaft reach its equilibrium we turn off the original configuration and turn on the second set of coils. The shaft would then try to seek a "happy" spot based on the new magnetic field.

Our first try at this was not quite what we hope. When we mounted the second set of magnets Murphy intervened and the location was such that when the second set of coils were engaged the "happy" spot for this configuration was "behind" the "happy" spot for the first configuration so our shaft would rotate part of a turn clockwise and then part of a turn counter clockwise as it sought out the "happy" spot with each change. The shaft did not go around, just oscillated back and forth between the two position. But at least it is progress in that the shaft no longer just sat there. It was doing something, just the wrong thing.

We noodle over this minor issue for a little while and decide that if Murphy does not intervene, and we put the magnetic coils in the correct locations, and possibly add more magnetic coils, and then make sure the the timing electricity to of each of the coils is right, we can come up with a scheme where we energize and de-energize the coils in such a way as to keep the "happy" spot just a little bit in front of where the shaft is at any moment in time and therefore the shaft continually turns in the "correct" direction seeking out ... or chasing if you will ... the happy spot that is always just out of reach.

Note that we have not talked about steppers, servos, AC or DC up to this point. Just "how do electric motors work" ... at least from my perspective.

Assuming I am not banned from the board for being too long winded, too basic, etc., I can move on from this starting point to AC, DC, steppers and servos as we talk about how we can orchestrate or synchronize the "happy spot just out of reach" that we think will solve our problems. Or you can PM me and tell me to go away ... or publicly tell me to go away. I've been married for 28 years so I am use to harsh criticism.


----------



## DMS

7HC said:


> If I understand you correctly, unipolar motor is heavier and less powerful than a bipolar motor, and the only disadvantage of a bipolar is that it requires a more complicated controller?
> 
> However, the controllers I've looked at (assuming that a controller and driver are the same thing?), make no distinction as to the configuration of motor that they control.
> 
> What puzzles me me is the eight wire motor that can be wired as either a unipolar or a bipolar.
> What purpose does a motor serve that can be used as the least favorable option as well as the most?  :thinking:
> 
> 
> M



Hopefully I can clarify some things. I found this page from Gecko that is pretty good

http://www.geckodrive.com/support.html

Take a look about halfway through at figure 8 where they show a 6 wire (unipolar) motor connected in a bipolar fashion. Yes, this does work, but read the fine print; if you connect the controller across the two outer leads (leave out the center tap), you have to set the controller up at _half_ the rated motor current (otherwise you risk overheating the motor, which is bad mmm'kay). If you use half the coil (one end, and the center tap) you can run at the full current, but the voltage is gonna be less. Basically with any electric motor the rule of thumb is that torque is proportional to current, and speed is proportional to voltage. So you are basically trading off torque and speed. To top it all off, the motor is still not going to put out as much power as a bipolar motor of the same weight.

As far as why you would want to have an 8 wire motor. With an 8 wire motor, you can do a lot of different things, and tune the motor to your situation. Some people make their controllers, and in that case, unipolar is simpler. Also, in industry, sometimes nothing is more important than price. It's also easier for the manufacturer because they don't have to produce both a unipolar and a bipolar version of the motor.

Oh, and remember that thing I said about there being a tradeoff between speed and torque? With an 8 wire motor you can re-wire and get more of one or the other, or work around limitations (ie current) in your controller. 

Another thing I noticed is that the Gecko controllers don't say explicitly that they are bipolar... but they are. The drives from Kelinginc are like that too. I guess if you want to be sure, you gotta check the manual and see how to hook motors up to your given controller.


----------



## Bill Gruby

OK then, we seem to have covered question #1, it's on to #2. What is the differance in sizes aka Nema 17, 23, and 34?
 When would each be used?

 "Billy G" :thinking:


----------



## jumps4

the more torgue you need the bigger the winding needs to be nema is the standard for interchange if the requirement excedes the frame size 17 you move up to the next size 23 and so on  hey you forgot my nema42 4200 oz/in that motor has a 3/4" output shaft and is rated at over 1.5hp thats a heck of a stepper motor .
steve


----------



## Bill Gruby

OK, now on to #3 & #4.  "What is Micro Stepping?" "Why is it used" Combine these into one answer if needed.

"Billy G":thinking:


----------



## jumps4

ok i'll give this a basic shot
a stepper motor is controlled by pulses (steps) the common type has 200 steps in 1 revolution or 1 step every 1.8 degrees. microstepping is dividing 1 revolution into smaller steps with electronics. 1/2 stepping the motor would double the number of pulses it takes to complete 1 revolution 0r 400 pulses or .9 degrees per pulse. the greater number of pulses the motor uses the smoother it runs but because it does not reach full current in the time allowed per pulse the torque reduces. because the pc is limited in its speed it can send the pulses through a parallel port the controller handles the higher speeds. the higher the pulse the less torque the motor has but the accuracy of the motion increases.
if you were to use a stepper motor at the 200 steps per revolution mode connected to a 5 thread per inch shaft to move a milling table for example then one inch is only capable of being divided into 1000 steps ( 200 x 5tpi )or .001 per step. this sounds ok for most uses but the downside is that at slow feed speeds the steps are a series of hard thumps and vibration can be severe at some speed due to harmonics in the motor and drive parts. this all comes back to surface finish loss. now if you microstep that same 5tpi shaft at 2000 steps per revolution then it would require 10000 steps to move the table 1 inch. the series of thumps now is a steady buzzing. the downside is to get the torque at higher speeds you may need a larger motor or higher voltage. the pulses (steps) are too fast for the motor to reach full current in the time allowed per step.
most stepper motors are marked with voltage and amps, the amps are what is required to reach the advertised torque. the voltage is missleading and can be as much as 10 times what is marked. voltage is electrical pressure and because the step is so fast the motor does not have time to reach full current we raise the voltage ( pressure ) to make the motor reach the required amperage faster.
so a motor marked at 8v may be powered with a power supply putting out 80v.
 the other advantage of microstepping is accuracy the smaller we divide an inch the more accurate we can move the axis.
steve


----------



## jumps4

i'll add a little more
servo motor are controlled by a slotted wheel or pickup the senses the motors movement. the sensor is located on the motors shaft or the object being moved. it is a set number of divisions per revolution or distance and not changeable. for this reason stepper motors are more desireable for very fine movements. take todays microscopes to move an object at millions of an inch would be impossible with a servo motor because of the mechanical pickup. your not going to make a pickup with millions of slots for the sensor to detect. this has to be done with electronics. thats microstepping in the smallest of uses and may not be a motor that turns at all it may be a linear motor.
steve


----------



## 8ntsane

jumps4 said:


> the more torgue you need the bigger the winding needs to be nema is the standard for interchange if the requirement excedes the frame size 17 you move up to the next size 23 and so on hey you forgot my nema42 4200 oz/in that motor has a 3/4" output shaft and is rated at over 1.5hp thats a heck of a stepper motor .
> steve



Steve
Just want to verify that Nema 42 motor. You wrote 4200 oz/in, Is that accurate? Ive never seen one rated that hi. 
Straighten me out if I have it wrong. 


Edit:
Never mind, got my anwer on google :nuts:


----------



## DMS

jumps4 said:


> i'll add a little more
> servo motor are controlled by a slotted wheel or pickup the senses the motors movement. the sensor is located on the motors shaft or the object being moved. it is a set number of divisions per revolution or distance and not changeable. for this reason stepper motors are more desireable for very fine movements. take todays microscopes to move an object at millions of an inch would be impossible with a servo motor because of the mechanical pickup. your not going to make a pickup with millions of slots for the sensor to detect. this has to be done with electronics. thats microstepping in the smallest of uses and may not be a motor that turns at all it may be a linear motor.
> steve



The sensor type you are talking about is called an "incremental encoder". It can be a slotted wheel, a photo-etched glass wheel, or any of a number of other configurations. The key here is that incremental encoders don't know where they are, they only know how far they have gone. So, in order to get accurate position out of an incremental encoder, you need "home switches" (a topic we should cover in more depth later). Incremental encoders give you a pulse when you move forward, and a pulse when you move backwards (it's a little more complicated than that, but we'll leave that for later). Incremental encoders tend to be cheap, and operate at at very high speeds, in harsh environments. They are also very repeatable. 

Buuut....

That doesn't mean they are the only game in town. In the scenario you talked about with the microscope, you could do it with a stepper motor, yes. You could also do it with a servomotor, and an analog position sensor (like an LVDT or resolver). Neither of which you are likely to see in a home shop scenario, so this is kind of an aside. 

To get back on topic (and Steve touched on this). The PC that is running your software is limited on how fast it can send pulses to your motors. And this is going to effect the encoder that you get for a servosystem or whether you can use microstepping on you drivers (assuming they are capable).


----------



## jumps4

to overcome the limits of the pc and windows and the fact that the cnc controller is not directly tied to the pcs internal clock there are controllers that are themselves a cpu they have their own internal clock that is dedicated to just moving the axis and reading the encoders or scales. these controllers take only the locations or parts desired and do the steps and pulses internally they are much faster, many times faster allowing for greater microstepping and less likely to make a mistake or miss steps. examples are: smooth stepper, dynomotion and uc100. each of these are very different in the way you use them but all remove the load off the pc to make the steps required. with them you can listen to music on the pc if you wanted, it wont delay or interupt your motors working normal.
steve


----------



## Bill Gruby

It will take a little time to absorb what is being discussed at this time. So I will not post any question from me till we are all on the same page.

When everyone is comfortable with this we will move on. If I don't hear anything in a day or so I will poet the last question givin to me. PM me or post here if you are ready to move on. Thanx.

"Billy G" :thinking:


----------



## Bill Gruby

I  can only hope the the precedeing info was understood by all watching this thread. I see nothing posted or have received no PMs to the contrary. So it's time to move forward. There are three main components involved is a CNC set up. The Motor, power supply and encoder. Yes there is also the PC.  I will let the experts pick the next component to be discussed.

 "Billy G" :thinking:


----------



## jumps4

it's not encoder it driver
not all cnc has an encoder
are you looking for ballscrews next?
steve


----------



## Bill Gruby

Steve;

Pick it up where you think it should go next. I really don't know.

"Billy G"


----------



## 7HC

Ballscrews, Acme Screws (can't help but think of Wile-E-Coyote and Roadrunner :lmao, couplers, Delrin nuts, and the individual effects that each of these have on backlash when deciding on the components needed for a conversion, might be worth explaining by those who know.

I'll pick the easiest, couplers.

Two main types, the three piece 'LoveJoy' style and the single piece slit aluminum type.
Both allow for some small misalignment between the stepper motor and the driven shaft, and for a little expansion too, but the LoveJoy type has a far greater potential to introduce backlash over time as the center insert compresses.

Here are the coupler pics, and I'll leave the screw thread issues to those that know more than I do.

First the LoveJoy then the Split Aluminum:






M


----------



## jumps4

are we waiting on mike?
who is mike?
steve


----------



## Bill Gruby

My bad Steve. I was answering a PM at just before I posted. I fixed it. Not waitin on anybody in particular. Jump righnt in there.

 "Billy G" :thinking:


----------



## DMS

I guess I'll add a little onto 7HCs topic of couplers, including when you need them.

You want a coupler if you are using a motor to direct drive a screw of some sort (acme, ball, etc). They allow some miss-alignment between the screw and motor to exist without destroying the bearings in your motor or in the bearing blocks supporting your screw, and without introducing much backlash. If you use a rigid coupling, and the screw and motor shaft are not _exactly_ aligned (exactly), then when you bolt everything in place, the combined screw/shaft/coupler assembly is going to "dog leg" (somethings gotta give). When your motor spins you are gonna get a "cachunkachunkachunk", which probably won't be audible at low speeds, but you bearings will feel it. You can get a sense of it if you turn the shaft by hand, you will feel the resistance increase and decrease as you turn the screw. So, long story short, if you are going to direct drive, get some couplers.

Other than the 2 types that 7HC mentioned, there is also a type called a bellows coupler. As far as cost go, they tend to go (from cheapest to most expensive) lovejoy < helical-beam < bellows, which corresponding improvements in backlash with increased price.

In most cases, if you are using stepper motors, you are going to want to direct drive. This is because steppers have a lot of low end torque, and pretty poor high speed torque. If you are going with servos, they have a higher top speed, and a lower max torque, but the torque, but the torque is more even over the rpm range. That means that with servo motors you are likely going to want to gear down with a belt system, IE, no couplers.

One case you may have a stepper motor and not want to direct drive is if you have a really heavy load, like a z axis. In this case you can get a huge motor like Steve's NEMA42, or you can get a more standard motor and gear down. You will get slower rapids in your Z, but everything is a tradeoff.

Other cases where you may be using steppers, but don't want to direct drive are if you are using a direct belt drive, such as on some 3d printers (Prusa Reprap X/Y axis). These are typically really low load situations (low torque) and high speed. Incidentally, this is also how a lot of inkjet printers work. They have a head driven by a stepper motor and a toothed belt. They typically ride against an incremental encoder, and there are home and limit switches so the thing knows where to start. Pop one open some time, and you will see what I mean, lots in common with a CNC machine.


----------



## Bill Gruby

Gotta take us back for a moment or two. I just went to the Surplus Center link and they have Stepper Motors with high AC voltages and what I would consider minimal torque. What would they be used for?

 "Billy G"

http://www.surpluscenter.com/


----------



## jumps4

I'll try a little on linear slides, ballscrews and acme screws
To be honest I didnt do much reading on items I can't afford except to note the differences.
Most people think the main reason for a ballscrew is backlash, while this is a reason to use ball screws it is not a feature of a ball screw that most hobby machinists can afford. So lets talk about friction first. The motors used for cnc are small and required to move very heavy loads in exact amounts. Friction is the biggest enemy. If you have ever tried to turn the handle of a machine that has set for a while you will feel a snap before the axis begines to move. The torque has to overcome the friction or adhesion that is between the surfaces before moving. This is everywhere in most manual machines. The thread mating in the nuts the dovetails mating to each other and the slides. Once this adhesion is overcome the motion becomes easier. Its the theory of motion things that are still want to stay still, things that are in motion want to continue moving. This plays hell on accuracy and the size of motor to overcome the initial friction/adhesion and a change in direction multiplies this as the mass has to be stopped then started to change direction (this happens fast but at one point it does stop ).
We overcome this with ball bearings. Bushings are mated surfaces rubbing against each other and the lube holds them apart so they slide on the thin film of lube instead of each other. These bearing surfaces are everywhere in a mill or lathe the dovetails are bearing surfaces and require lube to keep the two surfaces from dragging on each other. Ball bearings work different they do not rub the other part they roll against it always in contact at two points. If i put a ball on a table and put a book on top and move the book the ball will roll as i move the book not slide. There is far less surface area touching each other so there is less friction. Now if all the balls are in a straight line and "exactly" the same size they will all roll together and not against each other. Here is where precision bearings come into this, if one ball is the smallest amount larger than the rest of the balls it will catch up with the others and eventually end up pushing the entire line of balls along. This has the balls now touching in 4 locations top bottom front and back. The front and back of each ball is turning the opposite direction of the ball it is mated against so the friction and heat doubles. So ball size is very important
The surfaces the balls roll on have to be perfect also, a high spot on the table and a book that cannot be moved up leaves a tight spot in the bearing surfaces. So the balls have to be no bigger than this point in their path. Everywhere else they will be a loose fit. This is the reason for precision grinding a ball screw and it's nuts internal route for the balls to roll in.
To make the ballscrew antibacklash all the parts must be in contact at all times. but not ball against ball and they continue to roll along the thread including a passage to return them back to where they started from in the thread.
Ball slides work exactly the same way and the balls roll along the two mated surfaces and are returned through a passage to start over.
The cost of real precision ballscrews and ball slides are to high for most hobby machinist but anything that reduces friction is an advantage for our machines so even less precision ballscrews are a big improvement leaving us to just deal with the friction of our slides. this requires constant lube.
I know there is a lot to add to this and probably corrections needed

Steve


----------



## jumps4

Bill Gruby said:


> Gotta take us back for a moment or two. I just went to the Surplus Center link and they have Stepper Motors with high AC voltages and what I would consider minimal torque. What would they be used for?
> 
> "Billy G"
> 
> http://www.surpluscenter.com/


 
thats the same thing all steppers run on a series of electrical pulses and that could be concidered ac.
thats a problem i run into  between manufacturers all the time. controller and driver are the same thing also pulse and step...
they are talking about the highest rated voltage we talked about driving the motor at higher voltages to get the amperage we need in the time allowed per step. they are giving the max.
steve


----------



## Bill Gruby

Question --- In a screw thread some backlash has to be present. Zero backlash on a screw thread equals zero movement. Is this the same with a ballscrew. I see many advertized as "Zero Backlash". Is it really "zero"

 "Billy G" :thinking:


----------



## jumps4

i'd say yes because they do not slide against each other, they roll against each other, zero is possible and even some preload but as temp goes up preload increases.
steve


----------



## Bill Gruby

I still question it Steve. I'm a little apprehensive. If you tighten to get to zero the closer you get the slower it will rotate. I may be out in left field here with this oine.

 "Billy G" :thinking:


----------



## DMS

Bill Gruby said:


> Gotta take us back for a moment or two. I just went to the Surplus Center link and they have Stepper Motors with high AC voltages and what I would consider minimal torque. What would they be used for?
> 
> "Billy G"
> 
> http://www.surpluscenter.com/



Take a look at the listed RPM on these guys (3000RPM!!!). That's way fast for a stepper. You would use this on a low load system where you wanted higher speeds (3d printer, plasma cutter maybe, router). 

I wouldn't use it for a mill though...


----------



## jumps4

the motor can turn 3000 rpm you just would not have any power out of it at that speed
my new motor said that also, they are set to 100ipm and with my screws that is 500 rpm they work fine.
if i took the screw loose and let the motor free rev and set mach to 600 ipm they would spin 3000 but i could probably stop it with my fingers
they can do it but for what reason? there is not time for them to reach full current per pulse/step so they have no power
steve


----------



## jumps4

Bill Gruby said:


> I still question it Steve. I'm a little apprehensive. If you tighten to get to zero the closer you get the slower it will rotate. I may be out in left field here with this oine.
> 
> "Billy G" :thinking:


 
if I put 3 hardened parallels in a vise with a ball on each side of the center one and closed the screw until there was no play/backlash i could pull the center one out with out any problem because the balls would roll, they dont need play to roll to an area the same size they were in. put the parallels together without the balls tighten the exact same amount and nothing could be moved.
steve


----------



## Bill Gruby

Now I see it, thanks Steve.

 "Billy G"


----------



## DMS

Bill Gruby said:


> Question --- In a screw thread some backlash has to be present. Zero backlash on a screw thread equals zero movement. Is this the same with a ballscrew. I see many advertized as "Zero Backlash". Is it really "zero"
> 
> "Billy G" :thinking:



There is a trick to this, and it depends on how the anti-backlash scheme is implemented. Also, it is "Zero backlash for certain values of zero".

First off, there are 3 common ways for implementing anti backlash on a ballscrew

1) Oversized balls

This involves loading the ball nut with balls that are slightly too large. The nut is forced to expand outward (and the screw slightly inward) because as always, somethings gotta give. This creates a load against all 4 contact points (2 on the nut, 2 on the screw) for each ball. This is the cheapest solution, and works really well, but is not adjustable for wear

2) Double nut, sprung

This is probably the second most common method. It involves 2 ball nuts, and a spring loaded spacer. The spacer forces the nuts apart, forcing one nut against the right side of the screw threads, and one nut against the left side of the screw threads. This can be used with lower quality screws because the spring loaded spacer allows for compliance when faced with inaccuracies in the screw pitch. It also adjusts for wear. The main trick here is that the load on your nut cannot exceed the spring load of the spacer.

3) Double nut, rigid

This involves using two ball-nuts, separated by an adjustable spacer. The spacer is adjusted to remove all play. Basically, one nut is pressing on the left side of the screw threads, and the other is pressing on the right side of the screw threads. This is the best, and most expensive solution, but requires a very accurate ($$$$) screw because variations in the screw pitch will cause variations in load on the rigidly mounted nuts. This type is adjustable for wear.

So, remember I said "for various values of zero"? Most assemblies that I have seen (that actually listed this value) show real backlash on the order of one tenth. I think we can all agree, that is pretty good, but not "zero". With a precision ground screw and a double nut, rigid mount, you could no doubt do better, but that arrangement would likely cost more than all the equipment in my shop currently..

The other thing to realize is that ballscrews and nuts, being made out of real, actual STUFF, behave like really stiff springs. If you push on them hard enough, they will move. The more the load, the more the stretch. you never get rid of it all, but you can minimize it by going to larger screws. 

The other thing to realize is that these special nuts only work to a certain load, after you have defeated your pre-load (in the case of the overside ball, and double-nut arrangement), you are back in backlash country.

To address Bill Gruby's concern regarding too much force on the screw when eliminating backlash, realize that these are not sliding members. Just like setting a pre-load on a bearing (think wheel hubs), you _are_ going to increase the force required to move the bearing proportional to the pre-load, but the force required to turn a rolling element assembly is so low to begin with that the resultant force is still _really_ low.

This brings up the issue of "self" feeding. It turns out that the friction on ballscrews is so low that when you remove power from the motors, and nothing is holding them, the force of gravity can be enough to move them (think z axis). sometimes people add brakes to stop this when power is removed.


----------



## Bill Gruby

While still on motors Steve suggested we discuss Holding Torque compares to Running Torque. This is past my knowledge so we will wait for someone else to explain it.

 "Billy G" )


----------



## jumps4

holding torque is the advertised torque of the motor sitting still, and it is used to determine use but there are differences in motors. as soon as the motor starts to turn this torque starts going down.without knowing the pulse rate and speed you will be running the motor the manufacturer cannot tell you the torque it will produce running.
the chart i posted shows a nema34 1100 oz/in motor at different speeds they are not showing pulse rate so i can only assume they are showing full step because that is the highest torgue output setting running (and they want to sell motors ). if you double the pulse (half step) you cut torque almost in half for these figures.
note that this motor at 50 revolutions per second, thats 3000 rpm is only rated at 250 oz/in.
so if you think about using a smaller motor and gearing it down to increase torque are you really doing anything
lets say we have this 1100 motor but we need 2200 torque to do the work it has to do at 100 inches per minute rapids
to start we need to know the speed we need to work with for our use so lets say -  for 100 inches per minute feed rate with a 5 threads per inch screw we need 500 rpm.
so at 500 rpm from the motor we are at about 960oz/in but we need 2200 oz in
so we go to a 2 to 1 ratio to double torque, now we need 1000 rpm for 100ipm and our torque is about 1280 still to low
a three to one ratio, 1500 rpm for 100ipm and our torque is about 1260 
the only way to do this and raise torque is to reduce desired speed by as much as half or more.
so before you purchase pulleys and a belt see what the bigger motor costs if you want any speed left
if your project has to have higher speeds you can only get there with a bigger motor turning slower
I'm sure i made a mistake somewhere but its all based on ideal not real world and that would make all this worse.
you have to click the image to see it the software is not displaying gif files in the thread
steve


----------



## Bill Gruby

OK folks. Let's move on to the "Driver". It's up to you guys now. I'm in the dark too.

 "Billy G"


----------



## jumps4

the driver is in the basic way of thinking is just an amplifier if converts the low voltage signal (pulses) from the pc into a voltage and current the motor needs to move. as far as microstepping that is a mystery to me how it gets the motor to stop between the poles except it changes polarity constantly freezing the motor in place. and how all this is done is way over my head.
steve


----------



## Bill Gruby

Looks like we could use a little help here guys. Anybody up for it?

 "Billy G" )


----------



## 7HC

The driver explanation works for me.  This thread is titled 'basic' cnc, and following the 'basic' theme, I feel that while for instance it may be interesting to know *how *microstepping is accomplished, I'm more concerned to know *why *it's needed.

Likewise I'm more I'm more concerned to know the pros and cons of the differing ways to wire the motors to the driver board, and how to position the dip switches, than I am in how the components of the driver board actually work, interesting though that might be.

I think some discussion on the choice of driver boards, power supplies, breakout boards and the any number of auxiliary boards that are available (take a look at the products from http://www.cnc4pc.com/Store/osc/index.php for example, specifically a 'charge pump'; I'll bet it isn't what you think it might be!), would be useful to anyone just starting into CNC.

I think most people here are mechanically inclined, so the choice and physical installation of the motors, couplers, maybe ballscrews, shouldn't be any great challenge, but identification of the most suitable electronic components and perhaps the software, may come less naturally to some of us, me included.


M


----------



## DMS

I'll give it a shot, but microstepping gets a little complicated. I will have to resort to visual aids.

Lets start with our software and how it communicates to our drivers (I have, in my previous posts, referred to these as "motor controllers" as well). Most home users are likely going to be using either EMC2/LinuxCNC, or Mach3 running on a PC. The software has to have some way of interacting with the real world, and most commonly that is through a parallel port and breakout board. When you configure the software, you select individual pins on the parallel port, and tell the software what they are connected to (x motor, y motor, z motor, spindle motor, home switches, etc). Motors take 2 pins each, one for "step", and one for direction. "Step" is what we have been talking about in previous posts. Its the pulse that makes the motor go. One pulse (parallel port pin goes to 5v, then to 0) causes the motor to advance one step. The direction pin controls the direction of advance. Nothing to tricky here.

So what do we need a driver for? First of all, your parallel port is only going to do about 5v at a couple milli-amps, not enough to power a motor, so we need something to boost that power. Secondly of all we talk lightly about "steps", and direction, but there is a lot more going on with the motor than it seems. Let's refer to my visual aid here. This diagram shows simple stepper motor, one that turns 90 degrees per step. In the middle we see the rotor (the thing attached to the output shaft). This is basically a permanent magnet (red is north, black is south). On the outside, we have what is called the "stator" (which means stationary). This is where the coils are. There are two coils, and each coil has 2 ends. The ends of coil one are P1a and P1b, and the ends of coil two are P2a and P2b.

*Full Stepping*

Now that we have that straight, lets get down to business. Recall that the north poles of magnets attract the south poles of other magnets, and repel the north poles of other magnets. Recall also, that if we run a current through the coils of wire in the stator, we are going to create an electromagnet (one pole will be north, the other, south, this switches depending on direction the current flows in the coil). 

In our first diagram, we see the rotor at the zero position. Coil one is energized. When we hit our "step" pin, the driver is going to de-energize coil one, energize coil two. The rotor is now going to be attracted to coil 2, and will rotate 90 degrees. We get another step pulse, and the motor de-energizes coil two, and energizes coil one. This time, coil one is hooked up in the opposite direction of what it was in our zero position. The rotor turns. One more step. Coil 1 de-energize, coil 2 energized in reverse. One last step, and we are back to where we started. If we keep sending pulses the motor keeps advancing,  if we change the value of the "direction" pin, the direction will reverse. The driver reverses the direction of the motor by going through the sequence above in reverse.

*Half Stepping*

So that's the basic stuff, but what is this "half step stuff".

Half stepping is a lot like full stepping. If you look at the second picture, in the second diagram, you will notice that we have energized both coils at the same time (unlike with full stepping, where we only had one active at a time. You will also notice that the rotor is half way between it's normal, 90 degree position (hence the name, half step). Notice that the two poles are both attracting the rotor, and assuming the current flowing through them is equal, they are going to pull with approximately the same amount of force, so the rotor is exactly between them. In this case, we only move 45 degrees between steps, and it takes us 8 half steps to make a full revolution. Otherwise, everything is the same.

*Micro Stepping*

Now that we have covered full and half stepping, micro stepping isn't so bad. It is basically half stepping taken a little further. Imagine that we have a motor driver that can do 10 microsteps per step. Remember when talking about half stepping where I said if we power two coils, and the current in each coil is the same, the rotor goes halfway between? Well, what happens if the currents aren't equal? Basically the rotor will be somewhere between the two, but it will be closer to the pole of the coil that has the stronger current running through it.

Lets say we start in our zero position, and coil 1 has 10A going through it. If we were in half step, we would leave coil 1 active, and send 10A through coil 2. With microstepping, we are gonna take things a little slower. Instead of sending the full current to coil 2, we will send say, 1 amp through coil2, and while we are at it, we will reduce the current through coil1 to 9A. On our next pulse, coil2 goes to 2A, coil1 goes to 8A. Then 3A and 7A, then 4A and 6A, then 5A and 5A (we're in the middle), etc. Now, instead of taking 4 pulses to do one revolution, it takes us 40.

Motor drivers are pretty complicated beasts, especially when you get into microstepping, but they are really easy to use. Servo drivers can be a little trickier to use, but I'll leave that for another time.


----------



## 7HC

Ok, that's how the motor works when it's half stepping or micro stepping, and it's interesting to know, but more importantly why do I need to implement it ?
Is it to to be more accurate, or faster, or slower, or with more or less torque?
In other words, if I want to move an axis 6" from point A to point B, why would I choose to use less than full steps to get there?


M


----------



## HSS

This is great info, and much appreciated. If one were to try their hand at building a cnc machine, deciding which motor to use would depend on how much you are willing to invest in the motors, since, I am assuming, one type would be more expensive than the other. Would that be the main deciding factor in the type of motor to use, or are there other factors involved?

Patrick

Sorry Bill, I'm not trying to move off topic, but am trying to determine which way to go.


----------



## jgedde

As covered above, microstepping is sort of a subset of half stepping.  It can be used to acheive greater position resolution, but not without some compromises.  Here's a fact list regarding microstepping:

1) Positional accuracy will be affected by the motor's inhenent detent torque.  The detent torque is a sinusoidal function that completes one full cycle for every natural step position.  Superimposing this on the ideal microstepping torque vs position yields a distorted position vs step curve for positions in between detents.  If the motor has repeatable detent torque cycles, this can be compensated for to some extent by altering the shape of the microstepping.

2) Microstepping excels at driving loads with resonances at the desired step rates.

3) Microstepping falls flat on its face when driving loads with a lot of stiction.  

4) Microstepping in a CNC application is best used with a stepper motor having MUCH more torque available than is needed to move the load.  The reasons for this are complicated, but has to do with the flux angle vs the rotor's position angle.  The motor will not generate enough delta torque between microsteps to actually move unless the load torque is much less than the available torque.  This is less of an issue with continuous rotation as inertia helps keep you moving.  If the motor is commanded to stop in between detents, it may not start moving again until the motor the commutation waveform yields a flux angle large enough to generate enough torque to overcome the load.

5) When microstepping, position is held by statically applying voltages to each coil.  If power is removed (as with half stepping a motor in between detents) the dentent torque will cause the motor to drive into the nearest detent.

6) Microstepping waveforms are created by modulating the winding currents with sine and cosine of rotor position between detents.  One step equals 360 elelctrical degrees regardless of the motor's inate step angle.

7) Only bipolar motors are usually microstepped (although polyphase motors also lend themselves well to microstepping).

John


----------



## 7HC

jgedde said:


> As covered above, microstepping is sort of a subset of half stepping.  It can be used to acheive greater position resolution, but not without some compromises.  Here's a fact list regarding microstepping:
> 
> 1) Positional accuracy will be affected by the motor's inhenent detent torque.  The detent torque is a sinusoidal function that completes one full cycle for every natural step position.  Superimposing this on the ideal microstepping torque vs position yields a distorted position vs step curve for positions in between detents.  If the motor has repeatable detent torque cycles, this can be compensated for to some extent by altering the shape of the microstepping.
> 
> 2) Microstepping excels at driving loads with resonances at the desired step rates.
> 
> 3) Microstepping falls flat on its face when driving loads with a lot of stiction.
> 
> 4) Microstepping in a CNC application is best used with a stepper motor having MUCH more torque available than is needed to move the load.  The reasons for this are complicated, but has to do with the flux angle vs the rotor's position angle.  The motor will not generate enough delta torque between microsteps to actually move unless the load torque is much less than the available torque.  This is less of an issue with continuous rotation as inertia helps keep you moving.  If the motor is commanded to stop in between detents, it may not start moving again until the motor the commutation waveform yields a flux angle large enough to generate enough torque to overcome the load.
> 
> 5) When microstepping, position is held by statically applying voltages to each coil.  If power is removed (as with half stepping a motor in between detents) the dentent torque will cause the motor to drive into the nearest detent.
> 
> 6) Microstepping waveforms are created by modulating the winding currents with sine and cosine of rotor position between detents.  One step equals 360 elelctrical degrees regardless of the motor's inate step angle.
> 
> 7) Only bipolar motors are usually microstepped (although polyphase motors also lend themselves well to microstepping).
> 
> John



John, I've read and re-read your post but I'm afraid that it it just went to prove that I'm not nearly as smart as I thought.

I'm ashamed to admit that I have no idea what 'detent torque' is, and knowing that detent torque is a sinusoidal function that completes one full cycle for every natural step position didn't help at all.
Same goes for the entire content of paragraph four, it left me :headscratch:
I won't go on because I'm just demonstrating my ignorance, and I'm obviously thinking that 'basic cnc' is much less basic than I'm able to under stand. 

However, if you or someone else could provide a 'Dummies 101' of when and why half stepping or micro stepping should be used, and what the pros and cons are, I'd be grateful.


M


----------



## DMS

7HC said:


> Ok, that's how the motor works when it's half stepping or micro stepping, and it's interesting to know, but more importantly why do I need to implement it ?
> Is it to to be more accurate, or faster, or slower, or with more or less torque?
> In other words, if I want to move an axis 6" from point A to point B, why would I choose to use less than full steps to get there?
> 
> 
> M



Honestly, you don't need to do anything but full step, there are some reasons why you might want to though. 

When you are designing a machine, there are 3 things you are interested in.

1) Torque - how much load can you move, and how quickly can you accelerate that load
2) Speed - how fast can you go.
3) Accuracy - how accurately can I position my tool.

That's all. There are various ways to get there, but that's really all you care about. As always, there are tradeoffs, lets talk about some of those.

*Torque*

With steppers, you always see motors listed with the holding torque. This is number is mostly useless, unless you are going to be using them as expensive brakes. What you want to look at is the torque curve. This will tell you what kind of torque you are going to have at a given speed. There are two speeds you care about, your cutting speed, and your rapid speeds.

*Speed*

Speed is important, because it determines your maximum feed rate and rapids. The actual speeds are going to depend on how fast your motor can go, and the reduction added by the rest of your drive system (screws, belt reduction if you are using it). 

*Accuracy*

Accuracy is going to depend on the motor you are using (1.8deg per step, 0.9deg step, etc), how you are driving it (full/half/micro step), and the reduction added by the rest of your drive system. If you have a 1.8 deg stepper, and are running it with full step (200 pulses per revolution), and have a 1/4 TPI screw, you are gonna have to send 800 pulses to get the axis to move 1 inch. That means you have 1inch/800pulses = 0.00125"/pulse. That is the best you can do for positioning. If you go to half step, it's gonna take 1600 pulses to go an inch, which gives you 0.000625 inches per pulse. I'd be happier with that personally, but you are gonna lose some torque.

Basically you trade between torque, speed, and accuracy. Using half step or microstepping will increase your accuracy, but reduce your max torque. If your PC can't deliver enough pulses per second, it can also reduce your maximum speed.

Another thing to think about is that you can switch the mode of the controller once everything is set up. Most people will spend at least a couple hours once their system is together adjusting their max speed, and acceleration to get the most out of their particular machine.

To address HSS's concerns, I'm not sure what you mean by "type". For steppers, you are basically going to pay more as you get larger and larger motors. When choosing a motor, I would look at other people that have converted similar sized machines, and go with a motor the same size as them, going larger when in doubt. As far as full/half/micro stepping, that is all about the driver, not the motor, and most decent drivers you find will be able to do at least half step, if not micro-stepping. That stuff is usually configurable, so even if you don't think you want to use it, you can play with it to see what effect it has.


----------



## Bill Gruby

John;

 With all due respect to you and the knowledge you have on this subject ( I have followed some of your stuff) I have to agree wilh Mike on this. I can understand most of what you daid but some, like Detent Torque needs to be simplified even more. The use of half stepping and micro-stepping is still beyond my grasp also. Maybe we need to back up a little. At this point I don't even know what to ask to clarify anything.

 "Billy G"


----------



## 7HC

DMS said:


> Honestly, you don't need to do anything but full step, there are some reasons why you might want to though.
> 
> When you are designing a machine, there are 3 things you are interested in.
> 
> 1) Torque - how much load can you move, and how quickly can you accelerate that load
> 2) Speed - how fast can you go.
> 3) Accuracy - how accurately can I position my tool.
> 
> That's all. There are various ways to get there, but that's really all you care about. .................................



Thanks, I'm starting to feel a bit smarter again now. 


M


----------



## Bill Gruby

Not me.  The motor moves the tool. The tool is doing the cutting. How do I know how much torque it will take to make that cut? I understand that from this I will know what size motor to choose. I there a formula or something else?

"Billy G"


----------



## 7HC

Bill Gruby said:


> Not me.  The motor moves the tool. The tool is doing the cutting. How do I know how much torque it will take to make that cut? I understand that from this I will know what size motor to choose. I there a formula or something else?
> 
> "Billy G"



I don't know if this would work for practical purposes, but I guess you could measure the torque required to make the heaviest cut you're capable of by using a torque wrench to turn the axis while making that cut?


M


----------



## jumps4

setting the best step rate for the normal use of the machine depends on what it is doing. you can set the machine to have really fast rapids and it will have bad vibration at slower cutting speeds. you can set higher microsteps to smooth out slow feeds but the top speed of the motor is much lower. that is why if you can you want big motors to be able to have smooth low speeds and enough torque left to still move at high speed during rapids. i included 2 videos of my machine as i was still trying to work out the proper microstep i needed for the way i will use my machine. the first on is at a half step (400 pulses per revolution)note the vibration but at this setting the mill will move at 200 inches per minute rapids. the second video is set at 5000 pulses per revolution and note how smooth it sounds cutting at feed rate of 9. the mill will now only rapid at 100 ipm any faster and the motor does not have the power it needs and falters missing steps. you can actualy hear your motor missing steps anything that is not a steady humm or buzz is a missed step and recovery.so if it dont sound right it isnt right.

first run 
[video=youtube;3PXo4sqKEyY]http://www.youtube.com/watch?v=3PXo4sqKEyY&amp;feature=plcp[/video]

200 ipm listen to the motors 
[video=youtube;1jWF1JW1JnE]http://www.youtube.com/watch?v=1jWF1JW1JnE&amp;feature=plcp[/video]

my final setting for smooth motion at feed rates
 [video=youtube;DcsYpc4I7mY]http://www.youtube.com/watch?v=DcsYpc4I7mY&amp;feature=plcp[/video]

steve


----------



## jumps4

sorry the last post was so big but i wanted you to be able to hear the sounds
steve


----------



## jumps4

Bill Gruby said:


> Not me.  The motor moves the tool. The tool is doing the cutting. How do I know how much torque it will take to make that cut? I understand that from this I will know what size motor to choose. I there a formula or something else?
> 
> "Billy G"


 that is a very good question bill i'd like to know the math or what ever is really needed to decide myself
to tell you honestly my choices were made by watching videos of machines like mine, how they sounded and how fast they would move for the motors they had. i didnt like what i heard or seen so i went bigger. i already had a cnc with too small of motors and wanted to avoid that at all cost even if i had to wait for more money. the small motors work on my sherline but it is always just working on the border of failing and messing up the part.
steve


----------



## DMS

If you have never held a stepper motor in your hands and fiddled with it, you may be unfamiliar with detent torque. If you have access to a motor (those of you that don't will have to close your eyes and imagine), pick it up. Hold the motor in one hand, and turn the shaft with the other (no power connected). You will feel a sort of "clicking". The motor won't turn smoothly, it jumps from step to step. The force required to get the motor to move from one step to the other is the detent torque. It starts out high, and as you gets lower and lower, until it hits zero (halfway between two steps). Go a little further, and it starts rising, but it's reversed now, pulling you towards the next step, instead of back to the last. That's what John is talking about. If you power the motor, and turn the shaft (if you can), you will feel this in a _much_ more pronounced way. Basically, the torque is greatest when the rotor is aligned with a pole, this is why you get less torque out of a half or micro step setup. 

As far as measuring the torque, 7HC, you could probably do that, it's probably a pretty tricky setup to do it right. Once you get that number, make sure you use a safety factor, because you never _ever_ want to reach the limit on your torque with a stepper, cause if you do, you're gonna miss step (and that is bad,  mmm'kay). 

To BillGruby, I don't know of an equation for motor sizing. This stuff gets pretty complicated, mainly because there are so many things to account for (friction, mass of the moving members, rotor momentum, cutting force on the tool). I've never actually seen an equation or table for the force required to move a tool through a workpiece (I have looked, though not for a while), so I think that is the trickiest part.

That is why my advice is, copy your neighbor. This is your best bet, unless you are converting a really uncommon machine, especially if nobody has done a conversion on one (or published their result).

If you really want to try calculating your torque needs, I would do this.

1) Turn up a disk about 3 inches in diameter, with a center hole that will mount in place of your handwheels. 
2) Mount it on one axis, and wrap a piece of cord around it. To the other end of the cord, attach a small container (small plastic pail, etc)
3) add sand or shot to the bucket (slowly!) until the axis starts moving (if it sticks somewhere, add more weight till you get past that).
4) Measure the weight (including the bucket). This weight times 1/2 the diameter of your disk is the torque required to move that axis.
5) Wind the cord around the disk the other way, and repeat (depending on how worn the screws/nuts are, they may be different).
6) Repeat on all axes
7) Take the maximum value you get here, and double it. Then look for a motor that has enough torque to meet or exceed this value, at an RPM that will give you about 100IPM (check the torque curve). 

I think you could do pretty well with this method, but it's not what I used. I basically got the largest servos I could find and went with those


----------



## jumps4

missed steps can be real bad, it is not just accuracy problems. say your into the part at some depth the pc thinks the motor made its move on x and it didnt it then moves y for an example at full depth into a location not intended you will remember the sound of your motor grinding to a complete halt or the cutter snapping off, parts flying dislodged clamps screaming belts. this i know how to do well and avoid at all costs  lol
steve


----------



## jgedde

7HC said:


> John, I've read and re-read your post but I'm afraid that it it just went to prove that I'm not nearly as smart as I thought.
> 
> I'm ashamed to admit that I have no idea what 'detent torque' is, and knowing that detent torque is a sinusoidal function that completes one full cycle for every natural step position didn't help at all.
> Same goes for the entire content of paragraph four, it left me :headscratch:
> I won't go on because I'm just demonstrating my ignorance, and I'm obviously thinking that 'basic cnc' is much less basic than I'm able to under stand.
> 
> However, if you or someone else could provide a 'Dummies 101' of when and why half stepping or micro stepping should be used, and what the pros and cons are, I'd be grateful.
> 
> 
> M



OK, sorry about that.  I'm so close to it it's hard to step back far enough for it to make sense to someone who isn't a motor guy also.    I have had technical discussions with many regarding paragraph four.  It's a hard to comprehend topic.  What's the worst of all is people who argue that it can't be a problem for their application only because they don't understand it.

OK, so here's the low down...  Ever turn a stepper motor by hand?  Notice it doesn't rotate smoothly.  It wants to stay in certain discrete positions even though nothing is connected to it.  That's detent torque, also known as cogging torque.  Some motors are designed to have low or zero detent torque (like servo motors).  Some motors are designed to have high detent torque for appliocations where it is desireable to have high holding torque in an unpowered condition.

Detent torque and microstepping are generally not good friends because the detent torque adds/subtracts (depending on where you are) to the motor's powered torque resulting in less than smooth motion.

I would say that full stepping or half stepping (as opposed to microstepping) are best for a CNC application as they will yield, by far, the most reliable motion and the most consistent torque output.  After all, what good is CNC when you can't count on the tool moving at a desired rate or being in the proper spot?

John


----------



## jgedde

DMS said:


> If you have never held a stepper motor in your hands and fiddled with it, you may be unfamiliar with detent torque. If you have access to a motor (those of you that don't will have to close your eyes and imagine), pick it up. Hold the motor in one hand, and turn the shaft with the other (no power connected). You will feel a sort of "clicking". The motor won't turn smoothly, it jumps from step to step. The force required to get the motor to move from one step to the other is the detent torque. It starts out high, and as you gets lower and lower, until it hits zero (halfway between two steps). Go a little further, and it starts rising, but it's reversed now, pulling you towards the next step, instead of back to the last. That's what John is talking about. If you power the motor, and turn the shaft (if you can), you will feel this in a _much_ more pronounced way. Basically, the torque is greatest when the rotor is aligned with a pole, this is why you get less torque out of a half or micro step setup.



Thanks DMS.  I couldn't say it better!  My only comment is that detent torque hits a maximum 1/4 of a step away from each detent.  It starts low, peaks at 1/4 of a step, hits zero at 1/2 step, then starts to ramp up in the opposite direction until 3/4 of a step, then falls again to zero when you reach the detent.  In essence, detent torque is a sine wave between detents.  In other words, the rotor will be able to stop wherever there is a position that has zero torque (like a detent).  If there's torque, the motor will move until there's no more torque.

John


----------



## Bill Gruby

Gonna try that method of measuring the torque tomorrow. I will post the results with pictures.

 "Billy G" )


----------



## jumps4

the method described for measuring torque required does work but it is leaving a lot of factors out. for it to really be useful it would have to be done while cutting something hard and deep at a desired feed rate that weighs a lot. it is just figuring what it takes to move the axis nothing else. i'm not trying to correct the information just adding to it.
steve


----------



## Bill Gruby

I'm going to do it cutting and non cutting Steve. Cutting will be with aluminum and a .040 depth.

 "Billy G" :thinking:


----------



## jumps4

your trying it on the lathe for your cross feed mod right?
that should be a pretty good test
i'm curious how much it will take myself
steve


----------



## Bill Gruby

Yup. I want to see for sure what it will take roe a stepper motor.

 "Billy G")


----------



## jgedde

While this article is about 5-phase steppers (an oddball) vs 2-phase motors, there is a lot of good stuff about detent torque and stuff:

http://www.orientalmotor.com/technology/articles/2phase-v-5phase.html

John


----------



## jgedde

Found even more good info on that site.  Here's the index to their articles list.  Check out both the basic and advanced sections...

http://www.orientalmotor.com/technology/index.html#step

John


----------



## 8ntsane

Bill
Infro on this page touches base on many of the things in this thread. I thought it might be helpfull to you , and others. If it shouldnt be here, let me know, and Ill delete it.

http://www.kelinginc.net/index.html
Scroll down to fundamentals and operation
Seems like lots of good infro here.


----------



## 7HC

8ntsane said:


> Bill
> Infro on this page touches base on many of the things in this thread. I thought it might be helpfull to you , and others. If it shouldnt be here, let me know, and Ill delete it.
> 
> http://www.kelinginc.net/index.html
> Scroll down to fundamentals and operation
> Seems like lots of good infro here.


I don't see why it should be a problem, Keling motors are widely used, and in fact probably the most common among hobbiests.


M


----------



## Bill Gruby

Links to info like that are apprciated here.

 "Billy G"


----------



## HSS

DMS, by type, I was referring to stepper vs servo, but since we aren't to servo motors yet I'll wait and keep reading. Thanks

Patrick


----------



## DMS

Ah, gotcha. 

Servo's are a bit more expensive than steppers, mostly because the controllers are more expensive, and you have the added cost of encoders, and gearing (you will usually see servomotors geared down because they tend to have lower max torque, but higher (usable) top end RPM. 

The difference is not night and day though. I wen't with servo's for my machine, because I figured, if I was gonna do it, I might as well go all out. The main disadvantage with servos is that tuning them can be really tricky (we haven't talked much about servo's, so we haven't gotten into tuning them).


----------



## Bill Gruby

A myth dispelled, I think.  Stepper motors are not in a continuously smooth movement, but in steps as their name says. A DC motor moves smoother but cannot stop on command in a givin position. The increment steps of a stepper motor are so fast that we cannot see the jagged movement. Also they are so fast that the cut is actually smooth. I think I finally have it. Sorry but I have to be thorough.

 "Billy G" )


----------



## Bill Gruby

I tried. this thread never even reached first base. I'm throwin in the towel. :whiteflag:

 "Billy G"


----------



## 7HC

Bill Gruby said:


> I tried. this thread never even reached first base. I'm throwin in the towel. :whiteflag:
> 
> "Billy G"




Maybe you're just having a bad day Bill, there's been useful information and discussion from the start.


M


----------



## Bill Gruby

From the beginning this thread has not been mine, it wasn't meant to be. I started it for all of the people here that knew little or nothing about CNC and how it works. I went as far as I could with my little knowledge of CNC and opened it up for everyone else. Nothing happened.

 I am not complaining about it, and yes there is a lot of info here but I'm just a little surprised it has not gone any further than it has. You are the first post other than mine in a couple of days. I cannot go any further with it until someone asks more basic questions. Yes I have a few more but this is not the right time to ask them. We would start jumping all over the place with this thread and that would not be a good thing.

 I have seen questions asked in other threads that were answered here before  they were posted elsewhere. This is a heads up for me. I am going to leave it at that and say no more. I will watch for this thread to start again.

 "Billy G"


----------



## JohnAspinall

I, for one, greatly appreciate the effort you put into this, Bill.  I don't think the effort is wasted; I do have a suggestion for Version 2.

Consider a spectrum from "student-driven" to "teacher-driven".
Student driven:

I (student) know what I want to learn, and (just as important) I know what I _don't_ want to spend time on. 
Let's just ask questions.  Sooner or later, every question will get asked, and we'll all know everything we want to learn. 
As we make progress, we (students) will ask better questions, and we'll help each other over the hard parts. 
Teacher driven:

There are many ways to learn a subject, some paths are far more efficient than others. 
Someone who already knows the subject, is better suited to picking the path. 

This is a spectrum, between those two extremes.  You don't have to pick one or the other; you have to pick somewhere in the middle that is comfortable for the greatest number of participants.
At first, especially in an online forum like this, I think students rush to ask questions and you think the process is going great.  But the questions get more and more specific, and when that particular discussion is exhausted, so are the students!  Everyone looks around, wondering what to do next because there's no obvious next question.

This is what happened here (i.m.h.o.).  There's no one with the 50,000 foot view.  A lot of time was spent covering every single side street in one neighborhood, but now we've got to head for another town, and all its neighborhoods.  Here's where this discussion needs a high level road map.

Something else too:  People have limited time, they have only a certain amount of attention to give.  You give them lots of detail, how can that be bad?  It can be bad by exhausting their attention that would be better spent on other things they want to learn.

In short, this effort needs to be _a little more_ teacher driven.  That doesn't mean we have to find a single expert and convince them to write posts for hours and hours.  But here's where an expert can help.  An expert can:

lay out the landscape (the curriculum), 
throttle the discussion when it dives too deep 
move it on to the next big topic 

(When I say "throttle the discussion" I don't mean saying "Shut up now.".  I mean saying "that's a detailed topic that might be interesting for some, but is not necessary for understanding what comes next.  So go ahead and discuss it on a secondary thread, but it's ok for some people to ignore that secondary thread.")

Concrete example: steppers vs. servos.
 50,000 foot view:  They're electric motor systems that go to a commanded position.  You *don't care* about the differences between them when it comes to topics like writing G-code, using limit switches,....  You *will need* to know something about the differences when we cover topics like cost and performance, estimating your torque requirements, symptoms of things going wrong.
5,000 foot view: We're talking about choosing your motors.  Both steppers and servos are systems, with driver electronics, and sometimes other components in addition to an electric motor.  Because steppers are the most economical choice for many hobbyists, *we will* descend into more detail on steppers to begin with.  *If you care* about servos, see...
500 foot view: We're talking about how much position resolution you can get with steppers.  Blah blah, microstepping, blah blah, gearing down.....
500 foot view (different neighborhood): We're talking about holding torque in steppers.  Blah blah cogging, ....
5000 foot view (different town): We're talking about what goes wrong when the machine is overloaded.  This is an area where servos and stepper have different behavior.  ....

I hope that gives you some idea of what _might be_ a different way to try this again.

Disclaimer: I'm not a CNC expert.  I've never built a CNC machine; I've never even operated a CNC machine.  I'm simply throwing my 2 cents out there on the basis of what I read.  Hope it helps in some way.


----------



## DMS

This thread could be done. We covered:

* Motors (mostly steppers, but some stuff on servos)
* Screws
* Couplers
* Motor Controllers/Drivers
* Software Controllers

Yep, that's the basics. I think we even crossed over into some intermediate and advanced stuff.

YEAH US!

Extending what JohnAspinall said, The order listed above is probably a good order for a curriculum, and is more or less the order we covered things in.

The things we haven't really covered are the CAM/GCode portion, maybe that is better off on a different thread.


----------



## jumps4

we didnt cover breakout boards very much and the different types, how they work with your operating system and better options that of course cost more.
 i have been busy converting my lathe to cnc or would have posted more. I have a breakout board problem right now that is because it is too slow. even though my new controler is a usb connection it has to connect to the system i built through a breakout board. the one that came with my controlers is opticaly isolated and they are really slow ones so i ordered a hard wired db25 breakout board. this isolation thing to protect the pc can add up to be a problem. if everything you have between your pc and the drivers is optoisolated each add a little lag to the speed and the cheap ones are slow. my pc can put out 35000hz at the printer port my usb uc100 puts out 100000hz thats pretty fast but this breakout board will only process at about 20000hz so a fast pc and fast controler hits a choke point at the breakout board and slow the entire machine. the uc100 is optoisolated the drivers are optoisolated i dont need it at the breakout board also. i'm over protecting a pc that cost less than all of the other parts  lol
steve


----------



## DMS

I realized I made a mistake on the "half step/full-step/microstep" post, and for some reason I can't edit that post, so I am posting a correction in a new post. Please refer to new visual aid:

Everything in the original post was correct except the diagram, and the description of full step mode. Instead of one phase being on, and the other off, both phases are always on, and each phase reverses direction alternately. That's what I get for relying on my memory :shrugs:.


----------



## HSS

I think this thread has good information and has been well recieved and I appreciate it. I have a full-time day job, as I'm sure many of you do, and I don't get on the computer everyday. It might even be a week before I turn the computer on, so just because people aren't responding to the thread, doesn't mean it isn't working. Y'all keep up the good work and it'll happen.
Patrick


----------



## rogerrabbit

Billy G,

Ok, I'll give it a shot where I would like to see this go (on a 5k ft level)

1. Types of implementations:
  A. Lathe type CNC
  B. Mill type CNC (i would include the home built CNC router type solutions).


For each above:
   A. how do they work? (basics right? ))
   B. what are the differences?
   C. If I am new to the CNC world, which type should a start with assuming I have either both a mill and lathe or neither.
   D. for each, buy a machine, convert existing, or build from scratch? 
        Something like
         new: high $$$, but software & machine integrate well.
         convert: med $$, but kit may not be available, anyone have experience with a kit they would like to share/
         build: low $, but you need to plan ahead to make sure software works with machine.  

d might be a stretch for a basic thread though.. your call?

Roger


----------



## Bill Gruby

Been waitin for this one Roger. Thank you. There it is gents, your turn.

 "Billy G":thinking:


----------



## 7HC

rogerrabbit said:


> Billy G,
> 
> Ok, I'll give it a shot where I would like to see this go (on a 5k ft level)
> 
> 1. Types of implementations:
> A. Lathe type CNC
> B. Mill type CNC (i would include the home built CNC router type solutions).
> Roger



To that list you could also add, plasma cutters, engravers, hot knife machines for cutting polystyrene, probably 3D printers, and possibly even more esoteric machines like robotic arms (which might be fun to have on one of the other machines as a 4th axis for picking things up and moving them around).


M


----------



## rogerrabbit

good point, my thinking was to categorize it based on how the cnc moves (and feel free to correct if I have this wrong):

how about this categorization?

2D - CNC lathe (i don't know how to classify those that can change the rotational speed, help?)

3D - CNC mills, plasma cutters, hot knife,engravers and laser cutters, 3d printers (not sure if its 3d, as there is a 4th stepper to control the material feed rate) 

4D - advanced CNC mills, robotic arms

5D - ?? I've seen it mentioned..

thanks,
Roger


----------



## 7HC

rogerrabbit said:


> 5D - ?? I've seen it mentioned..
> thanks,
> Roger




Here's some 5 axis milling: http://www.youtube.com/watch?v=RnIvhlKT7SY


M


----------



## DMS

I take a stab at Rogerrabbit's outline

Ok, I'll give it a shot where I would like to see this go (on a 5k ft level)



> 1. Types of implementations:
> A. Lathe type CNC
> B. Mill type CNC (i would include the home built CNC router type solutions).





*A. how do they work? (basics right? )*
CNC is Computer Numerical Control. According to wikipedia



> Numerical control (NC) refers to the automation of machine tools that are operated by abstractly programmed commands encoded on a storage medium, as opposed to controlled manually via handwheels or levers, or mechanically automated via cams alone.



So, we are using a computer (and software running on that computer) to control a machine tool. That could be any of the items listed above. LinuxCNC will control up to 9 axes. According to their website, Mach3 will do up to 6 axes. Axes are points where the machine can moved. Think X, Y, and Z axes on a milling machine. Given that, all types of computer controlled machines operate the same more or less. 

*B. what are the differences?*

Number of axes, work envelope, material, type of operations capable.

For example, a CNC lathe, just like a manual lathe, is going to produce cylindrical work, and a mill is going to produce prismatic work. We can blur the line here, but in general you are going to use a CNC lathe for the same thing you would use a manual lathe for, its just that a computer is turning the knobs based on instructions you gave it, rather than you actually turning the knobs by hand.

Some other examples

- CNC Router/gantry router. These are basically milling machines. They tend to have really large work areas in the X and Y, and relatively small Z work envelopes. Usually they have small, high speed spindles (routers are common), and are used on wood or plastic, but sometimes aluminum. If you are into woodworking, want to make signs, or quick prototypes out of plywood, or mdf, this is probably the machine for you.

- Hot wire cutter. Are you into model planes? I'm not actually sure what else you would use a hot wire cutter for... anybody else?

- Plasma cutter. Are you a welder? Want to make custom metal work? This may be for you. They tend to have similar stats to a gantry router, except that instead of a high speed spindle, they use a plasma cutting nozzle. LASER cutters would be more or less the same, except using a laser instead of a plasma nozzle. Waterjets too.


*C. If I am new to the CNC world, which type should a start with assuming I have either both a mill and lathe or neither.*

I would say, figure out what you want to make, and then get the machine that will let you do that. Mills are probably the most common and versatile, but if you want to make large things, a router would probably suit you better. If you want to cut lots of sheet steel, you are going to be disappointed with a milling machine, and probably would be happier with a plasma cutter.

If you just want to explore the technology, and see what is possible, I would say a small CNC, desktop CNC router would be the cheapest route to this. 3D printers would be a close second. Both can be had for a couple hundred dollars US, and will fit on your dining room table, stow-able under the bed or in a closet when not in use.


*D. for each, buy a machine, convert existing, or build from scratch?*



> Something like
> new: high $$$, but software & machine integrate well.
> convert: med $$, but kit may not be available, anyone have experience with a kit they would like to share/
> build: low $, but you need to plan ahead to make sure software works with machine.



Honestly, software comparability with home built machines is not a concern. LinuxCNC and Mach3 (though I have no direct experience with Mach) are really configurable, and can do a great deal. The main things you have to consider are

1) How much work
2) How much money
3) Who do I call if there is a problem?

Everything is gonna depend on what type and size of machine you chose. I picked up a used knee mill and am converting it myself. I am probably into the project to about $3k, and I don't even have ballscrews yet. To put that in perspective though, if I had purchased a new Tormach, I would have been up to $8k already, probably more with accessories. That being said, I would have a ready made, solid machine, with lots of accessories made for it, and somebody I could call when things go wrong .

Now, if I had purchased a new knee mill, the price difference at the end of the day would have been basically zero. If you are going with a small machine like an X2, then you would have to do the math.

The main thing to consider is that you want to stick with the basic formula. Lathes have 2 axes. Mills have 3 (or more, lets ignore that for now). The trick here is that there is a lot of software out there (CAM software) that takes CAD drawings and produces GCode to control your machine. If you have some oddly configured machine, off the shelf software is not gonna work. So stick with the basic formula. 

The other possibility is that you write the GCode yourself (it's very doable), but for complicated things, it can get... tedious.


----------



## jumps4

my suggestion for anyone who is interested in cnc to start small and with a mill, a cnc lathe is nice but will never be used as often. if you can master a small cnc mill like a sherline you will be a wizz with a big mill. the small mill uses small pieces of material and keeps cost of learning to almost nothing for materials. the process is exactly the same only your making smaller parts so you will be making more parts more often and mistakes cost nothing in materials. a friend of mine laughed when he seen my sherline so i drilled 5 holes through the head of a pin and gave it to him the next day. he still has the pin on his desk. my point is to see if you really want to learn cnc and if not you will always be able to get your money back on a small machine. if you do enjoy it then big parts will be easy and you use your little machine to build the parts for your big machine. the parts made in the pic were done on a sherline cnc mill and cnc lathe.
steve


----------



## lseguine

Hummmmm great idea.  

This consept of a place for people that are intrested in the basic's of a subject s fantastic. Following what I have seenso far i see a common problem with open discussions on a spacific topic. Some one asks a simple question then diferent people ,with diferent levels of knowledge or experince respond at what they preserve as "BASIC".. then the topice gets runoff in many diferent directins.  never fails...)

But that said, I still found some informitive info here and would like to see this thread turned into something useful to thoes that are intrested in basic info on the subject of CNC..

I think we need three modirator volunteers to make this work.  or mabey 4.  one with advanced knowledge of a subject, one with a good workers level of understanding, and a student level person to tell when the real basic answer has been reached. and finally a major overseer to collect answers to a spacific topic and post them in a seperate file that others seeking the answer could go to and see the cleaned up version.  

When a question comes in the modirator could eithed open a new discussion or point to an already answered file.

i have several basic questions, or at least what i think are basic, the guy next door might think as advanced and the guy over at palmer machine think as below basic.:thinking:

any whooo keep up the good work

larry


----------



## 7HC

lseguine said:


> .........................................i have several basic questions, or at least what i think are basic, the guy next door might think as advanced and the guy over at palmer machine think as below basic.:thinking:  larry



I'd say go ahead and ask your questions Larry, even if it's as basic as "What's CNC?"

There are no dumb questions on this forum. 


M


----------



## OakRidgeGuy

I have started reading this thread and a question came to mine. If a brushless motor that powers the spindle on my HiTorque mill is basicly the same as a servo motor, it brought me to thinking. 

In CNC motion of a machine, why could you not use a stepper or servo to control the spindle on the mill? I mean, in my thinking, it would be prudent to have a spindle that can go both directions instead of just counter clock wise. To effect, if the spindle can go either way with the same amount of power, then in essence, you could have the cutter always in a climb cut no matter which side of the part it may be on. 

Make sense?


----------



## Tony Wells

On "real" CNC milling/machining centers, the spindle is under the controller's command. It set's the cutter surface speed and direction. Additionally, if the feedback encoder and control allow it, and most do support this, it will do what is called "rigid tapping". To do that, the spindle RPM, Z axis feedrate and position are all programmed to follow the tap's lead, stop at the (hopefully) bottom of the hole in blind tapping, and reverse and back out. And even then, go back in if you need to clear the chips and go deeper.

It is common practice, and generally preferable to up-mill, or climb cut. This takes advantage of the very low backlash of the ballscrews normally seen on CNC machines.


----------



## lseguine

Hi Doc,
Ok heres one for you.

i have my sheen set up and running, i'm using moch3 updated with the mochmill pro software on a piter with windows XP, through a CNC4U C11 breakout board controling 5056D drivers to the largest steppers in the nema 23 size. 

on the drivers are a set of switches that 1. controle current 2 controle microstepping.  in reading the manual it appeared to me that setting the microstep switches to all on set things up such that mock3 was setting the steps per rev.  

so now having read here and in the CNC home threads what is the story with the switches vs the computer for microcontrole??
 Larry better known as Docwishbone)


----------



## OakRidgeGuy

Tony, 

That was my thinking, but as I was mulling this, I was having the smaller machines in mind. With that, it seems to me that a really candidate for a hobby CNC machine would be the Super X3 due to the fact that the spindle does go both ways. I have been talking to Steve about possibly doing a CNC conversion to the machine that I have now. But reading this has me thinking that I should wait a bit, get another machine, a SX3 to take advantage of the spindle motor being able to go in both directions. But would that be a fourth axis? So in essence, if you really wanted a 4 axis machine, to mimic more of the actions of the bigger machines, you would really need a 5 axis system to complete a set up on a SX3 machine. Not only did being about to do continuious climb cutting, you would be able to do power tapping as well. 

Doc


----------



## DMS

OakRidgeGuy said:


> I have started reading this thread and a question came to mine. If a brushless motor that powers the spindle on my HiTorque mill is basicly the same as a servo motor, it brought me to thinking.
> 
> In CNC motion of a machine, why could you not use a stepper or servo to control the spindle on the mill? I mean, in my thinking, it would be prudent to have a spindle that can go both directions instead of just counter clock wise. To effect, if the spindle can go either way with the same amount of power, then in essence, you could have the cutter always in a climb cut no matter which side of the part it may be on.
> 
> Make sense?



As Tony said, on "real" machines this is the case, and on most small commercial machines, and even home built machines too. My spindle is currently not connected to the controller, but it is in the plans.

Mostly for spindles on CNC machines people use brushless DC or 3 phase induction motors with variable frequency drives. Newer VFDs give you very good control over position and low end torque. All you need is the ability to feed a control signal from your PC to  the motor controller. This is usually stream of pulses sent by your controller, the frequency corresponding to the desired spindle speed. 

In order to do rigid tapping, you need a spindle encoder. The signals from the encoder feed into your PC, so it knows where the spindle really is, and can adjust the frequency of the pulses it is sending to the motor controller. This is a lot like the way a servomotor works.

For the X2, I don't think the stock controller allows external inputs, but I may be wrong. You may need an add-on motor controller to be able to control the spindle speed through software.

Oh, and steppers are not used for general cutting because they have very low torque at high RPM, but they can be used for slow speed stuff like rigid tapping.

[video=youtube_share;vGTfVlsA9Ww]http://youtu.be/vGTfVlsA9Ww[/video]


----------



## Tony Wells

The spindle itself is not considered an axis. The fourth axis (sometimes called the B axis) on a mill is a rotary table/superspacer type of rotating workholding device.

There is no reason you can't do this on a smaller machines. I was only citing typical operations on a full scale, factory built CNC machine. 


Doc, I don't know anything about Mach3 software, or setting it up with stepper motors. There are some here that do, however, so they will probably chime in.


----------



## DMS

The spindle isn't considered an axis in general. The method used for rigid tapping or for single point threading on a CNC lathe is called "spindle synchronization". Basically it is a mode you enter that tells the cutter to track the spindle position. You don't need a 4th axis for this.


----------



## OakRidgeGuy

That is what I am saying, the SX3 already has a controller so to speak to reverse the motor that drives the spindle, so all it would need then is to be connected to the breakout board so that it can be controlled by software.. am I right in my thinking?


----------



## OakRidgeGuy

ok, so I miss placed my thinking in terms.. but what I am getting to is being able to control the spindle and have it go both ways. I will be wanting to set the machine up so that it will have a true fouth axis when I do this.


----------



## OakRidgeGuy

Ok, 

did some digging, in Mach3, the spindle can indeed run the spindle forward and reverse if the relay board has 6 relays instead of four. 

I am going by this thread over at the other site. http://www.cnczone.com/forums/x3_sx3_g0619_g0463/162036-sx3_spindle_control_via_mach-3_a.html and the Pdf file that the poster put up there.


----------



## lseguine

Doc 

I have mach3 running machstdmill from calypso ventures pro. and it definatly has reverse spindal control.. you can also controle the spindal speed ect.


----------



## OakRidgeGuy

Just a lil note, sometimes I think way outside the box. So far out, it would seem that I don't have a grip on what is going on. And sometimes that is true too.


----------



## David Kirtley

A few points as to the sizing of motors and microstepping. This is a bit rambling but here is a description of the factors involved in the calculations.

There are no set rules or formula that you can choose the "perfect solution." The reason being that *it depends*.  When you set up a system, you have to look at how you are connecting things mechanically. You are connecting a rotational movement to a linear movement. They mesh together different ways. All of them will create some backlash because they have to move against each other relatively freely. The tighter you couple them, the less backlash will be present but also you are increasing friction as you tighten them together. You need stronger components and more power to overcome this friction. Let's deal with them individually.

Stronger components.

As you get into larger and larger motors, the frame gets heavier, the shaft gets thicker and the coils get larger. This is pretty straight forward. There are some drawbacks with getting bigger motors. One is that they are heavier. Part of the load you are moving (depending on configuration) is the motor itself, say for a z-axis on a mill. The heavier weight means you have to have more power to move it but more importantly, you have to overcome the inertia of the extra mass to start and stop it. This requires more power. The larger coils also use more power (and weigh more) and make the cogging stronger so you get a more pronounced step in the motion rather than smooth motion. You can smooth part of it out with microstepping but you are also pushing and pulling at the same time which means that you don't have as much power available in the direction you want to move. So you get a bigger motor to overcome the drag of microstepping. See where this is going? Same thing happens when you beef up the drive components. Get a stronger leadscrew that is bigger and heavier, you have more inertia to start it and stop it. Needs more power. 

Getting more power.

Ok, we have different ways to get more power. One is from pure mechanical advantage. As Archimedes was famous for saying, "Give me a long enough lever and I can move the Earth." Your options are most commonly a screw or a gear train. The finer the pitch of the leadscrew or the larger the gear ratio, the more power you can deliver to move something. Of course, there is no free lunch. The greater the mechanical advantage, the more rotation you have to put in to get the same movement. This is fine if you don't care about how fast you move but generally it is an important part of the overall decision. You want to be able to move fast enough to effectively cut things. Move too slow and you are not getting enough chip load and the friction will kill your cutters. Move too fast and you can't get chips to clear fast enough and you put too high of a chip load on the cutter and it breaks. Beyond that, you have to look at the differences in the motor types. Stepper motors are wonderful at slow speed. They deliver a huge amount of torque for their size. As they move faster though, they lose that power. On the other end, other types of motors such as servos, have more power at a higher speed but lose power as you slow down. You can also increase the power by putting more electricity through the motor. You can increase the voltage or the amperage to get more power. 

Now, here are all the things that bite you in the rear.

Lets say you have a leadscrew. You want to move fast, the leadscrew has to turn faster or the pitch of the leadscrew has to give more motion for each rotation. Move too fast, and the screw can start whipping around and at the least create vibration and heat from friction on the nuts. At the worst, it can rip your drive system right out of the machine. Increase the pitch so it doesn't have to turn as fast, and you lose mechanical advantage, it has more torque on the screw which can bend it and make whipping worse, and there is more pressure on the nuts. Go with a gear train and each component of the train has it's own backlash that adds up to the overall backlash. Each component also has it's own inertia that will decrease the effective power transmission. Finer pitch on the gear train will give smoother motion but more friction. Coarser will give rougher motion. Go with stepper motors to get more low speed torque or servos to get more high speed torque. Gear up a stepper to get more speed, you get more cogging and rougher finishes. Gear down a servo to get the low end torque and you can't move as fast overall. Increase the voltage, you need to specify electrical components that have higher voltage ratings. Increase the amperage, you need to increase wire sizes and dissipate more heat.  

What you really end up doing.

You can't just plug the numbers into a program and get the sizing you need for a system. All this can get pretty theoretical and looks like you need a degree in Electrical Engineering and Mechanical Engineering but the answer is that a lot comes by trial and error. You look at other systems and what they used and how well it worked. You also make decisions based on what you are going to be cutting, how much mass you are moving around, the power of the cutter, and how fast you need the system to move. Most of the factors can be accounted for. Backlash can be compensated for in software and it can be minimized by adjustments to the relationship of the components. You can control microstepping and go with fine steps when you want precision and use single steps for fast motion. You can do prediction of movement to slow motion down gradually instead of slamming on the brakes. Same for acceleration.


----------



## thebaconbits

This is great basic cnc info and very useful. Thanks


----------



## Bill Gruby

What should you know before the computer and machinery?

 "Billy G"


----------



## jumps4

Bill Gruby said:


> What should you know before the computer and machinery?





Bill Gruby said:


> "Billy G"



I'm not understanding what your guestion means bill?
steve


----------



## Bill Gruby

OK let's see if I can do this.

#1 -- You need to know the computer
#2 -- You need to know what the machine is and what each component does.

These we have discussed. What I am asking is -- is there any basic things we should be capable of doing leading up to those two?

"Billy G" :bitingnails:


----------



## jumps4

the first thing that came to mind for me is the *Cartesian* *coordinate* *system* (i googled the spelling lol )
it is the key to understanding the layout, drafting and machining of any part.
steve


----------



## 7HC

Bill Gruby said:


> OK let's see if I can do this.
> 
> #1 -- You need to know the computer
> #2 -- You need to know what the machine is and what each component does.
> 
> These we have discussed. What I am asking is -- is there any basic things we should be capable of doing leading up to those two?
> 
> "Billy G" :bitingnails:



Make #3 -- You need to know how to think logically in three dimensions.  
It's a great help in working out the order of the steps needed to machine something; cnc or manually. 


M


----------



## David Kirtley

You need to be able to know some of the vocabulary for what is going on with the computer hardware stuff.

*Opto-isolation (Optical Isolation)*

The circuits of the CNC are physically isolated from the computer electrical circuitry to keep the CNC voltage from possibly going through the computer. A good thing. Usually you cannot see this going on. There is an LED light inside a chip on one side and a light detector on the other side. Much like signal lights to keep one circuit from touching the other.

*Break Out Board*

The communication lines are all bundled in one cable from the computer. It has to be distributed to the different components. This is where that happens. Some systems have the controls for the motors built in to this and other have them as separate boards that connect to it.

*Open Loop Control * 

The instructions for a move are given to a motor but no feedback to make sure that the move was made

*Closed Loop Control*

The move is verified as well as the command given. Usually done on servo controlled systems.

*Stepper Motor*

A motor that moves one increment when the pulse of electricity goes through it. Very powerful but moves slower and looses power as it speeds up.

*Servo Motor*

A regular motor that also has an way to tell what movement is made. It can move back and forth and the software tells what position it is in. (Usually used in closed loop systems) Generally more power when moving fast but not as much when moving slow.

*Micro stepping*

The two poles of the stepper motor have a balancing power on both to position the stepper between positions.

*Serial port*

The computer port with two lines, a transmit and receive that communicate much like the old telegraph systems. Usually with a 9 pin connector unless you are using a *really* old computer where it will be 25 pins. On the computer side, it will look just like a parallel port but it will be a male connector instead of a female connector. (Male connectors have pins, female have sockets for pins) Some of the older CNC systems used this mainly to hook a terminal up to see things on the computer built into the CNC machine. Not present on the most modern computers in favor of USB (Universal Serial Bus) In desktop systems, you can add additional expansion boards to a computer if it doesn't have one.

*Parallel Port*

The computer port that will send data over 17 pins at once. Previously, this was used for connecting printers to the computer. It would send data on 8 lines at a time and the rest were used for control. This is what most CNC systems use to connect to the computer. Not advisable to use for a laptop as the laptop has circuitry in it to cut part of the power to the port to save electricty.  This is a 25 pin connector (yeah, there are a bunch of ground wires there too.) Many of the newest computers don't have one any more and printers mostly use USB now. You can get an expansion board to add one to a desktop computer if yours doesn't have one built in.

*USB Port*

The USB port is more like the old serial port but it sends information much faster. It has 4 wires - transmit, receive, power, and ground. There are several versions which are mainly involving the speed that it uses. Most computers now have USB 2.0 (version 2) and some of the newest ones have version 3.0. There are 3 main connector styles A, B, and Miniature. A is flat, B is square(ish) and the mini is flat but a lot smaller. Most of the new cell phones use the mini for hooking to a computer and to charge the batteries. Many CNC systems also use a USB cable to provide low voltage (5V) to run some of the electronics on the controls. There are some hobbyist systems moving to USB since the other ports are going away. They will have another microprocessor on separate boards to handle the timing and control. The latest trend is adding the ability to do this over a network connection instead of USB.

*General Purpose Operating System and Real Time Operating Systems*

Usually you have no control over this. Windows is a General Purpose Operating System. When you run your computer, lots of programs are running at the same time. When the system is busy, it will let the instructions pile up in line and get to them when it can. Normally, this is ok but when you are trying to control stuff with millisecond precision, it can cause problems. If you are using LinuxCNC (used to be named EMC2) to run your computer, it has what are called Real Time extensions built into the main part of the system. A Real Time Operating System doesn't let the instructions pile up. It gives some priority and tells the other stuff to go away and try later when it is not busy. This allows more accurate timing.  The high end CNC systems will have their own computer built in with a Real Time Operating System built in.

*Pulse Train*

The signals to communicate to the motors for each move are like an old fashioned telegraph line. These are like turning a light switch off and on really fast to signal each move. This is the rate of how fast those signals can be and still be read.

*Debounce*

Turn a light switch on really slowly.  There will be a point where it is almost making contact and the light will flicker really fast as the spark jumps the gap. This can happen with switches in the system too like the limit switches at the end of motion stops and emergency stop buttons. The computer will have a procedure to watch those little spikes of power to wait and make sure that the little spikes when the switch is turned on or off are not interpreted as separate off and on signals.


Well, that is enough to get you started. If you want to know more about something, speak up.


----------



## blacksmith

I would like to add a few and a slight correction:

*Motion Controller
*
These are similar to a breakout board. However they typically are "smart cards". That means they "intercept" the signals from the PC and allow a very nice thing to happen. The PC no longer has to maintain a steady pulse train for the stepper driver or servo amplifier. The motion controller takes over that function. The PC can get up to perhaps 100,000 pulses at best out of the parallel port. Motion controllers can get up to 10 million in the same amount of time. They use a dedicated clock circuit to produce the pulse train. Computer CPU work load is no longer an issue. Here are a couple of examples. For Mach3, the Smoothstepper. For LinuxCNC, the Mesa series of "Anything I/O boards". The Mesa 5i25 is an economical solution for LinuxCNC users. Motion controllers are very useful for both stepper motor solutions and servo motor solutions. The motion controller offers distinct advantages for each system. Fast speeds are not the only consideration. 100,000 pulses per second is faster than most CNC systems need. It's the smoothness of the pulse train that is very desirable here. Don't buy a motion controller just because it is the fastest. You probably won't use the extra speed. The added I/O for limit switches, home switches, etc. and the smoothness of the pulses for your machine are much more important parameters when considering a motion controller.

*Stepper Motor*

A motor that moves one increment when the pulse of electricity goes through it. Very powerful but_ loses torque _as it speeds up. _The  stepper motor draws the same current at low speeds as it does at rest. They are designed to run very hot. Some driver cards reduce the "resting" current to help the motor run a little cooler when it is stopped. It then switches to full current when stepping._

*Holding Torque*

The torque that a stepper motor can produce when not receiving pulses. This is directly tied to it's ability to hold a load at a given position. Turning off the "current reduction" in a driver circuit may help to increase this load holding capability. Most CNC applications work best with current reduction enabled. Some stepper drivers do not allow it to be turned off.


----------



## blacksmith

Bill Gruby said:


> OK let's see if I can do this.
> 
> #1 -- You need to know the computer
> #2 -- You need to know what the machine is and what each component does.
> 
> These we have discussed. What I am asking is -- is there any basic things we should be capable of doing leading up to those two?
> 
> "Billy G" :bitingnails:



Hi Billy,

#1 - Choosing Software / OS: For a beginner (which I am!) , you have two options in my opinion. Others may disagree.



[*=1]Mach 3 - Runs under Windows, has a large following. Windows is not a real time operating system. The developer of Mach uses a "plugin" that allows the PC to produce a very good pulse train. Not perfect, but very good and very usable. Most users are very satisfied.
[*=1]LinuxCNC - Runs under Linux / Ubuntu. Very good user support forum, answers are typically fast and accurate. LinuxCNC uses a special OS implementation called "RTAI". That means it is optimized to provide a smooth pulse train from the parallel port. Experienced LinuxCNC users report that it is more powerful and can control literally any motion platform. I agree, but for a beginner this is a moot point. We are interested in routers, mills, and lathes for the most part.
[*=1]Either option is viable. LinuxCNC takes more head scratching at first because you have to find your way around Ubuntu. If you don't mind this extra learning curve and like to figure things out LinuxCNC works very well. This was my choice. Linux has come a long way. The user interface is similar to Windows, but is "simpler". Instructions for installation are very good. Most people use the "LiveCD" method.
[*=1]Be aware that both have a huge fan base.


#2 - For beginners, I think a stepper motor based system is better. For the small machines that us home shop folks make, they are more than adequate and easier to implement.



Budget is always a consideration. If you can, buy an off the shelf solution. I chose CNCFusion for my SX3 build. There are many others.
CNCFusion kits work well with Automation Technologies Inc (used to be Keling) stepper systems.
The suppliers mentioned above were my choices. They have worked well for me. That does not mean they are the only choice, there are a lot of suppliers out there.
Many people do the whole conversion them selves by making all the parts and buying the ones they can't make like ballscrews. This can be more difficult because you have "size" everything yourself.
In any case, I would search the web and see what others have done with you particular machine and use solutions that are successful.

To answer your question more directly, my path was to start reading information in the various forums such as this one and ask questions.

What do you want make? This determines the style of machine. As another poster wrote:


[*=1]Large gantry type router for wood work and some light aluminum machining.
[*=1]Benchtop mill for aluminum and light steel machining.
[*=1]Lathe
[*=1]Be aware that the CNC mill can be setup to make any part that you can make on a lathe that does not require a tail stock. See this video:  http://www.youtube.com/watch?v=_2w8cYXt5_o

I'm not sure I answered your question Billy.

How did I do?

Regards,

Matt


----------



## David Kirtley

Hey Matt, those Mesa Anything I/O boards look pretty cool. I was not familiar with them. I especially like the ethernet version 7I80DB  Ethernet Anything I/O card. Looks like it would be especially nice for controlling multiple machines or something with more sophisticated things like tool changers. Do you happen to know if they require the real time extensions?


----------



## DMS

David Kirtley said:


> Hey Matt, those Mesa Anything I/O boards look pretty cool. I was not familiar with them. I especially like the ethernet version 7I80DB  Ethernet Anything I/O card. Looks like it would be especially nice for controlling multiple machines or something with more sophisticated things like tool changers. Do you happen to know if they require the real time extensions?



Double check compatibility first. I don't think the Ethernet versions of the Mesa board are supported by LinuxCNC.


----------



## blacksmith

David Kirtley said:


> Hey Matt, those Mesa Anything I/O boards look pretty cool. I was not familiar with them. I especially like the ethernet version 7I80DB  Ethernet Anything I/O card. Looks like it would be especially nice for controlling multiple machines or something with more sophisticated things like tool changers. Do you happen to know if they require the real time extensions?



Hi David,

Sorry,  I can't answer your question.

The folks at Mesa have been pleasant to deal with.

Give them a call.

REgards,

Matt


----------



## jeffm

jumps4 said:


> I'll try a little on linear slides, ballscrews and acme screws
> To be honest I didnt do much reading on items I can't afford except to note the differences.
> Most people think the main reason for a ballscrew is backlash, while this is a reason to use ball screws it is not a feature of a ball screw that most hobby machinists can afford. So lets talk about friction first. The motors used for cnc are small and required to move very heavy loads in exact amounts. Friction is the biggest enemy. If you have ever tried to turn the handle of a machine that has set for a while you will feel a snap before the axis begines to move. The torque has to overcome the friction or adhesion that is between the surfaces before moving. This is everywhere in most manual machines. The thread mating in the nuts the dovetails mating to each other and the slides. Once this adhesion is overcome the motion becomes easier. Its the theory of motion things that are still want to stay still, things that are in motion want to continue moving. This plays hell on accuracy and the size of motor to overcome the initial friction/adhesion and a change in direction multiplies this as the mass has to be stopped then started to change direction (this happens fast but at one point it does stop ).
> We overcome this with ball bearings. Bushings are mated surfaces rubbing against each other and the lube holds them apart so they slide on the thin film of lube instead of each other. These bearing surfaces are everywhere in a mill or lathe the dovetails are bearing surfaces and require lube to keep the two surfaces from dragging on each other. Ball bearings work different they do not rub the other part they roll against it always in contact at two points. If i put a ball on a table and put a book on top and move the book the ball will roll as i move the book not slide. There is far less surface area touching each other so there is less friction. Now if all the balls are in a straight line and "exactly" the same size they will all roll together and not against each other. Here is where precision bearings come into this, if one ball is the smallest amount larger than the rest of the balls it will catch up with the others and eventually end up pushing the entire line of balls along. This has the balls now touching in 4 locations top bottom front and back. The front and back of each ball is turning the opposite direction of the ball it is mated against so the friction and heat doubles. So ball size is very important
> The surfaces the balls roll on have to be perfect also, a high spot on the table and a book that cannot be moved up leaves a tight spot in the bearing surfaces. So the balls have to be no bigger than this point in their path. Everywhere else they will be a loose fit. This is the reason for precision grinding a ball screw and it's nuts internal route for the balls to roll in.
> To make the ballscrew antibacklash all the parts must be in contact at all times. but not ball against ball and they continue to roll along the thread including a passage to return them back to where they started from in the thread.
> Ball slides work exactly the same way and the balls roll along the two mated surfaces and are returned through a passage to start over.
> The cost of real precision ballscrews and ball slides are to high for most hobby machinist but anything that reduces friction is an advantage for our machines so even less precision ballscrews are a big improvement leaving us to just deal with the friction of our slides. this requires constant lube.
> I know there is a lot to add to this and probably corrections needed
> 
> Steve


I'm way late here, but I wasn't a member yet when this thread was born.
This is a good description, I think, but I still can't quite see it.  Can anybody point me at a link to a diagram or video?
Thanks,
Jeff


----------



## DMS

Here is a video on ball screw operation

[video=youtube_share;kl6qNn9-nkk]http://youtu.be/kl6qNn9-nkk[/video]

Here is a video on linear slides

[video=youtube_share;rq4Pis6Zhf4]http://youtu.be/rq4Pis6Zhf4[/video]


----------



## David Kirtley

Jeff, 

It is just ball bearings vs two items sliding against each other. The ball bearings reduce friction.

Ball screws are basically a way to reduce the force needed to turn a high pitch screw. This goes back to the problem with steppers.  They have a lot of torque when moving slowly but less when moving fast. A regular screw has a lot of mechanical advantage You don't need a big motor to turn it. The down side is that you have to turn it many times to get a lot of movement which can mean that the motor is turning fast enough that it loses torque (and other problems). To counteract this you can increase the pitch of the screw which makes it move more for each revolution. Let's use a 1/2 in screw as an example.  A standard 1/2 in acme screw has a pitch of 10. That means that you can turn it 10 times to move one inch along the thread.  Then you can have a multi-start screw. A 2 start screw will turn 5 times to move one inch. The motor only has to turn half as fast to get the same movement. The problem is that it also has 1/2 the mechanical advantage. They also have 5 start screws. They have 1/5 the mechanical advantage. With less mechanical advantage, the friction of the threads in the nut are a larger part of the force needed to move the screw. To overcome this friction, they put ball bearings between the threads in the nut and the threads in the screw. They also put a pre-load on the ball bearings to reduce the backlash.


----------



## plm

First off, this thread is a great learning tool, especially for a beginner. I commend all of you who have contributed your time to help others. Now, my question: As I understand it, the basic procedure to get from an idea to a machined part is as follows. Design the part using some form of CAD. Upload that drawing to the Mach or other program which converts the design into G-Code and then sends that information to the controller which in turn, controls the motors and thus the machine. Is this about right or am I missing something? Assuming that I have this basic concept correct and I then correct in saying that without CAD you're up the creek without a paddle? In other words there is no other way around the need for CAD?

Thanks to all

Patrick


----------



## Hawkeye

Patrick,

You're really close. That's what I thought when I started down the CNC road. From Cad, you need to go through a second program which generates the G-code, then feed the G-code into Mach3, which tells the breakout board (controller) what to send to the stepper motors.

Some of us are using D2NC (Design to numerical control) software as the second step. It doesn't do everything (there's a list of shapes in CAD that it won't do directly, like ellipses), but is a good starting point for us beginners. There are some work-arounds you can make up, such as making up an ellipse out of sections of arcs, which it can handle.

D2NC can let you make up the shapes you want directly, without a CAD program. They have a shape library that you can draw from, and once you get used to G-code, there are some simple shapes you can write in from that knowledge.


----------



## JohnAspinall

plm said:


> Now, my question: As I understand it, the basic procedure to get from an idea to a machined part is as follows. Design the part using some form of CAD. Upload that drawing to the Mach or other program which converts the design into G-Code and then sends that information to the controller which in turn, controls the motors and thus the machine. Is this about right or am I missing something? Assuming that I have this basic concept correct and I then correct in saying that without CAD you're up the creek without a paddle? In other words there is no other way around the need for CAD?
> Patrick



Real close, but just as a different perspective, here how I think about this.

There's an information flow; it starts in your head, and ends up with motors moving.  You've mentioned some assorted players along the information flow (e.g. CAD program, Mach,...) but it's just as important to know what _form_ the information takes along the way.  A simple version might be:


 A CAD program turns keystrokes and mouse clicks into a description of shape (e.g. dxf file, AutoCAD file).
A CAM program turns a description of shape into a description of tool path (nearly always some flavor of G-Code).
A G-Code interpreter (e.g. Mach) turns a description of tool path into motor motions (e.g. coordinated steps for stepper motors, position commands for servos,...).

That's the main highway.  There are assorted shortcuts and detours.  For example, if the shape is really really simple, you might know the best (or only) toolpath in your head.  You could skip 1 and 2, and write the G-Code yourself, if you're so inclined.  Sometimes people will take the G-Code written by a CAM program, and "tweak" it by hand.  Hawkeye mentions D2NC which (my perspective) is roughly a CAM program filling slot number 2 above, but designed to take shape input directly from the human, instead of from a CAD program.

Just my perspective, but:  *shape >> toolpath >> motor motion*  is central for me.


----------



## plm

Hawkeye and John

Thanks for the description of the process. I believe I have a pretty firm grasp of the process now. I hope this thread continues as there is a host of information here for the person new to CNC.

Patrick


----------



## jumps4

I use d2nc to convert dxf files into g-code it is faster than using d2nc to draw. d2nc is really easy to use the import and convert functions and does a lot of really nice functions like tabs.
steve


----------



## Tony Wells

One thing not mentioned (unless I missed it....sorry if so) is what I know as a Post Processor. Short form: Post. Not the same as P.O.S.T. for all the PC nuts here. Is is a simple translation program that must be custom tailored to each machine control type. Some controls don't read every M and G code the same, or some not all the same set. So, if you have a certain control, say, a Fanuc 0T (oldie, I know), you have to run your code AFTER (hence the term post...) writing it, whether manually, or with some CAM assistance, to actually "fit" the control on the machine you want to run the program on. You can have the same basic source program, and multiple post processors make it compatible with any control you have. Some of this will not apply to home-brew CNC, but factory but controls require this treatment.


----------



## LoboCNC

*Re: Basic CNC - a compilation of info.*

I've been looking over this thread and it contains a lot of useful information but it is kind of scattered around.  I'm putting together a (hopefully) coherent description of a lot of CNC basics on my web site at:

lobocnc.com/chapter1.html

I currently have brief chapters on motor basics and types of motors and am planning chapters on motor controller electronics basics for the different types of motor controllers, and a final set of chapters on software (G-code interpreters/machine controllers, CAD, CAM).   

I'm trying to keep it succinct and tailored to CNC applications.  Before I get too far into it, I'd love to have people take a look and give feedback (more detail, less detail, less boring, etc.).  Hopefully you'll find it useful.

Thanks, Jeff


----------



## DMS

@Tony Wells:  For AlibreCAM (the only package I have any real experience with), you get a ton of post files, including one for LinuxCNC (though, it's labeled Sherline, because Sherline uses LinuxCNC), and one for Mach3. I'm assuming other CAM packages are similar.

@LoboCNC: I didn't look through everything, but it looks like you have gotten a good start.


----------



## Syaminab

*Re: Basic CNC - a compilation of info.*



LoboCNC said:


> I've been looking over this thread and it contains a lot of useful information but it is kind of scattered around.  I'm putting together a (hopefully) coherent description of a lot of CNC basics on my web site at:
> 
> lobocnc.com/chapter1.html
> 
> I currently have brief chapters on motor basics and types of motors and am planning chapters on motor controller electronics basics for the different types of motor controllers, and a final set of chapters on software (G-code interpreters/machine controllers, CAD, CAM).
> 
> I'm trying to keep it succinct and tailored to CNC applications.  Before I get too far into it, I'd love to have people take a look and give feedback (more detail, less detail, less boring, etc.).  Hopefully you'll find it useful.
> 
> Thanks, Jeff


  I think your machine is great, If is possible for you to set it in the Market for a fair price accesible for students, you will detonate a enthusiasm for more hobbiest and people to get into machinning. Great Job.


----------



## dustooff

Hi all,
  I've come to this thread late, but here are some more sources of info that kept me on track for my build.

http://lcamtuf.coredump.cx/gcnc/  the Guerilla guide to CNC machining.


_Alan Marconett_ KM6VV http://www _hobbitengineering _com (has new website, prob to avoid being linked to middlearth.)
http://www.marconettengineering.com/
View attachment CNCforHobbyists.pdf

	

		
			
		

		
	
 5000 ft view roadmap. He doesn't seem to have it on his new website.


http://visualsizer.com/tag/stepper-motors/  this guy wrote the book on stepper motors.

regards
Andrew Burchill


----------



## awander

joe_m said:


> I'm still trying to figure out what I need to do for CNC, but I think I can answer the stepper motor question.
> A regular motor just goes round and round (or back and forth if it's a windshield wiper motor.) A stepper motor shaft goes round in *steps or increments. *It takes a pulse of power and the shaft rotates a set amount. That amount doesn't vary - one pulse of power and it moves one step. The step might be 1/10 of a full rotation, 1/4, 1/3, whatever - but it will be the exact same each time. And since CNC relies on the computer moving the x/y/z axis of your mil or lathe in very precise measurements you need a stepper motor.
> For example: Your computer program says "move the X axis .01 to the left before making this cut" and if your stepper motor is geared up to the x axis in such a way that each pulse of power makes it rotate just enough to move .005 then the computer will tell the motor to take two steps.
> With a normal motor you get on and off and you just can't control the on/off precisely enough to  get the controlled movement you need.
> 
> That's my understanding of stepper motors.
> Joe



I'm coming in late here, but I see a few slight misstatements in the explanation of why a stepper motor is different from a regular DC motor.

The misstatements are that steppers take in a pulse of power and move one step.

That is only true if you consider the stepper motor drive to be a part of the motor.

The drive is what takes the input pulse(or step) and converts it to what the motor actually needs-which is more complicated. It consists of applying/removing power to/from the proper windings to actually move the motor, and when the move is finished, keeping the power applied properly to hold the motor in place. If you just "pulse" the power to the motor, it may move, but it will not stay in position after the pulse is finished.


----------



## dave2176

What about limit or home switches. What are their restrictions? My mill came with limit switches on x and z. Can they be used? If I need to buy new ones what am I looking for?



Thanks,

Dave


----------



## DMS

What are you using as a controller? What about interface hardware? These will both effect what you can do with the switches. For LinuxCNC, all you need is some spare inputs. Then you attach the sensors to the inputs and configure the software. 

Keep in mind that home and limit sensors are used for 2 different things. Home switches allow you to locate your position relative to the machine after a power up. Limit switches are a safeguard to keep you from moving an axis too far (and possibly doing damage).

If you can tell us more about your setup, we can provide more guidance.


----------



## dave2176

Thanks DMS,
I have a C10 parallel controller, 2 640 oz steppers with 5056D drivers from Automation Technologies for X and Y and a 1805 oz stepper with 11080 driver. The computer is an older 2.1GHz that dual boots between LinuxCNC and Windows XP with Mach 3. I'm leaning towards Mach because I like what I'm reading about Mach 4 and would like to move to USB or Ethernet as budget permits. 

I guess the question really is, what am I missing to get this G0755 off the ground?

Thanks,
Dave


----------



## DMS

I started with the C10 and Linux CNC. Ran for about a year like that before I upgraded to some controller cards from Mesa.

The main issue with the C10 is that you are really limited on inputs (5 inputs if you use the configurable pins as output, which is what you have to do for a 3 axis machine). To give each sensor it's own input, you would need 9 (2 limit sensors and a home switch for each axis). What I did (and what you will have to do) is to run multiple sensors into the same input. I think I gave each home switch it's own input, and then all of the limit switches went into the last input. It works fine, but when you hit a limit, it is not that clear as to which one you hit, and you have to hunt around a bit.

As far as getting the machine running, I would worry about your motors first. Get things moving first, then set up your switches. Limit switches are great, but they can be a pain when bringing things up, as things may suddenly stop on you making you think something broke, when in reality, the software just faulted out.

One last thing, make sure that you wire your switches up so that they are fail safe. This means that if the wires leading to the switches is damaged, or if they are totally disconnected, the machine should not run. If you do not do this, then the switches won't really do anything other than giving you a false sense of security (meaning they won't save your bacon when it counts).


----------



## Ed of all trades

Thanks guys,  I now have more of an idea of what I Don't know.  Before I just knew I didn't know anything about it, now I have an idea of the way the system works.  The one thing I did not get is this.  Is a ball screw a feed screw that uses balls instead of a threads on the "nut"?


----------



## JimDawson

Ed of all trades said:


> Is a ball screw a feed screw that uses balls instead of a threads on the "nut"?




This says it much better than I can  http://www.barnesballscrew.com/how-a-ball-screw-works/


----------



## Tony Wells

Built on the same concept as the recirculating balls in a Saginaw style steering box.


----------



## Ed of all trades

Thanks Jim and Tony I figured It had to be something like that but I had no idea how it could be done.


----------



## JPigg55

Okay, couple more questions on stepper motors.
First is to do with physical size and weight.
What is the typical physical size and weight of NEMA 23, 34, and 42 stepper motors ?
For example, I have a Clausing 8520 mill that I’d like to install stepper motors on for direct drive of the axis, but really don’t want to have a 50 lb stepper motor that’s 12” long sticking out in 3 different directions that I'll have to engineer some sort of mounting system.
Second, how would you decide if going direct drive or geared drive via gearbox or belt & pulley as far as required motor size ?
If math is correct and works here, I could use a NEMA 23 CNC kit with 382 oz-in motors ($369) with a NEMA 23 5:1 planetary gearbox ($200 ea) for a total of $969 assuming 382 oz-in at 5:1 gear ratio would be the same as 1910 oz-in of torque, but with smaller, lighter, and cheaper motors.
I know this would not be a direct correlation since the motors would have to operate at a higher speed, hence lower torque, for the same feed rate, but I think you get my drift.
Third, what factors would you consider for sizing a 4th axis for say connecting to a rotary table or dividing head ? Since these type accessories have some degree or gearing integral to them, I’d think a small oz-in stepper could be used, but how would one decide on oz-in sizing ?
Forth, is there an easy way to direct control stepper motors without using a CNC program and/or computer ?
I want to add power feeds to at least 2 of my axis (getting tired of cranking, LOL).
Accordingly, my research has shown that I’d need something like a Servo Type 140 power feed for my X & Z axis. Looking on eBay and other suppliers, a Servo Type 140 power feed runs anywhere from $650 to $800 each. That totals somewhere between $1300 and $1600 for adding power feeds to 2 axis.
Now, looking at Automation Technologies, I can buy a 3 or 4 axis NEMA 34 CNC conversion kit with 1805 oz-in stepper motors and drivers for $1022 (3 axis kit) or $1350 (4 axis kit).
If I needed larger steppers, they have a NEMA 42 kit with 2830 oz-in motors for $1193 (3 axis kit) or $1712 (4 axis kit) or, as stated in the second item, using smaller motors with gearboxes.
From a purely financial aspect, it seems to make more sense to install manually controlled stepper motors than buying power feeds, plus being most of the way towards a full CNC conversion, if I so desired later.
Considering this since I know nothing about CAD/CAM other than what I’ve read here, but not wanting to rule out the possibility for later. If I knew I wanted to go CNC for sure, I’d more likely sell what I have and just buy a Tormach or a Precision Mathews mill that’s already a CNC machine.


----------



## JimDawson

I don't have time right now to compose a full answer, but 1200 oz/in NEMA 34 motors in direct drive would be more than enough.  They weigh about 5 lbs, and are about 5 inches long.  I'm using these same motors to run a 48x96 wood router at 150 IPM, and 300 IPM rapids.  The router table probably weighs as much as your entire machine.  Nothing wrong with Automation Technologies, but look at Automation Direct for steppers and drives also.


----------



## JPigg55

JimDawson said:


> Nothing wrong with Automation Technologies, but look at Automation Direct for steppers and drives also.


 
Any particular reason for suggesting Automation Direct over Automation Technologies ? Just curious.


----------



## JimDawson

Just for price comparison and my preferred vendor.  Both vendors are good.


----------



## JimDawson

JPigg55 said:


> Okay, couple more questions on stepper motors.
> First is to do with physical size and weight.
> What is the typical physical size and weight of NEMA 23, 34, and 42 stepper motors ?
> For example, I have a Clausing 8520 mill that I’d like to install stepper motors on for direct drive of the axis, but really don’t want to have a 50 lb stepper motor that’s 12” long sticking out in 3 different directions that I'll have to engineer some sort of mounting system.
> Second, how would you decide if going direct drive or geared drive via gearbox or belt & pulley as far as required motor size ?
> If math is correct and works here, I could use a NEMA 23 CNC kit with 382 oz-in motors ($369) with a NEMA 23 5:1 planetary gearbox ($200 ea) for a total of $969 assuming 382 oz-in at 5:1 gear ratio would be the same as 1910 oz-in of torque, but with smaller, lighter, and cheaper motors.
> I know this would not be a direct correlation since the motors would have to operate at a higher speed, hence lower torque, for the same feed rate, but I think you get my drift.
> Third, what factors would you consider for sizing a 4th axis for say connecting to a rotary table or dividing head ? Since these type accessories have some degree or gearing integral to them, I’d think a small oz-in stepper could be used, but how would one decide on oz-in sizing ?
> Forth, is there an easy way to direct control stepper motors without using a CNC program and/or computer ?
> I want to add power feeds to at least 2 of my axis (getting tired of cranking, LOL).
> Accordingly, my research has shown that I’d need something like a Servo Type 140 power feed for my X & Z axis. Looking on eBay and other suppliers, a Servo Type 140 power feed runs anywhere from $650 to $800 each. That totals somewhere between $1300 and $1600 for adding power feeds to 2 axis.
> Now, looking at Automation Technologies, I can buy a 3 or 4 axis NEMA 34 CNC conversion kit with 1805 oz-in stepper motors and drivers for $1022 (3 axis kit) or $1350 (4 axis kit).
> If I needed larger steppers, they have a NEMA 42 kit with 2830 oz-in motors for $1193 (3 axis kit) or $1712 (4 axis kit) or, as stated in the second item, using smaller motors with gearboxes.
> From a purely financial aspect, it seems to make more sense to install manually controlled stepper motors than buying power feeds, plus being most of the way towards a full CNC conversion, if I so desired later.
> Considering this since I know nothing about CAD/CAM other than what I’ve read here, but not wanting to rule out the possibility for later. If I knew I wanted to go CNC for sure, I’d more likely sell what I have and just buy a Tormach or a Precision Mathews mill that’s already a CNC machine.



One way to look at the torque requirement is to make a disk to fit the leadscrew and wrap a string around it and pull with a spring scale, a little math will give you the torque required.

I am going to use a NEMA 23in the 300 oz/in range on my rotary table when I get around to converting it. A RT is a 90:1 gear, so doesn't require much torque to turn the crank.

Without ballscrews more torque will be required to move the table which is the reason I suggested a 1200 oz/in NEMA 34.  You can always turn the torque down if it's too much.  On my mill the X and Y DC servos are in the 600 oz.in range, and I'm am using a 1280 oz/in stepper on the Z.  I cut the torque back by 1/2 and it will drill a 1/2 inch hole in steel.  My mill table is 10x54

One problem with coupling the steppers directly to the axis as a power feed is that they cog.  It makes hand feeding kind of lumpy.  A method of decoupling the motor would be suggested.  Maybe something like a lever operated dog clutch.

A NEMA 42 is a huge motor, 20 lbs or so, about the same torque as a 3HP motor.  Here is a picture of a NEMA 42 with a NEMA 23 sitting on top of it.  Way overkill for your application.




Stepper speed controls are cheap, I bought a couple of these, one to run a NEMA 42 stepper for a project, and the other just to play with.   http://www.ebay.com/itm/9-24V-Input...59466c&pid=100338&rk=3&rkt=30&sd=281570110066


----------



## JPigg55

Thanks Jim,
Any suggestions/links for a control method other than a PC for speed, direction, and possibly distance of travel including being able to switch between full, half, or micro stepping ?
For the purpose of using more like a power feed, considering using something like Rasberry Pi or Arduino through a keyboard interface for this purpose.
Was also considering some sort of adjustible limit stops to prevent powering into lead screw limits of travel.
Still trying to learn a lot of this stuff, but figure it's possible.
I was thinking of using some sort of coupling device to better allow manual operation, but I can't figure a way to do this for my Y and Z axes unless I use something like a belt & pulley cofiguration since  there's only one handle on these axes vs two on the X axis. Thinking I'd have to use dual shaft steppers and connect the handles there.


----------



## JimDawson

This is a stepper speed controller that does not require a computer for control.  It has limit switch inputs but will not move a specific number of pulses.
http://www.ebay.com/itm/9-24V-Input...59466c&pid=100338&rk=3&rkt=30&sd=281570110066

Once you add distance traveled then you are into CNC control.  Most if not stepper drives have several settings for steps per revolution and power output.

The down side of putting handles on the steppers is that steppers cog when turned and cause the hand feed to be ''lumpy''.  The other thing is that the steppers become a generator when turned by hand and if connected to the drive, require extra effort to turn.  For hand feeding you would want to provide a switch to disconnect the motor wires from the drive if the motor is mechanically connected to the lead screw.

A belt non-cog system would work on the Y and Z, also on the X for power feed, but for accurate positioning it would require a timing belt..
.
.


----------



## JPigg55

Thanks Jim,
Would using a Variable-reluctance stepper motor get rid of the "Lump" problem of hand operation ?
Just turn off the power and manually feed ?


----------



## JimDawson

Good question, and one I am not able to answer.

A brushed DC servo motor would not cog.  There are DC servo drives that will take a step & direction input just like a stepper drive.  Higher cost than stepper systems but would make a great basis when you are ready to convert to CNC.  Something in the 600 oz/in (~30 in/lb) range world work in your application.


----------



## JPigg55

Since I was thinking of being able to drive a rotary table and/or indexer, figured I'd better stick with steppers.
I'd think that would be a better option for controlling rotation for operations like gear cutting.
Not sure if servo motors work well for this application or not and didn't think mixing and matching both stepper and servos would be a good idea.
I read about Variable-reluctance stepper motors here: http://www.freescale.com/files/microcontrollers/doc/app_note/AN2974.pdf
Says they don't exhibit magnetic resistance when rotating unpowered. Did a quick Google search for them and didn't find a whole lot so not sure how available they are.


----------



## JimDawson

A servo motor or a stepper will do exactly the same job and just as accurately if set up correctly.  It's really a matter of the drives, the feedback (encoder), and the controller.  Adding feedback to a stepper system technically turns the stepper into a servo.  I have a mix of brushed DC servos(X&Y) and a stepper on my Z axis and it works well.  I consistently hold 0.0001 on my Z.  See that build here http://www.hobby-machinist.com/threads/z-axis-cnc-conversion.21060/

I am going to build a RT with a stepper on it for my 4th axis.  Going with a stepper just based on cost, not function.


----------



## JPigg55

Lot of good info.
One question, you stated that a 1200 oz-in stepper would work for my application. You also posted that a 600 oz-in servo would work as well.
I thought I understood the differences between steppers and servos from reading earlier posts in this thread, but I either missed something or don't quite understand.
Why would a servo half the power rating work for the same application as a stepper with twice the power (meaning oz-in rating) or did I miunderstand your replies ?


----------



## JimDawson

Nope, you have it correct.  BUT.... You normally size steppers twice the torque that you size DC and AC servo motors because the steppers can decouple under load and lose steps the other motors will just stall, but won't lose position.  A stepper with feedback (servo) may decouple but won't lose position.


----------



## JPigg55

So, if I understand correctly and for example, I could get by with using a 600 oz-in stepper for my intended use since I would not (at least for now) be using a CNC program to run them realize that they would be undersized for a full CNC conversion or is there something I'm missing as far as the stepper controller is concerned ? Or does it have more to do with the way the different motors work ?


----------



## JimDawson

On a machine of your size, the 600 oz-in would probably work OK for CNC with ball screws.  Acme thread leadscrews require quite a bit more torque for the same load.

A lot of it has to do with the way the motors are constructed and how they are controlled.  By decouple in the case of a stepper I mean that the torque overcomes the magnetic force inside the motor, and the magnetic field continues to spin but it can't grab hold of the rotor.

A brushed DC motor has no way to decouple, it just keeps producing torque, even if stalled.

A BLDC (AC servo) is a 3 phase motor and normally won't decouple, but I think it can, but I have never seen it happen.  I think the controller would shut it down before it reached that point.  Somebody correct me if I'm wrong on this point.


----------



## LoboCNC

The torque ratings issue is quite a bit more complicated that steppers being able to "de-couple" or lose steps, all though that's part of the reason you need a higher torque rating with a stepper.  

The rated torque for a stepper motor is the "holding torque" which is the torque the motor can resist when the shaft is not moving.  The minute you start stepping, the torque drops by 20% or so.  And as you move faster, the available torque drops even further, essentially down to nothing at high speeds.  Large steppers may have only 25-30% of their rated torque at 1000 RPM.  Also any vibration in the motor drive train is effectively added to the torque seen by the motor, further reducing the available torque to drive the load.

Servo motors have 2 different torque ratings - the continuous torque (this is the rating most often cited) and the peak torque which may be 2x - 3x times the the continuous torque for a large motor.  With a servo motor, though, the torque does not drop off with the speed - most servo motors will run at the rated torque at speeds up to 1000 - 3000 RPM.  The other great thing about servo motors is that the controller can run them a _more _than the continuous rated torque (up to the peak torque) for short periods to overcome static friction.

Also keep in mind that the force generated by a motor directly coupled to the lead/ball screw will produce a force (in pounds) of:  (rated torque in oz-in) x (number of threads/inch) x 2 x pi x (lead screw efficiency) / 16.  Therefore, 600 oz-in of torque applied to a 5 TPI ball screw (~90% efficient) would produce a force of 1059 lb.  This is a fairly dangerous amount of force that would likely damage something on your machine.  200 oz-in would be more appropriate, but if you are using a 600 oz-in stepper, you may only have 200 oz-in of torque available at higher speeds.


----------



## JPigg55

Okay, been doing some looking around on servos. It appears one has the choice between AC or DC servo motors.
From a hobbyist point of view, what's the difference between the two and what would be your recommendation in as far as ease of use and simplicity in set-up ?
Some of the things I read seemed to imply that it may be a good idea to use gear reduction with servos.
What are your thoughts ? Would say using a 2:1 gear reduction reduce the required servo size by half ?
Lastly, I've seen the term "Holding Power/Torque" used in reference to stepper motors. Do servos have a similar process for holding position ?


----------



## JimDawson

LoboCNC said:


> The torque ratings issue is quite a bit more complicated that steppers being able to "de-couple" or lose steps, all though that's part of the reason you need a higher torque rating with a stepper.
> 
> The rated torque for a stepper motor is the "holding torque" which is the torque the motor can resist when the shaft is not moving.  The minute you start stepping, the torque drops by 20% or so.  And as you move faster, the available torque drops even further, essentially down to nothing at high speeds.  Large steppers may have only 25-30% of their rated torque at 1000 RPM.  Also any vibration in the motor drive train is effectively added to the torque seen by the motor, further reducing the available torque to drive the load.
> 
> Servo motors have 2 different torque ratings - the continuous torque (this is the rating most often cited) and the peak torque which may be 2x - 3x times the the continuous torque for a large motor.  With a servo motor, though, the torque does not drop off with the speed - most servo motors will run at the rated torque at speeds up to 1000 - 3000 RPM.  The other great thing about servo motors is that the controller can run them a _more _than the continuous rated torque (up to the peak torque) for short periods to overcome static friction.
> 
> Also keep in mind that the force generated by a motor directly coupled to the lead/ball screw will produce a force (in pounds) of:  (rated torque in oz-in) x (number of threads/inch) x 2 x pi x (lead screw efficiency) / 16.  Therefore, 600 oz-in of torque applied to a 5 TPI ball screw (~90% efficient) would produce a force of 1059 lb.  This is a fairly dangerous amount of force that would likely damage something on your machine.  200 oz-in would be more appropriate, but if you are using a 600 oz-in stepper, you may only have 200 oz-in of torque available at higher speeds.




Great explanation!


----------



## JimDawson

JPigg55 said:


> Okay, been doing some looking around on servos. It appears one has the choice between AC or DC servo motors.
> From a hobbyist point of view, what's the difference between the two and what would be your recommendation in as far as ease of use and simplicity in set-up ?
> Some of the things I read seemed to imply that it may be a good idea to use gear reduction with servos.
> What are your thoughts ? Would say using a 2:1 gear reduction reduce the required servo size by half ?
> Lastly, I've seen the term "Holding Power/Torque" used in reference to stepper motors. Do servos have a similar process for holding position ?



Primary differences are cost, construction, and operating principal.  The AC servos are the modern equivalent of the older DC servo, normally less maintenance, but that is really a relative view.  The only real maintenance on a DC servo it periodic brush replacement.  Probably not something you would ever have to do on a home use machine.

From a setup perspective, AC and DC servos are comparable.  Both require tuning, and the controls are slightly more complex that s stepper system.  Older DC servo systems are a bit more complex to set up, but not bad.

You could do a 2:1 reduction and reduce the motor size, unless you really need 400 IPM rapid moves.  A reduction is a good idea.

As stated by LoboCNC, the torque curve is almost flat from zero RPM to max speed.  A servo system has the same or more holding torque as a stepper of similar size.


----------



## JPigg55

Thanks a ton, last couple questions.
I've read a lot about tuning, but have never heard an explaination of what it really is.
Do you have a CNC for Dummies explaination for it and is this more to do with the CAD/CAM programs and is it something I could basically ignore for now in as far as using them for what would basically be power feeds ?
What would you say is a good speed range for Rapids ?
Lastly, do you have any recommendations for a controller for use in manual operation of servos ?


----------



## JimDawson

Hmmmmm....Tuning Servos..  There have been entire books written on this subject.  From a user perspective it really means getting the system, in this case your milling machine, to operate smoothly and accurately.  This is normally as simple as making a few controller adjustments.  It has to be done with with all drive system types.  

Lets use the car analogy.  You are the controller, the car is the motor, and the feedback is all of the information that you are processing (sight, sound, seat of the pants feel), and you output signals to the throttle, brakes, and steering.  This is a closed loop system.  For simplicity we will ignore everything except the throttle and the brakes for this explanation.

Let's say you are sitting at a stop sign and a block down the street there is another stop sign.  So the ideal motion profile is to accelerate smoothly and quickly up to the target speed (speed limit), proceed down the street at the target speed, then decelerate smoothly and quickly to reach the target position (the stop sign).  A new driver might accelerate too quickly or too slowly, not be able to control the speed, and brake too hard or not enough.  So in the case of the servo system, you have to teach the controller how to operate the car. * This is tuning.*

Many modern servo drives can be operated manually with very simple controls.  A FOR/REV switch, an ON/OFF switch, and a speed pot much like a VFD.  The setup is easy by making adjustments to the on-board software via the front key pad or connecting it to a computer.  The parameters are normally Acceleration, Deceleration, Max Speed, and the *P*roportional *I*ntegral *D*erivative parameters (PID).  I'm not going to try to explain the PID here, but normally the only value that you have to adjust the P parameter.  This sets the ''tightness'' of the system, set to high and the system becomes unstable and the motor will oscillate, set too low the system is mushy.  For manual operation not so critical, but for CNC operation it has to be right.  Not difficult to do, just takes a bit of playing around to see how the machine reacts to the changes you make.

Speed range for rapids.....  I have my mill set to 100 IPM rapid.  Plenty fast.  Slow jog is set to 30 IPM.  Some modern CNC machines run 1000 IPM rapids, that's just crazy and a lot of horsepower on the servos.

I also want to note here that the reason I suggested 1200 oz-in steppers in my post above is that you are not using ballscrews in the current setup.  An Acme leadscrew requires about 8 times the torque of a ballscrew under the same load conditions.  Should you decide to put in ballscrews later, you can always turn the torque down on the motor.  A simple adjustment.  It's better to have it and not use it, than to need it and not have it.  You can also adjust the torque on servo motors, again a simple adjustment.  My Z axis stepper for instance is turned down to 50% torque output, which gives me about 350 lbs of max down force on my quill before the motor decouples.  My shear screws will shear at about 375 lbs in case something goes horribly wrong.


----------



## JPigg55

Think the light is starting to come on.
I understand PID, we use a lot of controllers at work (Nuclear Power Plant) for various things. As an operator, I'm trained and tested on all the system and controls all the time.
A different department works on them, but from a functionality perspective, I know how the work.
Still trying to decide between stepper and servo, but at least have a little more know how.
Decided to look at specs for a Servo Type 140 PF (recommended for my mill), here are some of the specs they list:

Peak Torque (half-wave series motor): to 140 in.- lb. / 15.8 NM torque

Intermittent Torque: 105 in.- lb. / 11.9 NM

Continuous Torque: 90 in.- lb. / 10.2 NM

Variable Feed Rate: 
.75-25 IPM / 19-635 mm/min (table & cross) 
.5-12 IPM / 13-305 mm/min (knee)

Rapid Traverse: 
35 IPM / 889 mm/min (table & cross)
12 IPM / 305 mm/min (knee)

Gear Reduction Ratio (motor to screw shaft): 72:1.
 
From the suppliers I've looked at, most sell gear boxes designed for either NEMA 23 & 34 stepper or servo motors. The two models most carry are either a 5:1 or 10:1 ratio planetary gearbox.
Probably comparing apples to oranges, but thought I'd try using this data (from a mathematical perspective) to see how it would equate for servo motor drive with gearbox reduction for sizing.
Planning on spending some time in my shop today to start a small project I need to make. Figured I'd start with counting threads per inch on my lead screws and measure the torque required to move the knee, table, and crossfeed although I'm guessing some sort of fudge factor has to be used since this wouldn't be torque with a load on the table.


----------



## JimDawson

I think you have it under control.    Understanding a PID loop is half the battle.

Spend some time looking at the torque curve charts for the various motors you are looking at.
.
.


----------



## JPigg55

Thanks, not in any big hurry beyond my old arms getting tired of cranking handwheels. LOL
Just seems to make more sense money wise. being able to have power on 3 or 4 axes for less than the price of 2 PF's
Not to mention being a computer and program away from a total CNC machine basically.


----------



## JPigg55

Got thinking about going ahead and putting a drive on at least one axis to test things out and get a feel for it.
As such, decided to see how much more it would cost buying the parts piece-meal vs going with 3 axis kit for the 600 oz-in servo motor kit (http://www.automationtechnologiesin...ema34-850-oz-in-72v20a-psu-g320x-gecko-driver).
At least on the Automation Technology site, I was surprised to find that buying the parts listed in the kit was actually $15 cheaper than buying the kit.
You'd think one would get a better price buying an entire kit over the pieces individually.
Huh, before posting, double checked and noticed the link says "850 oz-in, but goes to the 600 oz-in kit page. Wonder if their website messed up.


----------



## JimDawson

JPigg55 said:


> Huh, before posting, double checked and noticed the link says "850 oz-in, but goes to the 600 oz-in kit page. Wonder if their website messed up.



That's a bit confusing


----------



## Wreck™Wreck

JPigg55 said:


> Thanks a ton, last couple questions.
> I've read a lot about tuning, but have never heard an explaination of what it really is.
> Do you have a CNC for Dummies explaination for it and is this more to do with the CAD/CAM programs and is it something I could basically ignore for now in as far as using them for what would basically be power feeds ?
> What would you say is a good speed range for Rapids ?
> Lastly, do you have any recommendations for a controller for use in manual operation of servos ?


When you see a servo motor control out of tune for the first time you will understand, they tend to "hunt", rotating in each direction slightly on each side of the desired position, this can be a vibration.
As far as rapid speeds, go as fast as the drive will allow to a position close to the desired position as at maximum speed it will go past or short of the desired position trying to stop, usually past it due to the momentum of all of the combined components, then do a short feed rate move to where you want to be at a high feed rate then a move at the actual cut feed. I program 1990's early 2000's Bridgeport EZ Path lathes which have slow 100 IPM rapids, I rapid .025/.050"  away from where I want to be then a .020/.050" IPR line move to position and then the actual IPR cutting feeds.

Many high end machines have "look ahead" capabilities, the software adjusts the feeds knowing the the hardware can't make certain abrupt direction changes accurately, making a 90 Deg. turn for example, in the car driving analogy it slows down for the corners (-:


----------

