How to connect motor cables to stepper motors:
How to solder up G540 motor cables:
CNC BASIC PRIMER:
Basically CNC machines control movement of at least 3 Axes of motion. (Axes are left/right, forward/back, up/down) Some types of CNC machines:
MILLING MACHINE: accurately cuts metal. Heavier machines are more rigid and cut hard materials easier without chatter.
ROUTER TABLE: can cut large area of wood and if rigid enough, soft metals like aluminum.
PLASMA TABLE: is like a router table, except uses an electric arc to cut sheet metal. This usually requires a water bath underneath table to contain hot byproducts. This can also be accomplished using Oxygen/Acetylene torch.
Some are DUAL USE and can be converted back and forth from router to plasma.
ACME SCREWS are the standard for most manual mills and some CNC routers. They are just a relatively close tolerance flat-topped screw thread and give fairly high precision and low backlash while the adjustment lasts. Do not confuse Acme screws with threaded rod, which is a rougher, harsher version of screw.
Acme screws and nuts give smooth movement and accuracy but wear fairly quickly. Usually the screw wears most in the middle and less on the ends. (So it's a good idea to move your work around.) After a while, you can't use the ends because it's too tight. Still, Acme Screws get a lot of good work done. They are excellent value for their price.
Even relatively cheap ballscrews, which HAVE some backlash, are better because the backlash does not vary so often. Mach3 can compensate for backlash that doesn't keep getting worse
AXES: An axis is a direction of the CNC machine that is controlled by a motor. X axis = Left/Right. Y axis = Forward/Back. Z Axis = Up/Down (or on lathe: Z = Left/Right and X = forward/back. It is good to have as much travel as possible on these--Especially the Z. (for long tool use) A,B,C axes (AKA 4th, 5th & 6th Axes) are rotary or angular. A is usually the fourth axis, and can either rotate perpendicular to the X axis or perpendicular to the Z axis. B rotates perpendicular to Z axis. C rotates perpendicular to Y axis. The more axes a CNC machine controls, the more expensive it is--Both mechanically and for software.
AXIS SPEED: There are basically two speeds--Cutting and rapid. Both are set in software, typically Mach3 or emc2. Speeds are set in Inch Per Minute of axis movement. (IPM) In metric it would be mm or meters per minute.
Cutting speed is Feed or F in G code. Rapid speed is the speed the spindle moves from place to place BETWEEN cuts. Feed speed can be set as low as you desire. Rapid speed (Which you really want to be high to cover large areas) is set as high as both the electronics will provide and you are comfortable with. Generally, on a 4 x 8 or larger router, 800 IPM is not unheard of.
AXIS TRAVEL--HOW TO MEASURE:
X) A: Run the table all the way left. Mark the position of center of spindle. B: Run the table all the way to right and do the same. Now measure between marks--that is your X axis travel.
Y) A: Run the saddle all the way back. Measure distance from column to rear side of table. B: Run the saddle all the way forward. Measure the same. Now subtract A from B. That is your Y axis travel.
Z) A: Run the head down as low as it will go. Measure distance from spindle to table. B: Run the head UP as high as it will go. Measure the same. This is your Maximum Spindle Height. Now subtract A from B. That is your Z axis travel. If A measurement was Zero, then Z travel and MSH are one and the same. If CNC only moves the quill, then Z Axis travel is maximum quill travel.
BACKLASH: When reversing direction, any handle (Or motor) movement that does not also move the axis (or table or head/quill) is backlash. It is measurable directly by the dial on the handwheel or with a dial indicator. For CNC, backlash must be checked and adjusted often. In manual operation, turning the crank one full turn backwards before starting forward, will negate backlash. Mach 3 has a similar option that can be selected. Bear in mind that backlash of .003 inch is about the thickness of a sheet of paper. Depending on the accuracy needed, it may not even matter.
BALL SCREWS have large threads that allow a ball bearing to roll IN them. The ball screw nut contains many small steel balls that recirculate inside to reduce friction. The ball nuts can be extremely tight to eliminate backlash--yet still have little friction. Ball screws and nuts are extremely hard, so they don't wear out easily if kept properly lubricated.
Once ball screws are installed, manual control may not be possible. Because ball screws turn so easily, the table or head might not hold a position, but be free to move on its own. So while you COULD install hand cranks on double shaft motors, you might have to constantly lock the gibs on the other axes and it just may not be practical. You can semi-manually control a CNC machine by jogging.
Ball screws come in two types: Rolled and ground. Ground ball screws are best, but can cost thousands of dollars for just one screw. We small-time automators usually can't afford them, unless we find a really great deal on ebay.
Rolled ball screws come in several grades. The better they are for accuracy and low backlash per length, the more they cost. We usually use a medium grade.
If you buy say a six foot length of ball screw, it needs to first be cut to axis lengths. It is hardened material, so this is usually best done with an abrasive cutting disk or a grinder.
After they are cut, each end is turned down on a lathe. Because they are hardened, this is difficult to do. One end is usually turned to one diameter to fit a bearing. The other end may be turned to several decreasing diameters to accomodate thrust bearings, threaded for clamp nuts, and turned at the end to fit stepper coupling or pulley.
Once you have determined the LENGTH of the screws you need, there are companies who will make your ball screws to order.
Ball Screw basics by Swede:
BALL NUTS: These are basically just enclosures that contain and recirculate the small ball bearings as they roll in the screw threads.
PRE-LOADED BALL NUTS: These have been re-loaded with every other ball slightly larger. This takes up all available wiggle space and helps eliminate backlash.
DOUBLE BALL NUTS (Also sometimes called pre-loaded): Two ball nuts with one tightened against the other, with a tension spring between, to counter backlash. These are even better, but more expensive, and because they are longer, sometimes cost a loss of axis travel.
BREAK OUT BOARDS (BOBs): Control software like Mach3 or emc2 uses the many wires in a parallel port (printer) cable to send control from the computer to the drives. Rather than fastening each tiny wire in the cable to its destination, the simple breakout board accepts the cable plug and then puts each wire on an accessable screw terminal. The more expensive COMPLEX BOB will also incorporate relay drivers, spindle speed controls, opto isolation and other nice features. The downside to this though is that if one of those features blows, the whole BOB may be out of commision.
CAN I STILL USE THE MANUAL CONTROLS? DO I NEED A DRO? MANY, who install DROs do so enroute to CNC. DRO is not needed for CNC, so DRO money spent is often virtually wasted.
Everybody wants to maintain manual control at first. SOME actuallly DO it. Almost everyone quickly stops using manual control. Manual control is at least POSSIBLE if you use the stock lead screws. If you install Ball Screws though, Manual control is not feasible because there is no friction to hold the table still against cutting force. After CNC conversion, the axes can be manually controlled by jogging--Especially on a lathe--Think of it as smooth power feed on both axes.
Can I build one machine that will cut everything from wood to steel?
NEMA = National Electrical Manufacturers Association. They set the USA electrical standards.
NEMA SIZES: Both steppers and servos may come in different Nema flange sizes.
Nema 23= 2.3 inch flange. Nema 34= 3.4 inch flange etc. We usually use either the smaller Nema 23 or the somewhat larger Nema 34. The torque may overlap between the sizes, but generally the larger motor runs cooler due to more frame to dissipate heat, but also runs slower due to higher detent torque.
For example, a 500 oz Nema 23 stepper motor will be working hard (and getting hotter) to attain the torque at which a 500 oz Nema 34 will be easily cruising. Generally, power is added by extending the length (stack) of the motor.
Generally, we want to use smaller, faster motors that are well matched to their Voltage and Amperage requirements.
OPTO-ISOLATION: This protects the computer circuits by translating electron impulses to light and then back to electron impulses. A short circuit cannot go in reverse across the light barrier.
PID: A Proportional–Integral–derivative controller (PID controller) is a generic control loop feedback mechanism widely used in servo control systems.
POWER SUPPLY (PSU): Both types of motors run on DC Voltage. The power supply simply converts ordinary alternating current into smooth DC at a Voltage for CNC motors. Choosing the proper voltage to match drivers/motors is one of the most important decisions needed. You NEVER want to install a switch on the DC side of the power supply.
You CAN have a FUSE on the DC side, but no switch. There is no problem if the power is cut on DC side. The trouble begins when you turn the switch ON. The PSU allows slow buildup of power when AC is switched on--But drives may suffer catastrophic power surge when DC is switched on.
One power supply, sized to power the lowest Best voltage motor, is all you need. EG: Two 60V motors combined with one 83V motor = Must use 60V or less PSU.
Stepper motors need around 20 times their rated voltage to perform at their best. For example, a motor rated at 2 volts will perform best, without stalling or losing steps, with a 40 volt power supply.
For the EXACT Max/Best power needed for a stepper motor the formula is 32 times the square root of motor inductance in mH. EXAMPLE: A motor with 4 mH inductance would need a 64 Volt PSU. The PSU must be sized for the lowest voltage motor--So a 64 Volt motor combined with an 85V motor would need a 64V PSU. You would then pick the PSU that is at or as closely below 65V.
Series wired motors can run at higher voltages--but there is a cost in speed performance.
AMPERAGE: To determine the PSU amperage required the formula is 0.6 times total motor amps. EXAMPLE: Ampere rating for three 3 Amp motors would be (3+3+3) times .60 = 5.4 Amp PSU. Some apply a safety margin and use 0.67 as a factor instead. You only consider the Amps for ONE phase of a 2 phase motor. A motor rated at 3A per phase will count as 3A in the calculation--NOT 6A.
PPS: Pulse Per Second.
PULLEYS are used to increase torque by gearing down the motor RPM. However, stepper motors get weaker as speed increases, (To a limit of 800-1500 RPM depending on PS voltage--up to 20-25 times motor rated voltage if the drivers can handle it.) so most of the gain in torque results in lost speed. That's why most stepper motors are connected direct drive.
QUILL: This is a spindle shaft that allows the tool to be moved up and down separately from the head--Usually by a lever/wheel arrangement as on a drill press. Most dedicated CNC machines do not have a quill, and it is usually removed or locked during a CNC conversion of a manual mill. (Because CNC head moves are adequate and extending a quill lessens the tool rigidity.)
RAPIDS: AKA Free air moves. Non-cutter axis moves to get quickly from one point to another. These are cumulative, so if they are slow it slows down the whole job.
The way to get best rapid speeds is to be able to get torque at high RPMs. This is accomplished by matching the motor's best voltage to the power supply voltage. Higher voltage pulses charge the coils more quickly and maintain torque to faster speeds.
The actual motor RPM get will depend on your drivers and power supply. First find the inductance of the motor wired the best way for your driver--Usually Bipolar Parallel. Formula for most efficient motor voltage is 32 times the square root of that inductance.
If you run the motor BPP at that voltage and at full motor amps, and have enough PPS from the computer, you will get the maximum rpm possible. If it is too fast for your liking, you can always slow it down (with no ill effects) in software.
If you run the motor at LESS than that Voltage, and/or with a less efficient driver, you will get proportionately less RPM before stalling and losing steps.
Using the G540 as the controller, (and you should if you can, it's the most bang for the buck) You can operate with a max voltage of 50V. With the G540, you will want motors with best Voltage between 50 and 65V.
RIGIDITY: The basic solidness of a CNC machine. A more rigid machine can take deeper cuts without chatter. Heavy machines are usually more rigid than light ones. A more rigid machine is usually more accurate also.
RESOLUTION: The measured (In mm. or inch) amount of accuracy possible in an axis move. This is a combination of number of steps per motor revolution and number of turns per inch of the lead screw. For example: A direct-drive Stepper motor with driver set for full step will take 200 steps for one full revolution. If that revolution turns a ballscrew with 5 turns per inch, then there will be 1000 steps per inch or a resolution of one thousanth of an inch. (.001) If that same motor was turning a 20 turn per inch Acme screw, the resolution would be 4000 steps per inch, or 4 TEN thousanths of an inch. (4 Tenths or .0004) Pulley or gear ratios add to the resolution and you must also factor in any microstepping of the drive.
Bear in mind that there is no free lunch. Computer pulses are limited, and usually Finer resolution comes at the cost of lower Rapid speed.
STEPS PER INCH (SPI): Are used to set up machine software to accurately move the axes. The usually 1.8 degree per step motor will need 200 full steps to turn one revolution. The TPI of the lead screws will determine how many revolutions will move the axes one inch. Multiply this by the number of micro steps and you have the basic step per inch factor. In Metric, this would be steps per mm or steps per meter.
Ideally, this would make the machine actually move the proper amount. But if say a 6 inch move is called for, but the machine moves more or less, you may need to tweak the SPI up or down a little. Mach3 accepts decimal amounts here.
THC Torch Height Control. Electronic circuitry that automatically maintains cutting distance from material for Plasma Torch.
TPI: Threads Per Inch.
TRAMMING: A process to make all axes of a machine tool perfectly perpendicular to each other. If these axes are not perfectly aligned, then the parts made will be out of intended specification or shape.
WHY HAVE FAST RAPIDS:
There is no maximum limit for IPM. High IPM is a measure of the drive/motor efficiency. Good efficiency equals lower chance of missed steps. It is NOT just about cutting speed--Cutting speed will be influenced by material and force required. Inefficient systems may not be able to provide sufficient force to cut at optimum rates without stalling and missing steps. Many have cursed stepper systems as no good because their inefficient systems lost steps.
FIRST: Understand that YOU can always set the upper limit of your IPM by software control. You can easily slow down an efficient CNC. It is very difficult and often very expensive to SPEED UP an inefficient CNC.
High IPM really saves time when your spindle has to move from one place to another without cutting. Time saved always translates into money saved during production.
If you have lots of time to waste, have no intentions of ever doing any kind of production, will NEVER want anything like an automatic tool changer (or multiple fixtures) and/or are not dealing with a large area to cover like on a router--Then by all means limit your upper rapid speed. But do it in software--NOT by crippling your machine with inefficient components.
WHY A G540 STEPPER DRIVER IS A GREAT VALUE:
Everybody at first says "Wow that's expensive!
Let's look at what a G540 is:
The G540 electronics combine with the tiny G250 drives to make them unkillable, and equivalent to a lower Voltage/Amperage G203V. The G250 alone is not nearly as good.
$600: Four junior unkillable "G203Vs" with built in microstepping to full speed morphing and mid range resonance dampening.
$120+: Optoisolated 4 axis breakout board with spindle speed control, limit and home connections and built in logic power supply.
$200: Worth of time and aggravation wiring up and troubleshooting myriad connections that are already DONE internally with G540.
$015: Motor cable connectors.
Priceless: All this in a tiny package that just requires connection to 2 power supply wires, up to 4 motor cables and one computer parallel cable and it's up and running.
$935+ Total value for only $299.
The only downside is that you need to expend the effort to choose your motors for best power within (Or as close as possible to) the 3.5A, 50V G540 envelope.
Of course, you can do what MANY do and go for a $50 to $100 cheaper solution that may either prove unreliable or turn out to be unsuitable and need to be replaced after awhile--That may NOT be a money saving choice.
ON a milling machine, you want the maximum Z height possible. This translates into column size and weight to maintain rigidity. The mill column does not have to move so it's easy to just add weight to stiffen it.
On a CNC router though, the gantry moves and the head must move both vertically and laterally. Just adding weight is not a solution for rigidity. Rigidity is mainly accomplished by limiting travel. Therefore, for a router the goal is to keep the Z height as LOW as feasible. The generally accepted router Z travel is 6 inches.