Copyright (C) 1986-2009 by Daniel H. Hudgins, All Rights Reserved.
No part of "This Web Site" (HTML document), including associated files, may be: distributed, sublicensed, transmitted, copied, archived, mirrored, modified, bundled, embedded, sold, given away, rented, loaned, or shared in any form without express written permission in a formal Vendor agreement contract dated and signed in ink obtained directly from Daniel H. Hudgins by registered postal mail. All agreements for permission to distribute expire after a period no greater than one year from the date of the signing of the agreement by Daniel H. Hudgins. See the current "EULA" for information regarding limited copying and storage for the purpose of "Beta Testing" "This Web Site."
To view or use the current version of this Web page you may need to reload or refresh the display of this page by your browser. Just clicking on the browser's [Reload] or [Refresh] icon may not be enough to insure that all of the page's most current contents have been cached and displayed. Some browsers may have additional commands to help display the page's most current contents such as: holding down the [Shift] key and clicking on the [Reload] icon, holding down the [Control] key and clicking on the [Refresh] icon, holding down the [Control] and [Shift] keys and clicking on the [Refresh] icon, pressing the [Control] and [F5] keys, pressing [Control] and the [R] key, or some other combination of keys or clicks. Check to see which commands your HTML browser uses to load the most current page contents into its cache and then to display them onto the screen.
This Web site is dedicated to the thousands of "users" of my programs, those who have helped test my programs over the last 23 or so years, and especially those who shared their experiences with me.
You must read this notice: This is a licensed Web site (HTML document and associated files). You must read and agree to be legally bound in contract by the Terms of Use and conditions given in the End User License Agreement ("EULA"), Legal Notices, Instructions, Warnings, Disclaimers, and all other text in "SECTION: 0" of "This Web Site" (HTML document and associated files) before reading or using any of the information, software programs, and or files, contained in, linked to, and or associated with, "This Web Site" (HTML document and associated files). Any use or "Beta Testing" of "This Web Site" constitutes your acknowledgment of your full agreement with the current End User License Agreement ("EULA") and your decision to have this current license supersede all prior and contemporaneous agreements and understandings. Information and files in "This Web Site" (HTML document and associated files) have been placed here so that long time users of "The Author's" programs DANCAD3D.COM (tm) , DANCAD87.EXE (tm), DANCINEL.EXE (tm), DANCINES.EXE (tm) , DANCAM.EXE (tm) , or DANPLOT.EXE (tm) could help proofread the text of the documentation files or screens displayed, and also help test data files, example files, and or any software programs that might be made available from time to time, to aid "The Author" in finding mistakes, bugs, and other errors, omissions, defects, mistakes, and faults. Everything in "This Web Site" (HTML document and associated files) is "Beta Test", "Beta Code", Experimental, Preliminary, requires proofreading, or is being evaluated for possible revision, and is NOT warranted to be free of defect. To help "The Author" report any bugs, foul-ups, defects, or mistakes that you find, see "SECTION: 8" for instructions. "This Web Site" (HTML document and associated files) and all other files and programs by Daniel H. Hudgins are made available "AS IS" without warranty of any kind express, expressed, or implied. All offers and specifications are subject to change or discontinuation without notice of any kind. Please look over "SECTION: 8" of "This Web Site" before contacting "The Author."
This documentation section has text mostly about DANCAM.EXE (tm) and DANPLOT.EXE (tm), my CAM programs, and might be looked to for information on some of the CAM program commands. See also the other documentation files, and pages in this Web site, for additional information. The disclaimer and most of the other legal text has been moved to SECTION: 0 , you must read the disclaimer, End User License Agreement (EULA), and other legal text, before you read any of the other documentation or use any part of this HTML document or associated files and programs. Be sure to read all the Warnings in SECTION: 3.2.10.0 , and the other documentation, before running, installing, testing, or using any of my programs, and especially before using DANCAM.EXE (tm) and DANPLOT.EXE (tm).
The text in this section was derived from the CAMPLOT.DOC file that was in the original v2.6 distribution, and has been updated somewhat so that some of the changes made in v2.7 are reflected. It may take me some time to get back to work some more on this section, but you can help proof-read what is here now. Some adjustment may be required for versions prior or subsequent to v2.72 since there are variations between versions and the various revisions of versions.
You may not distribute, sell, rent, share, or give away these HTML documentation files or printed copies of them. You may not extract text from these HTML documentation files for distribution, sale, rent, sharing, or giving away. You can use the [Print] option in your browser to make one copy for yourself to mark up in order to help me proofread the text for mistakes.
Documents may be available to download from time to time, you can check SECTION: 9 to see what the current situation with regard to downloadable files is. The names of these documentation files may change, and they may be edited, combined, or eliminated in the future, without notice.
You may need to adjust your browser for best viewing of the pre- formatted text by changing the "font" size using the commands in your browser (see the help in your browser, or use the pull-down menus in your HTML browser.) If some letters in words on the screen appear to be missing or scrambled try changing the font size in your browser as this sometimes happens even though the words are spelled correctly in the HTML code.
Use the "Edit, Find in page Ctrl+F" or "Edit, Find (in this page)... Ctrl+F" command in your browser to search for keywords within the documentation text in this HTML page. You will need to search over again in the other pages in this HTML document for the same keyword since your browser may not search for a keyword beyond the current page that is loaded.
Although stepper and servo motor driver modules are probably available from motor distributors all over the world, you may want to build your own in order to possibly save some money. Also you may find that no commercially available product meets your needs as well as a circuit you can easily modify and repair yourself.
If you are not experienced in the construction and trouble shooting of electronic logic and power circuits you might save money purchasing ready built circuits, since you will not save anything if you burn out quite a few parts and have a problem wiring up the circuits or making printed circuit boards. When calculating the cost of your circuits you should probably allow for 50% to 100%, or more, cost overrun to take care of the inevitable mishaps that come with any do-it-yourself project.
Steps to build you own motor driver circuits:
Determine the speed and power requirements of your machine. Try to establish a maximum feed rate for your machine that is as low as you can use in order to be able to use smaller motors with timing belt reduction to the lead screws. Using smaller motors will reduce noise and vibration, as well as require less expensive electronic drive circuits and power supplies.
Purchase new, surplus, or used motors with enough torque. When you pick out motors be aware of how many leads the motor has, since some motors are wired to be run on Uni-polar drivers which can restrict your choice of commercially available driver modules that you can pick from. Since low voltage motors with high current requirements can require more expensive drivers, using motors rated at medium voltage and less current might give the same torque and use a less expensive driver circuit.
Pick the appropriate driver circuit for the motors you purchased. Be sure that the driver you pick has some way of being adjusted to give the rated current that your motor uses. And also if you are using stepper motors the maximum operating voltage of a stepper motor driver should be 5 to 8 times the rated holding voltage for a stepper motor.
Buy the necessary parts to build the circuit. If you are building circuits from published plans it is probably a bad idea to try to "improve" the circuit by making component substitutions before you have completed one specimen of the circuit that works as it was designed. If you cannot find the parts listed, look for another source elsewhere.
Assemble the circuit. Do not build circuits that you do not understand, since you will not be able to proofread the plans to see if they contain mistakes.
Check the wiring to make sure you made no mistakes. Test for cold solder joints, and short circuits. If you are making printed circuit boards and using the dry toner transfer films, you will probably need to "touch up" the traces with at resist pen, and scrape off smudged toner that will make the traces too close together and cause arcing.
Test the motor driver circuit. You can use a normally closed, N.C., push button and a 2.2K ohm pull up resistor on the step pulse input, and a switch and a 2.2K ohm pull up resistor on the direction input. To de-bounce the inputs you may need to put a capacitor from the input to common, perhaps 0.1 mf to 10 mf or more. The N.C. push button and switch would go from the inputs to common. Each time you push the button the motor would make one step, and the switch would reverse the direction of the motor. If the capacitor on the step input does not fix the push button bounce problem you might try using two 7414 inverters in series before the step input, and a larger capacitor of about 100mf to 1000mf on the input of the 7414.
Hook-up the motor driver circuit to your parallel port. Be careful in hooking up your circuits to your parallel port, you do not want power from the circuits flowing into your parallel port and destroying your parallel port or computer's mother board. If you are nervous about making direct connections you might try using optical isolators, but with junk computers being so cheep, the cost of the isolators might be more than the shop computer is worth.
Use DANCAM.EXE (tm)'s and DANPLOT.EXE (tm)'s motor test utilities to configure your set up. Be sure that you test your motors after they are mounted in your machine since they may react differently when under full load. It is better to have your machine run slower and not lose position, than have your machine run fast and stall or make messed up reject parts. Be sure that you use the automatic self calibration command in v2.7 to calibrate the feed rates and timing to your computer's speed before you use any of the commands that move the motors using the feed rate control and such.
The ability to build, repair and modify a motor driver translator circuit module yourself, rather than just buy a ready made module, can save you money, but only if you can avoid wasting and burning out a lot of parts. Stepper motor translator driver module manufactures have taken to "potting" their modules in black plastic so that if anything goes wrong and a part burns out you are probably out the price of the whole unit.
The macro file BIPOLAR2.MAC which was supplied as part of the original v2.6 distribution, when run, made some schematics and printed circuit board foil pattern files for use in building a home made Bi-Polar stepper motor translator driver circuit board to automate a machine. The BIPOLAR2 circuit was intended only for use with and in the testing of my CAM programs by the individual hobbyist that built and set up his own personal automated machine. Some information about how the BIPOLAR2 circuit operated may still be found in SECTION: 5.40.10.0. There may be some other information about circuits you can build for use in connection with your "Beta Testing" in various sections of this Web site from time to time, I developed examples of several build it yourself circuits in the past, but do not know at this point when I might be able to find the free time to revise and rework a portion of that information for incorporation here. You may be able to find built it yourself circuit information on the Internet, in books at your local library, or in books you can purchase. In the U.S.A. if you go to your local library you can use something called the "Inter Library Loan" to obtain almost any book, so even if your library does not have the book you are looking for you may be able to get it for "free" on loan from another library.
Remember to double check any connections before you turn the power on. I assume that you have plenty of experience building electronic circuits and know all of the hazards and problems that can arise, if you have no such experience you would most likely do better to buy ready built modules. Making changes to the design of circuits probably would reduce their performance, or produce other problems including fire and damage to your computer.
A stepper motor translator driver module is an electronic device that goes between the parallel port of your computer and a stepper motor attached to your machine. When the computer sends step pulses to the stepper motor translator driver module it changes the way the module sends power to the stepper motor's coils in such a way that the stepper motor rotates at the same speed as the step pulses from the computer. When there are no step pulses coming from the computer the stepper motor translator driver module holds the stepper motor shaft in a fixed position, waiting for more step pulses. The direction the stepper motor will rotate when a step pulse is received by the stepper motor translator driver module is controlled by the direction signal from the computer's parallel port. The stepper motor translator driver module may have its own built in power supply and plug into a AC outlet, or it may require one or more external DC power supplies for its power source.
A stepper motor translator driver module circuit has two major parts. The first part is an up and down counter which keeps track of the commanded position for the stepper motor. The second part is the power amplifier section that switches power to the stepper motor's coils in correspondence to the state of the counter part of the circuit. Sometimes these two parts of the circuit are together in a single integrated circuit, sometimes they are in two integrated circuits, and sometimes they are built with more basic parts. An optional third part of the circuit is sometimes present to boost or regulate the current flowing through the amplifier section according to the rate of step pulses coming into the counter section of the circuit, in order to improve the stepper motor's torque at higher rotational speeds.
Servo motors cannot be operated by Stepper motor driver circuits normally, but they operate on a similar principle with the exception that there are two counters in the servo circuit, one counter for the step pulses from the computer, another counter for the pulses from the rotational encoder that senses rotation of the servo motor shaft. The difference between the two counters in a servo circuit, i.e. the error value, is used to control the power from the amplifier section of the servo circuit, i.e. the greater the error the grater the power, the sign of the error value becomes the polarity of the power.
Servo circuits are called closed loop because the position error is used to correct the servo motor shaft's position. Stepper motors typically are operated open loop and are just expected to follow the signals from the computer without corrections being made. Sometimes stepper motors are fitted with shaft encoders and wired to a circuit that tries to correct for lost steps by creating step pulses from within the stepper motor driver circuit. Once the stepper motor has lost steps the work-piece has probably been damaged, so it may be better to just operate stepper motors open loop more slowly so that they do not lose steps in the first place and therefore do not need any such servo like correction.
The stepper motor translator driver module takes the step and direction signals from the parallel port and switches the coils in the stepper motor on and off (or positive and negative) to make the stepper motor turn. The translator is really a counter that counts the pulses from the parallel port. When the direction pin is low (D < 0.3 volts) the counter counts up, i.e. 1- 2-3-4-1-2-3-4 and so on, and when the direction pin is high (D > 2.8 volts) the counter counts down, i.e. 1-4-3-2-1-4-3-2. Counting up turns the stepper motor clockwise, counting down makes the stepper motor turn counter clockwise. The actual rotation direction of the stepper motor can sometimes be reversed by how the stepper motor coil wires are hooked up to the stepper motor driver module.
To reduce the step angle of the stepper motor shaft from 90 degrees to 1.8 degrees most stepper motors have 50 grooves cut in the surface of the rotor. By also grooving the poles of the four coils the stepper motor will give 200 steps per revolution, i.e. every fourth step moves one groove width because the grooves on the successive poles are 1/4 of 50 parts per revolution advanced. So step 1's pole is 0/200 advanced, step 2's pole is 1/200 advanced, step 3's pole is 2/200 advanced, and step 4's pole is 3/200 advanced (step 5 lines up at pole 1 again but with the rotor one groove ahead.)
There are generally two ways, for Uni-polar drive, that you can make a stepper motor advance a "full" step. You can sequence the four stepper motor windings on and off one at a time, i.e. 1-2-3-4 or you can sequence two of the four windings on and off at a time, i.e. 1&2-2&3-3&4-4&1.
-------------------------------------------------- | UNI-POLAR ONE COIL ON FULL STEP MODE SEQUENCE | -------------------------------------------------- | STEP COUNT | COIL 1 | COIL 2 | COIL 3 | COIL 4 | -------------------------------------------------- | 1 | ON | OFF | OFF | OFF | -------------------------------------------------- | 2 | OFF | ON | OFF | OFF | -------------------------------------------------- | 3 | OFF | OFF | ON | OFF | -------------------------------------------------- | 4 | OFF | OFF | OFF | ON | -------------------------------------------------- | (5) | ON | OFF | OFF | OFF | --------------------------------------------------
When you sequence the coils using the "two windings on" method you might get more torque and fewer lost steps, but at the expense of needing more current from the stepper motor power supply.
-------------------------------------------------- | UNI-POLAR TWO COIL ON FULL STEP MODE SEQUENCE | -------------------------------------------------- | STEP COUNT | COIL 1 | COIL 2 | COIL 3 | COIL 4 | -------------------------------------------------- | 1 | ON | ON | OFF | OFF | -------------------------------------------------- | 2 | OFF | ON | ON | OFF | -------------------------------------------------- | 3 | OFF | OFF | ON | ON | -------------------------------------------------- | 4 | ON | OFF | OFF | ON | -------------------------------------------------- | (5) | ON | ON | OFF | OFF | --------------------------------------------------
Stepper motors that have only two coils need to be operated by power that reverses polarity in order to get the four distinct states that move the stepper motor rotor through the step cycle. Stepper motors require at least a three step cycle to operate in both directions so that there is not ambiguity about which way the stepper motor should turn, but for practical reasons of the stepper motor construction and the construction of the stepper motor driver circuits four state stepper motors are the typical construction, sometimes referred to as two phase or four phase stepper motors. Three or five phase stepper motors are possible, but not as common.
------------------------------------------------- | BI-POLAR TWO COIL ON FULL STEP MODE SEQUENCE | ------------------------------------------------- | STEP COUNT | COIL 1 | COIL 2 | ------------------------------------------------- | 1 | POSITIVE | POSITIVE | ------------------------------------------------- | 2 | NEGATIVE | POSITIVE | ------------------------------------------------- | 3 | NEGATIVE | NEGATIVE | ------------------------------------------------- | 4 | POSITIVE | NEGATIVE | ------------------------------------------------- | (5) | POSITIVE | POSITIVE | -------------------------------------------------
Since all of the coils in the stepper motor are used in the Bi- polar full step sequence you may get more torque from any given size of stepper motor by using Bi-polar stepper motor driver modules with two phase stepper motors, than you would using Uni- polar drive with four phase stepper motors, particularly contrasted to the one coil on at time Uni-polar driver type.
If you alternate between the one coil on and two coil on full step modes you can make the stepper motor half step and get twice the number of steps per revolution, e.g. 400 half steps in place of 200 full steps. Half stepping gives about as much torque as the one coil on full step mode, i.e. less torque than two coil on full step mode. Although you might measure the same mechanical torque while half stepping as you get with the two coil on full step mode, this can be inaccurate since in order to obtain positional accuracy of better than +/-0.45 degrees of deflection of the stepper motor shaft, the load on the stepper motor needs to be less during the times while half stepping when only one coil is on as compared to when two coils are on. The counting 8 step sequence for half stepping goes like this: 1-1&2-2-2&3-3- 3&4-4-4&1.
-------------------------------------------------- | UNI-POLAR HALF STEP MODE SEQUENCE | -------------------------------------------------- | STEP COUNT | COIL 1 | COIL 2 | COIL 3 | COIL 4 | -------------------------------------------------- | 1 | ON | OFF | OFF | OFF | -------------------------------------------------- | 2 | ON | ON | OFF | OFF | -------------------------------------------------- | 3 | OFF | ON | OFF | OFF | -------------------------------------------------- | 4 | OFF | ON | ON | OFF | -------------------------------------------------- | 5 | OFF | OFF | ON | OFF | -------------------------------------------------- | 6 | OFF | OFF | ON | ON | -------------------------------------------------- | 7 | OFF | OFF | OFF | ON | -------------------------------------------------- | 8 | ON | OFF | OFF | ON | -------------------------------------------------- | (9) | ON | OFF | OFF | OFF | --------------------------------------------------
In addition to almost doubling the positional accuracy, half stepping the stepper motors may reduce noise and vibration somewhat.
Micro stepping stepper motor translator driver circuit modules carry the idea of half stepping further by supplying varying amounts of power to the stepper motor's coils so that the stepper motor's shaft will move to points in between where it can move with the power to the coils just being switched on and off. Because the Micro stepping produces an almost sine wave like change in the power to the stepper motors coils the motion of the stepper motor's shaft can be smoother and the surface finish on the parts made possibly better. Because the stepper motor shaft deflects off of the commanded position somewhat under load and when direction is reversed, Micro stepping does not increase the positional accuracy much beyond what you would get by half stepping in an open loop operation, or at high speeds. Closed loop micro stepping can be a form of servo control, using a stepper motor rather than a DC motor as a servo motor, but even in closed loop operation there is a limit to how stiff you can adjust the servo loop without the stepper motor going into oscillation, the stepper motor shaft needs to give some when pushed and pulled on to be stable in closed loop operation.
When configuring the CAM programs for use with micro stepper driver's you would need to enter the stepper motor's mechanical full steps times the number of micro steps per full step, for example if your stepper motor gives 200 full steps and your micro stepper driver is set to give 16 micro steps per full step then you would use 3200 steps per revolution to figure the values to enter into the CAM program's configuration prompts.
The step pulse counter portion of the stepper translator module needs to connect to two or more power amplifiers to supply the current to the stepper motor's windings or coils. Generally there are two types of amplifiers that have been used to drive stepper motors, Uni-polar with two states, i.e. on and off, and Bi-polar with two or three states putting out positive then negative power, and sometimes being off as well.
In micro stepping in between states are also employed, i.e. partial power, so the amplifiers used in micro stepping can be more expensive than the simple just switching amplifiers used in full and half stepping.
A Uni-polar amplifier will supply the stepper motor's coils with positive current when the coil is to be on, or a high impedance open circuit when the stepper motor coil is off. Since the stepper motor's coils that are off will "pick up" the generated power from the rotors movement the Uni-polar amplifier must divert the stray power from the stepper motor's off winding coils without reducing the impedance to a level which would act as a brake on the stepper motor and prevent the stepper motor from running at high RPM. Uni-polar amplifiers might be the simplest to build and operate from a single positive power supply.
Bi-polar amplifiers may generate more torque from the stepper motors by applying both positive pulling power and negative pushing power to the stepper motor windings. Bi-polar amplifiers might require more transistors than Uni-polar amplifiers, but since transistors are less expensive now, many commercially built drivers now use Bi-polar drive circuits in order to get good torque from the stepper motors.
Bi-polar amplifiers usually use what is known as an "H bridge" where four power transistors or power FETs are used for each of the two stepper motor coils. H bridge amplifiers generally require the use of 4, 6, or 8 lead stepper motors, and cannot be used with 3 lead two phase or 5 lead four phase stepper motors since they have the coils connected together internally. The advantage of H bridge amplifiers is that negative and positive power can be supplied to the stepper motor's coils just by using a single positive power supply. The negative power for the stepper motor's coils is obtained by the H bridge in essence exchanging the leads of the stepper motor's coils to have the power flow backwards through the coil.
I designed a circuit called BIPOLAR2 for v2.6 that used just two output power Darlington transistors for driving each of the two stepper motor coils and was compatible with 3, 4, 5, 6, or 8 lead two or four coil stepper motors while supplying the stepper motor's coils with Bi-polar power. This was possible because the circuit used a split power supply to obtain both negative and positive power for the stepper motors coils. Actually I wired the split power supply as positive and twice as positive so that the normal negative terminal of the split power supply could be connected to the signal common, this further required the stepper motor's common to be floated at positive power all the time. A split power supply requires another filter capacitor, so there is a cost trade off between the need for fewer transistors in the amplifier and the need for another capacitor in the power supply. As was mentioned above there may be some information about the BIPOLAR2 circuit in SECTION: 5.40.10.0. The chief advantage of my amplifier circuit over commercial circuits using H bridges was that my circuit would drive low cost 72 RPM synchronous motors as high torque stepper motors. The 72 RPM synchronous motors are getting harder to find on the surplus market, but you see them from time to time, and although the speed performance was not fantastic they did offer high torque at low cost for hobby type projects operated from my CAM programs.
If you operate a stepper motor at its rated holding voltage all the time the torque will decrease as the stepper motor turns faster, so that obtaining speeds much faster than 60 RPM would be impractical. In order to improve the speed that stepper motors can be operated at various improvements to the electronic drive circuits have been developed. In general these improvements all use various techniques to supply the stepper motor with increased voltage when running quickly. The degree of improvement can be in increase of the useful speed of the stepper motor by two to four times what you would get just operating the stepper motor at its safe stopped holding voltage. Attempts to boost stepper motors to higher speeds will probably result in undependable performance in the real world. There are a variety of circuits from different makers to operate stepper motors, some of which are quite expensive. Generally the cost of the driver circuits goes up quite a bit in order to get the stepper motors reliable pull-in speed much above four times maximum useful pull-in speed at the holding voltage, and even if you coax the stepper motor into the six to eight times speed range it may not be very reliable at those speeds. Rather than purchasing an expensive driver circuit to "goose" your stepper motor into unreliable performance, using a less expensive simpler circuit and running your machine at a conservative speed might make more sense. Otherwise try using servo motors if you need greater speed for some reason.
Because the stepper motor's windings are a coil around an iron core, i.e. an inductor, the current moving through the coil decreases as the frequency, i.e. speed, of the stepper motor steps increases when a constant voltage source is used. Because the torque is roughly proportional to the current, i.e. amperes, going through the stepper motor coils you will want to have the voltage supplied to the stepper motor increase as the stepper motor step frequency increases in order to hold the stepper motor coil current constant. You can use Ohm's law, E/(I*R), to see how raising the voltage effects the current when the impedance of the coil is changed. If you used a raised the voltage going to the stepper motor's coils all the time the stepper motor would burn up when it slowed down or stopped. The solution to getting fairly constant coil current over the full range of speeds from stopped to maximum speed is to put a resistor in series with the stepper motor coil such that the resistor limits the current when the stepper motor is stopped to the stepper motor's rated current, but lets you use a higher supply voltage, e.g. about 6 times the stepper motors rated voltage, so that the stepper motor will get more voltage when the stepper motor steps quickly.
The reason the resistor gimmick works is that the resistor and the stepper motor coil form a voltage divider. When the translator amplifier switches the power on to a coil (or reverses polarity) the inductance of the coil is very high, so no mater how big the series resistor is, (nearly) all the voltage is dropped across the stepper motor's coil. As time goes on (about a hundredth of a second) the impedance (resistance) of the coil drops and more, and more, of the voltage is dropped across the resistor. After about a tenth of a second the impedance of the coil stabilizes and the coil acts like a resistor in series with the series resistor dividing the voltage to the value required for the stepper motor's holding torque current rating.
Even with the series resistor on the stepper motors coils the stepper motor's torque will fall off as the stepper motor turns faster. To get the torque curve flatter into the higher speeds you can put a capacitor across the series resistor. The capacitor acts as to lower the resistance of the series resistor briefly after each stepper motor step, and thereby boosts the stepper motor current briefly to help push the stepper motor's rotor on to the next step position more quickly. A curve of such an application of using a capacitor to boost the high speed torque of a stepper motor is shown in SECTION: 5.40.70.1. For Uni-polar drivers normal electrolytic capacitors can be used with the polarity orientated properly. For Bi-polar applications special non-polar electrolytic capacitors would generally need to be used. The use of blocking diodes and how the dampening of the high impedance of open coils is arranged will effect the degree of improvement that you get from using capacitors. For Uni-polar drivers it will generally be best to use four resistors and capacitors, even though the more commonly used connection might only use just two resistors.
To improve the high speed torque further in my BIPOLAR2 circuit board I had some Darlington transistors arranged in parallel to the current limiting resistors that "short circuit" the stepper motor current limiting resistors for about a thousandth of a second each time the polarity of the power through the resistors reverses. The value of the capacitors between the collector and base of those booster Darlington transistors controlled how long the "short circuit" lasted.
To calculate the value of the power resistors to use in series with the stepper motor's winding coil, to limit the current through the coil, you can use this equation:
Ro = ((Vs - Vd) - Vm) / Im
WHERE: Ro = Series resistor value in ohms.
Vs = Stepper motor coil supply voltage, larger than Vd + Vm.
Vd = Voltage drop from transistor & diode, about 1 to 2 volt.
Vm = Rated voltage for stepper motor when stopped.
Im = Rated current (amperes) for stepper motor when stopped.
To calculate the wattage rating required for the series resistor use the following equation:
Rw = ((Vs - Vd) - Vm) * Im
WHERE: Rw = Series resistor value in watts.
Vs = Stepper motor coil supply voltage larger than Vd + Vm.
Vd = Voltage drop from transistor & diode, about 1 to 2 volt.
Vm = Rated voltage for stepper motor when stopped.
Im = Rated current (amperes) for stepper motor when stopped.
In practice Vs will be about six times the stepper motors rated holding voltage. Vd would only be significant when Vs is less than about 20 volts. The stepper motor and series resistors get hottest when the stepper motor is stopped.
An example may help you work out the values for the resistors that go with your stepper motors. Assume we have a stepper motor rated at 9.6 volts and 2.1 amperes. You are going to use a supply voltage of +/-22 volts, and your translator power amplifier circuit drops 1.4 volts in its semiconductors.
EXAMPLE: Ro = ((22 - 1.4) - 9.6) / 2.1
Ro = (20.6 - 9.6) / 2.1
Ro = 11 / 2.1
Ro = 5.25 ohms
Rw = ((22 -1.4) -9.6) * 2.1
Rw = (20.6 - 9.6) * 2.1
Rw = 11 * 2.1
Rw = 25 watts
Commercially built stepper motor driver modules use various methods of switching the power on and off very quickly, e.g. 20KHz, to avoid the use or power resistors. These kind of drives are sometimes called "chopper driver." Switching the power on and off in this way can make the stepper motors and driver circuits get quite hot. Switching the power on and off reduces the stepper motor current because the load is an inductor, but since the voltage is raised, the current passing thorough the stepper motor stays relatively constant no mater what speed the stepper motor is turning at, i.e. the chopping frequency used is higher than the stepping frequency. In practice the power's chopping should be stopped and the power held on for about one thousandth of a second immediately after each step pulse so that the stepper motor's rotor will get a strong tug, then the power should go back to chopping so that the current does not continue to build up to damaging amounts.
Another older method of replacing the current limiting resistors is to use two power supplies, one adjusted for the holding voltage, and another adjusted for the rated current at a higher speed where the holding voltage begins to not deliver enough residual torque to keep the stepper motor able to run. After each step pulse the higher voltage supply is switched on briefly, then the voltage is returned to the holding voltage. So the faster the step pulses are being received by the driver, the greater proportion of the time the higher voltage supply is used. This method is sometimes called a Bi-level constant current driver. The higher voltage source might be three to ten times the voltage of the lower voltage source.
Some older methods of regulating the current to the stepper motors involved adjusting the power supply in proportion to the rate of the step pulses received. This is not such a good idea, since the power supply would take a long time to respond to fluctuations in the step pulse rate. It is generally better to pulse high voltage briefly to the stepper motor upon each and every step pulse, rather than supplying the stepper motor with the average voltage required over a sample period. When the stepper motor is pulsed with high voltage it can start rapidly and stop rapidly, where as if the available voltage starts low and increases slowly the stepper motor would need to start slowly and speed up slowly, and even then there might not be enough voltage to correct for sudden fluctuations in the spacing of the step pulses. If you are using some used equipment that uses the power supply adjustment method of constant current regulation, you might want to re-design the circuit to use Bi-level or chopper principles.
To assemble printed circuit boards use a low wattage, e.g. 27 to 30 Watt, pencil type soldering iron, and rosin core tin and lead alloy solder to make the connections.
To transfer the foil pattern for the circuit traces to a blank copper clad circuit board, you can use a laser printer, or copy machine, to print the pattern onto the special dry transfer materials now available. Then iron the toner from the transfer material to the board, and etch and drill in the usual way. The toner transfer material may not do a good job of transferring the toner, so you may have to go over the traces with a etch resist marking pen, and scrape toner away from between the traces and pads so that when the board is etched you do not get open traces, or traces and pads that are too close together and will short out or arc over.
View the C0100100.RM video clip, Making a PCB using toner transfer film and DANCAD3D (tm) in SECTION: 4.0.0.0 for in illustration of how to make a printed circuit board yourself. See also SECTION: 9.21.0.0 for any PCB symbols that you can use in my CAD programs to prepare PCB foil patterns.
The Outline command in my CAD program's Hardcopy sub- menus might be used to generate PCB foil trace outlines for making PCB boards through milling the foil off of the board. This is something you might want to try after you get your first machine operating, by having made the PCB boards for your first machine using the traditional PCB etching method. The Outline command and the Files Load Industry BMP commands have a provision for compensating for the radius of the cutting tool so that the traces are not reduced in width by half the thickness of the cutter used.
Various stepper motor companies use different lead colors or different connections for the same lead colors, so you will need to use a VOM to figure out which leads connect to a common coil, which leads are a center tap, which leads are the free ends of the stepper motor's coils, and which leads make up just one single coil. Even if the colors match what is given here you should check the resistance of each coil to make sure that the coils all have the same resistance, and that you have not gotten one of the coil center taps mixed up with the free ends of the coils, which might result in burning out the (half) coil by putting too much current through the (half) coil.
If your motor has center tapped coils, make sure that you know if your stepper motor's rated voltage is for the whole coil, or half of the coil. If you apply the whole coil voltage to the half coil you will probably burn out your stepper motor. This can get confusing in 8 lead stepper motors because the coils might be connected in series or parallel to get different ratings.
Three, four, five, six, and eight lead or terminal two or four coil stepper motors might be connected as follows below. Sometimes you will make the connections to the stepper motor by leaving some of the stepper motor's terminals or leads unconnected.
To make hooking up the stepper motors easier I use the same color codes for wiring up all of my stepper motors, this requires six colors of wire: red, pink or white with a red stripe, green, light green or white with a green stripe, white, and black. Unfortunately some stepper motor manufactures use other colors of wire on their stepper motors, or have just terminals marked with numbers, so to avoid confusion you can solder wires onto your motors by using the "standard" six colors and be less confused when you need to change things and reconnect the motors years from now.
Four lead stepper motors have two coils, one coil should be wired with "Red" and "Red & White" wires to its leads or terminals, and the other coil should be wired with "Green" and "Green & White" wires to its leads or terminals.
Since four lead stepper motors have just two coils all of the stepper motors leads are connected to a Bi-polar stepper motor driver circuit module. Four lead stepper motors cannot be operated by using a Uni-polar stepper motor driver circuit.
Red wire = Start of coil 1. Red and White wire = Other end of coil 1. Green wire = Start of coil 2. Green and White wire = Other end of coil 2.
Most commercially available stepper drivers will not operate three lead stepper motors. I specially developed my BIPOLAR2 circuit to drive the three lead 72 RPM "synchronous" motors as stepper motors, since when v2.6 was under development you could get a 750 in/oz three lead 72 RPM synchronous motor for less that $30. Over the last few years these surplus motors have gotten harder to find, but if you find some they are often the cheapest high torque "stepper" you can find. Be sure to figure the voltage and current limiting resistors carefully since 72 RPM synchronous motors are rated for AC voltage and not DC voltage!
With the 72 RPM synchronous motors being rated at 120 VAC, you will probably find that about 15 to 20 VDC will give the rated current when the motor is not turning, but be sure and carefully measure coil current since these motors may overheat and burn out if you meet or exceed their rated current.
Three lead 72 RPM motors have the two coils connected together at one end, so they are like a four lead motor with one end of each of the two coils connected internally to a single lead, therefore when you check the motor's three leads with a VOM it looks like the motor that has one center tapped coil.
To find the center tap of the motor connect the black lead of your VOM to one of the three terminals of the motor. Put the VOM on Rx1 scale, and measure the resistance to the other two motor terminals. If you get the same resistance, say about 20 ohms, to both of the other terminals then the black lead should be on the center tap, but if your read 20 ohms on one terminal and 40 ohms on the other terminal, then the black VOM lead is not on the center tap (common) terminal of the motor. Your motor will give different resistance values, but the idea is that two coils in series will read twice the resistance that one coil will read. When you find the lead that is the center tap lead or terminal, mark the other two leads "Red" and "Green" or use red and green wire to connect to the motor's terminals, the center tap can be wired with white wire.
Red wire = Red lead on 72 RPM sync motor (free end of coil 1.) White wire = White lead (center tap, i.e. other end of coils 1 & 2.) Green wire = Black lead on 72 RPM sync motor (free end of coil 2.)
If the 72 RPM sync motor has a fourth green lead, that may just be a ground wire, you can use your VOM to measure from the green lead wire to the motor case and see if there is a connection. You may need to scrape some of the paint off to get a good contact with the motor's case.
Five lead stepper motors are normally operated from Uni- polar stepper motor driver circuit modules since all four of the coils inside the motor are connected in common to the fifth lead.
When five lead stepper motors where used with my BIPOLAR2 circuit the Green & White, and Red & White leads where not connected.
The procedure to figure out which motor terminal or lead is the common for all the coils is the same as was mentioned above for the three lead motor, pick one terminal or lead for the VOM black lead, then measure the resistance to the other four motor terminals or leads with the VOM red lead, the black VOM lead is on the coil common when the resistance measured to the other four terminals is the same, i.e. if you measure 8 ohms to all four of the other terminals you have found the common, but if you measure 8 ohms to one terminal and 16 ohms to the other three then you have not found the common. Your motor will give different resistance values, but the idea is that two coils in series will read twice the resistance that you measure for one coil.
Red wire = Start of coil 1. Red and White wire = Other end of coil 1. White wire = Center tap for coil 1 and coil 2 Green wire = Start of coil 2. Green and White wire = Other end of coil 2.
Six lead stepper motors can be operated from Uni-polar or Bi-polar stepper motor driver circuits. Six lead stepper motors have two center tapped coils.
Six lead stepper motors might be operated in half coil mode when used with Bi-polar driver circuits, i.e. red to black for one coil and green to white for the other coil. The torque produced, maximum RPM for a given supply voltage, and the current consumed change when the stepper motor is operated using half or the full coil.
Red wire = Start of coil 1. Red and White wire = Other end of coil 1. Black wire = Center tap for coil 1. Green wire = Start of coil 2. Green and White wire = Other end of coil 2. White wire = Center tap for coil 2
Six lead motors have two separate center tapped coils, referred to here as the "red" and "green" coils. The red coil has three lead wires, the red for one end, black for the red coil center tap, and pink or red and white striped for the other end of the red coil. Likewise the green coil has a green lead wire for the end of the green coil, a white lead wire for the center tap of the green coil, and a light green or green and white stripped lead wire for the other end of the green coil.
To figure out which terminal or lead is which on a six lead stepper motor using a VOM, put the black VOM lead on one of the six motor terminals, measure to the other five motor terminals, three of the terminals will read more than 1M ohm or more, they are the other coil's terminals. Of the remaining two terminals you will read either the same resistance, perhaps 12 ohms, or you will read 12 ohms and 24 ohms, if you read 12 ohms to the two terminals the black lead of your VOM is on one of the center tap terminals, if not move the black VOM lead to the terminal that you measured 12 ohms (not the 24 ohm one) to and check that terminal is now the center tap terminal. Then do the same thing for the three terminals for the other coil to find the center tap, the other coil was the one you measured 1M ohm or more to its three terminals before, i.e. move the black VOM lead to one of those three terminals and measure as before. Your motor will give different resistance values, but the idea is that two coils in series will read twice the resistance of one coil, and no connection will read high resistance.
Eight lead stepper motors can be driven by Bi-polar or Uni-polar stepper driver module circuits. When using Bi- polar stepper driver module circuits with eight lead stepper motors you can connect the four coils in different ways to alter the stepper motor's performance and power requirements.
Eight lead stepper motors can be hooked up with the coils hooked up in parallel or series, you will need to look at the manufactures drawings and figure out the voltage and current for different connections. Parallel connection of the coils draws two times the current of series connection, e.g. if each coil draws 2 amperes then two coils in parallel will pass double the current, 4 amperes, where as series connection of the coils will add the resistance of the coils, so the voltage will need to be doubled and the current will stay 2 amperes.
The motors rated voltage for one coil is the same for two coils in parallel, e.g. if one coil is rated for 3 volts then two coils in parallel will also be supplied with 3 volts, but if you wire the coils in series then you would need to increase the voltage across the total of both coils to 6 volts. If you do not double the voltage for series connection the current across each coil would not be enough for the motor to operate properly.
In this example parallel wiring would use 12 watts, single coil would use 6 watts, or series wiring would use 12 watts. The current for the whole motor would be twice this current because two coils or two pairs of coils are used. If your driver cannot work with the amount of current needed for parallel connection, you can try one coil or series connection. For a given supply voltage you may get more speed using one coil rather than series connection because the "over voltage" will be greater. Series connection may give more torque than one coil, but with a lower maximum speed. Parallel should give good speed and torque, but might require more current than your driver can supply.
If you use one coil connection with Bi-polar drive four of the motor terminals or leads would be left unconnected. If you use series or parallel connection all of the stepper motor terminals or leads would be used, but in different arrangements.
Used, unmarked, and surplus stepper motors can sometimes be Found for prices much less than new motors. Since stepper motors do not have brushes or contacts they frequently "out live" the machine they were installed in. One failure mode is for the bearings to get sloppy with wear, making the rotor rub, and the motor to stall. Sometimes the rotor can lose its magnetism, particularly if the driver shorted out and too much current got to the coils.
Some stepper motor manufactures sometimes print the holding torque, holding voltage, and holding current on a label on the stepper motor. The ampere current is normally for one of the two coils, but some manufactures might give the rating for the total which could be confusing. If the ampere current rating is for one coil the motor will use twice as much current, but when you are testing the motor current with your VOM meter in series with one coil you will adjust for the rated current for one coil. Your VOM may not read quite right when adjusting "chopper" drives since the voltage is high frequency and the mechanical meter is an inductor. If you have no specifications for your stepper motor, and there is no label on it to help you figure out its ratings, you may have to test the motor yourself. You should never just hook-up a stepper motor to your driver without knowing the motor's specifications since you may burn out the motor, and or your driver, or get poor results and low speed because the supply "over voltage" is not correct for the motor.
The three lead 72 RPM sync motors are usually labeled for being run off of AC line current by use of a phase shift component on one of the two coils. The DC holding voltage for use of the 72 RPM sync motor as a stepper motor will probably be about one sixth the rated AC voltage, but you will need to increase the DC voltage slowly over many hours from zero volts and test the motor to find the correct value for the DC rating. In the U.S.A. if you run a 200 step per revolution stepper motor off of 60 Hz AC power by using an appropriate phase splitting power supply the stepper motor will run at a speed of 72 RPM. In Europe and other places with 50 Hz AC power a 200 step per revolution stepper motor run off of 50 Hz AC power by using an appropriate phase splitting power supply it will run at a speed of 60 RPM. So 72 RPM sync motors would probably be marked 60 RPM in Europe. The equations are: ( (60 Hz * 4 steps per Hz) / (200 steps per revolution) ) * (60 seconds per minute) = 72 RPM or ( (50 Hz * 4 steps per Hz) / (200 steps per revolution) ) * (60 seconds per minute) = 60 RPM.
When you are shopping for used or surplus stepper motors you can generally tell if you have found a stepper motor by rotating the motor's shaft and feeling the 50 detentes or "bumps" that the motor shaft wants to stop at. The holding torque of stepper motors is sometimes very weak when they are not powered, but because the rotor is magnetized in many common kinds of stepper motors you may be able to feel the alignment of the rotor groves with the stator groves. On some stepper motors you cannot feel the magnetic detente when the motor is not powered, but I do not recommend putting a flashlight cell across leads of one of the stepper motor's coils since you might damage the motor. Other ways to tell if you have found a stepper motor are to look for the number of leads or terminals i.e. motors with eight different colored wires coming out and no encoder on the motor would be a sign that you have found a stepper motor, the shape of the motor and the location of the mounting flange and screw holes, the absence of motor brush caps or air vents i.e. since stepper motors do not usually have brushes or air vents with a fan like AC motors sometimes do, the motor's paint color i.e. since stepper motor manufactures tend to have a company color they paint their stepper motors with, the name of the manufacture i.e. are they a company that makes stepper motors, and any labels i.e. since stepper motors tend to have odd voltage and current ratings like 3.4 volts DC at 2.1 amperes and such. After you get more familiar with what stepper motors look like you should be able to spot them in a pile of junk at a swap meet or surplus store and such.
If you do not know the stepper motor's rated current or voltage you can figure them out by experiment. For testing medium size stepper motors use a power supply of about 24 volts at 20 amperes. Connect one, or two, of the motor coils in series with a adjustable large power resistor, about 200 ohms at 150 watts, to the power supply. For very large or very small motors you may need to use smaller or larger value adjustable resistors. Start testing with the adjustable resistor at its maximum resistance value. Turn on the power and try turning the motor shaft. If the shaft is somewhat hard to turn leave the series resistance at its current value, otherwise reduce the resistance until you have some difficulty turning the motor shaft with your work gloved fingers. Put some small wooden blocks on the jaws of locking pliers (e.g. Vice-Grips (tm)) and lock the pliers on the motor shaft. Use a spring type fish scale (the kind that has a hook on one end to weigh a fish you have caught) to pull on the end of the locking pliers (with the motor shaft pointing up and the fish scale gong away from you) to measure the torque required to turn the motor shaft. With the stepper motor's coil(s) on the motor shaft will "lock" in position, it will only turn when you apply a force that exceeds the motor's holding torque. You will pull on the fish scale, and not the locking pliers, because you want the fish scale to read the amount of force you are applying. With larger motors you may need to extend the length of the locking pliers with a piece of tubing or such, in order to reduce the force you will need to apply, and the opposite with smaller motors. The weight you measure when the motor shaft begins to move, and the distance that the scale is hooked on from the center of the motor shaft give you the motors holding torque. For instance if, you measure 0.5 pound at a distance of 6 inches from the shaft center, the motor torque at the applied current is: (0.5*16)*6=48 oz-in. You will know that you have pulled hard enough on the fish scale when the motor "pops" from one step locus to another, so be careful because everything will jump and shake when the stepper motor shaft moves. It is obvious that the motor will need to be fastened to a table or some other fixed object.
When testing stepper motors you may need to apply power to both coils at the same time to read the right amount of torque, since only having one coil on will give less torque than you will get when the motor is connected to a driver that applies power to two coils all the time. If you get less torque with two coils on, you probably connected the wrong two coils, or have one coil wired backwards, try another pair and see if the torque increases to more than what you get with one coil.
You can estimate the amount of holding torque a given motor was meant to produce from the shaft size:
------------------------------------------------- | SHAFT SIZE | ESTIMATED HOLDING TORQUE | |----------------|------------------------------| | 0.1250" | 2 - 6 oz-in | | 0.1875" 6 - 16 oz-in | | 0.2500" | 16 - 40 oz-in | | 0.3750" | 40 - 150 oz-in | | 0.5000" | 150 - 375 oz-in | | 0.6250" | 375 - 750 oz-in | | 0.7500" | 750 - 1200 oz-in | -------------------------------------------------
If you seem to be getting about half of the lower expected torque value leave the series resistance where you have it, otherwise decrease the series resistance somewhat and re-measure the holding torque. When you get the holding torque up to half the expected value leave the motor on for a while and monitor the stepper motor's case temperature. The stepper motor should get hot only after it has been on for two hours. If the case temperature gets over about 55C (about 130F), or you smell the motor burning inside, turn off the power and increase the series resistance. If the motor does not get hot after being on for two hours decrease the series resistance and monitor the temperature rise. You may need to have two coils on to read the temperature properly.
Once you find the resistance that lets the motor rise to about 55C (about 130F) and level off at that temperature you can re- measure the motor torque, and also measure the voltage being applied to the motor. Use a VOM meter to measure the voltage across (in parallel to) the motor leads of the coil you have energized. By using ohms law, E/R=I, you can figure the motor coil current by dividing the voltage on the coil by the resistance of the coil (measure the resistance, of the coil, with the coil disconnected!) You can also measure the current directly if your meter has a 10 ampere, or more, scale, and you place the meter in series with the motor coil and resistor, and then turn the power on and read the current being used.
Another method is to use an unregulated linear isolated power supply and a variable auto-transformer. Connect the isolated output of the power supply across the motor coil or pair of coils. Start with the voltage at 0, and very slowly increase the voltage while measuring the holding torque. When you get to half the lower number for the holding torque listed for your size motor shaft, stop increasing the voltage and let the motor sit for about 5 minutes, then check the case temperature of the motor. If the motor is not warm at all yet, let it sit for 15 minutes and check it again and again from time to time to see if it is getting hot. If the motor gets hot reduce the voltage slightly, if the motor gets very hot turn the power off and start over with a lower voltage. If the motor is not warm after 60 minutes, turn the voltage slowly up a little at a time, perhaps 0.1 volt per hour, checking frequently that the motor is not getting warm yet. Do not rush turning the voltage up, since if you turn it up too fast you will burn out the winding before the motor case has time to report that the motor is getting too much voltage by the case temperature getting hot. When you get near the right voltage you will feel the motor is fairly warm to touch, but not so hot that you cannot keep your hand on it without getting burned or feeling discomfort. It will take an hour or more for the motor temperature to level off, so do not leave the motor unattended, or it may catch on fire while you are out of the room. If you smell smoke, burning plastic, or hot insulation or such turn the power off! After you get the motor temperature stable you can re-test the motor torque, and measure the motor coil current and voltage, these three numbers, holding torque, holding current, and holding voltage should be close to the motor's original ratings. The holding current tells you how powerful a driver you need, and you multiply the holding voltage by 5 to 8 to get the supply and driver voltage rating required for good speed. For example if you measure a holding current of 0.65 amperes and a holding voltage of 4.2 volts you would need drivers rated at about 1 ampere per coil and 35 volts, and about a 35 volt 8 ampere power supply for three axis using this type of motor.
If while you are shopping for surplus stepper motors you find some transformers and capacitors you might apply a general rule of thumb to matching the power supply to the motors. The power transformer should be about one and a half times as big in volume as the stepper motor it will operate and weigh about twice as much as the stepper motor. The filter capacitors should be about twice as large as the stepper motor in volume. The power resistors should be as long to twice as long as the stepper motor and have a hole through the ceramic core about three to four times the diameter of the size of the stepper motor's shaft. These rules of thumb are very approximate, but should give you a general idea of what to look for to go with the stepper motors you find. Always try to calculate the correct values for parts, but with surplus parts when you are in doubt about the actual ratings use larger parts than you would normally purchase as new. If some part gets very hot, or burns out, replace it with a bigger part. So if you purchase 10 pounds of stepper motors you might purchase 20 pounds of transformers, and a pile of filter capacitors twice as high as the pile of stepper motors, or something like that. You might be able to guess the approximate current rating of transformers by looking at the gauge of the wire going to the secondary winding terminals.
As with stepper motors the speed that you get with servo motors depends on the electronics that you use to drive the motor. Unlike stepper motors, the accuracy of the positioning is almost totally dependent on the electronics used to control the servo motor. DC servo motors are much like a simple brush type DC motor, you apply power and it turns, you reverse the power and it turns the other way, and the speed is regulated by the amount of power applied. It is the special electronics used with the DC motor that makes it into a "servo" motor. The electronics make the servo motor speed up, slow down, hold position, and reverse rotation by applying an ever changing amount, and polarity, of power to the DC servo motor's coil. The servo electronics calculate the power to be applied to the DC servo motor's coil by using an encoder attached to the motor's shaft to find the motor's current position, and comparing the motor's current position with the commanded position coming from the computer and stored in a many digit counter in the servo circuit boards electronics.
The precision of positioning of servo systems can be a complex issue. With stepper motors the positioning is set by the mechanical spacing of the grooves in the motor's internal parts. The "sponginess" of the stepper motor is generally about +/-0.9 degrees. With servo motors the "sponginess" is not limited by a mechanical aspect of the motor, but is related to how much and how quickly negative feedback can be used in the "closed loop" to bring the motor back to the commanded position. The "sponginess" and positional errors get worse as the servo motor is run faster, and might amount to an angular error of the motor's shaft of +/-90 degrees or more at 2000 RPM. The amount of angular error of the motor's shaft from the commanded position is smaller for light loads and slow speeds, and becomes greater with increasing loads and speeds. At speeds of less than 60 RPM a servo motor might have an angular error about the same as a stepper motor under good conditions. Improvements in the positioning accuracy by using servo motors come from using reduction timing pulleys and belting so that the servo motor's shaft needs to turn four to ten times around to move the load as far as a stepper motor would move the load in one revolution. Because of the reduction belting used to maintain the positional accuracy when servo motors are used the gain in speed from replacing stepper motors with servo motors is not as great as one might think when comparing the maximum RPM of the two types of motors, i.e. a stepper motor with a maximum RPM of 180 might drive a lead screw at 180 RPM by direct drive, but a servo motor with a maximum RPM of 1800 might drive the same lead screw through a reduction of 5:1 by timing pulleys and a belt to turn the lead screw at 360 RPM, where with the servo motor you would get a maximum speed at the lead screw that is about twice as fast, and the positional accuracy of the tool or work-piece perhaps a little worse than the stepper motor at the maximum speed down to somewhat better positional accuracy at the slower end of the speed range.
Servo motor controller manufacture's data might lead you to confuse the encoder count with the position of the servo motor's shaft at any given time during movements. During movements there is normally some error between the motors commanded position and its actual position. The error in position of a servo motor can be in advance or lag behind. Normally a servo motor will lag behind the commanded position on starting and running, and be in advance of the commanded position while stopping. Do not confuse the position at the end of movement when the servo motor has come to rest with the instantaneous position during the length of the actual movement. During movement the commanded position is constantly changing and the servo motor's shaft is controlled by the servo motor's driver electronics to rotate to try to chase the commanded position.
Resolution and accuracy are two different things to calculate with servo motors. Resolution has to do with the number of encoder lines or counts per revolution of the motor shaft, and is always the same regardless of the motor RPM. Accuracy includes all mechanical, electronic, and timing errors that occur, and generally gets worse the faster you make the servo motors run.
To truly measure the position of the tool at any given instant you need to use a stroboscope precisely timed relative to a reference. The instantaneous positioning accuracy of a servo motor generally gets worse as the servo motor is run faster, as opposed to stepper motors where the positional accuracy is about constant up to the point where the stepper motor fails to step accurately and loses steps, or stalls.
Since servo motors can "catch up" after falling behind slightly most users are usually never aware of the degree to which the tool was out of position. Also since when two servo motor driven axis are operating at the same time they will probably both lag while the tool accelerates and probably both lead while the tool decelerates, so the errors might tend to cancel out, and do not show up in the same way that they might if a stepper was run on one axis, and a servo on the other axis.
One advantage of using a servo motor over using stepper motors is the ability of the servo motor to recover from slight overload conditions and continue to stop at the proper destination position. The electronics used with servo motors "always" knows where the servo motor's shaft is and tries to correct positional errors between the actual position of the servo motor's shaft and the commanded position of the servo motor's shaft.
With stepper motors, once they have "lost a step," actually stepper motors lose four full steps at a time normally, they will be off position for the rest of the job. The ability of the servo motor to not accumulate errors the way that a stepper motor will when overloaded and or run too quickly allows servo motors to be operated without the large margin of safety, i.e. the excess torque or "head room", that stepper motors need, and so servo motors can usually be run faster.
For servo motors that would be inclined for use with my CAM programs the encoder type used would normally be an incremental encoder mounted directly onto the rear shaft of the DC servo motor. The reason it is better to mount the incremental encoder directly on the DC motor's rear shaft is that if you use a shaft coupling to connect the motor to the encoder there will be a small amount of backlash or slack, and that can cause the servo's closed loop electronics to go into oscillation, even is such backlash is a very small amount. The incremental encoder has a partly transparent disk with lines on the disk that are read by two light sensors positioned so as to produce two signals that are 90 degrees out of phase, these two signals are called the "A" and "B" signal from the incremental encoder. The disk in the incremental encoder needs to be dynamically balanced since it will be spinning at thousands of RPM, and it needs to be fixed to the shaft so that it cannot get detached even under great amounts of vibration, acceleration and deceleration. The incremental encoder also generally needs positive voltage, generally five volts for TTL compatible incremental encoders, and a common ground wire for the signals and the supply, so a cable with four wires go from the servo driver electronics to the incremental encoder, and a cable with two wires goes from the servo driver amplifier to the terminals of the DC servo motor.
The number of lines on the disk in the incremental encoder determines the value that corresponds to the number of steps per revolution of a stepper motor. The servo driver electronics can process the "A" and "B" channel signals from the incremental encoder to obtain counts of 1x, 2x, or 4x, times the counts measured just for one of the two channels. For example if your incremental encoder produces 500 count pulses per revolution when you look at the "A" channel on a volt meter and rotate the motors shaft one revolution, when connected to the servo driver electronics you might select the 1x mode to get 500 steps per revolution, 2x to get 1000 steps per revolution, and 4x to get 2000 steps per revolution. With the maximum step pulse rate from the computer being constant, selecting 1x will make the motor turn the fastest, selecting 2x will make the motor turn half as fast, and selecting 4x will make the motor turn one quarter as fast, i.e. the higher the count per revolution the slower the motor's maximum speed. Increasing the number of counts per revolution from 500 to 2000 will probably not increase the actual positional accuracy of the tool relative to the work-piece by that same amount, but might reduce the roughness in the running of the motor and give a better surface finish. Although as far as my CAM programs are concerned the incremental encoder's counts are configured like a stepper motors steps, you should not think that when you read the DRO off of the Jog command's screen that you have really positioned the tool within +/-0.000025 inch when you are using an 8000 count per revolution incremental encoder on a DC servo motor direct driving a 5 t.p.i. lead screw, actually your position would probably be +/-0.002 inch, or worse. The positional error in this case is not a defect of my CAM programs in sending step pulses, it is rather that you cannot adjust a servo motor control electronics under typical circumstances to be stiff enough to stay and move within one count on an 8000 count per revolution incremental encoder without the servo motor going into oscillation. If you want improved resolution rather than increasing the incremental encoder counts, you might do better to use an incremental encoder with 1000 counts and use timing pulleys and belt to make a reduction from the motor shaft to the lead screw so that the servo motor rotates 8 times for each rotation of the 5 t.p.i. lead screw, in that case you might get movement of about +/-0.00025 inch even though the DRO would still read ten times better based on the step pulse count, i.e. 1000*8*5 = 40000 steps per inch or 0.000025 inch per step. Having excess resolution might improve the surface finish even if it does not help accurately position the tool to a particular spot every time.
It might be best for you to use stepper motors on the first machine that you automate for use with DANCAM.EXE (tm) or DANPLOT.EXE (tm) since your chance of completion, success, and satisfaction are probably better. Once you get your first automated machine working well you can use that experience to experiment on your second automated machine, knowing that you have actually already made something that worked when you did not overreach.
Servo motors might work better than stepper motors for these sorts of applications:
Where only one axis is moving while the cut is being performed, e.g. operations where many holes need to be drilled quickly.
Where the tool will need to move more than two feet rapidly and frequently.
Where high speed is absolutely necessary for the use of the machine, such as in spray painting or other applications where positional accuracy of +/-0.01" would be acceptable at high speed.
Where cumulative positioning errors are not acceptable, but brief intermittent lead or lag in position is acceptable, e.g. in heavy machine tools were the load is heavy and varies during rough cuts but is light and constant during the final cut at slower speeds.
For many other applications it may be better for you to have your machine use stepper motors and run a little slower. Generally you might find that you will get better parts if you have two machines making parts slowly than if you have one machine making parts twice as fast. It is simple to connect two or more stepper driver modules to run two or more machines from one computer, you might use a TTL 7407 buffer chip and some pull-up resistors to help distribute the step pulse and direction signals.
Like stepper motor drivers servo drivers have two parts, the logic circuit including counters and the power amplifier that drives the motor coil. With DC servo motors there is only one "coil" so only one Bi-polar power amplifier is needed, as apposed to stepper motors that need two or four power amplifiers. Unlike stepper motor power amplifiers that just have on-off or negative-positive, the servo power amplifier needs to apply a variable amount of positive or negative power to the motor coil. The DC servo power amplifier can work in two ways, analog where the voltage changes and can stay at any point between full and zero, and pulsed where the voltage is constantly switched from full to zero at some high frequency, say 4000 times per second, and the proportion of the time the power is at full is varied to get the control over the power sent to the motor.
Servo driver logic circuits have two large counters that keep track of the destination position and current motor shaft position. The step pulse and direction signals from the computer make the destination counter count up or down to record the desired destination position. The incremental encoder channel "A" and "B" signals from the optical encoder mounted on the servo motors rear shaft make the encoder position counter count up and down to record the actual current position of the motor's shaft. The count recorded in the two large counters is continuously compared, and if the destination is found to be more CW than the shaft position the motor coils are given positive current. If the destination is found to be less CW (higher values are more CW) than the shaft's position negative current is sent to the motor windings.
If when you are installing a servo motor on your automated machine, you find that the motor spins out of control or does not work properly, you may need to reverse the connections to the incremental encoder's "A" and "B" channel outputs, since the control may be telling the motor to move the wrong way, making the position error larger rather than smaller. If the servo motor is working properly but is going the wrong way, you may need to reverse both the DC motor's leads and the encoder's "A" and "B" channels, since if you just reverse one of them you may introduce the problem of the error being increased rather than decreased, i.e. positive feedback rather than negative feed back.
To make a stable servo circuit the amount of positive or negative current sent to the motor windings needs to be a little less than proportional to the amount of error, difference, in the motor shaft position. The larger the difference between the position counters the more current that is sent to the motor, but this amount of power must not fully or over compensate for the error or the motor will start to oscillate back and forth trying to correct errors that the servo motor's driver is making even when the commanded position is not changing. When the error compensation is less than full the "gain" of the servo closed loop is less than 1, when the compensation is perfect the "gain" is 1, and when the error compensation is over done the "gain" is said to be grater than 1. Although you would like the gain to be 1 all the time, you cannot always achieve that because the load on the motor changes at different speeds. The lower the servo closed loop gain is adjusted the larger the angle the servo motor shaft will deflect to under load before full power is applied, so when you push on the shaft it has a certain lack of stiffness. As you increase the servo closed loop gain the stiffness of the servo motor's shaft to keeping on position improves, until you get to a point when the motor shaft starts to shake back and forth. Adjusting the servo motor's closed loop gain is a compromise between positional stiffness and keeping the servo motor from going into oscillation and shaking its shaft back and forth all the time. In analog servo amplifiers the gain might be adjusted by a "trim pot" much like adjusting the volume on an old audio amplifier, in digital servo amplifiers you might need to use a computer's serial connection to the servo driver to adjust the gain settings through the use of an accompanying software.
Additionally to make the servo circuit stable there must be a control in the rate with which the amount of current sent to the motor changes, because if the current changes quicker than the motor can keep up with, the motor shaft can start to shake, and oscillate, back and forth. If the rate of change is too slow, the motor will probably not be able to keep on position while changing speed. Tuning the servo control electronics to find the point between hyperactive oscillation and sluggish response can be somewhat of a compromise. In some circuits various time delays and advances may be introduced in the effort to push the motor quickly to correct large errors, and then reduce the effective gain as the correct position is approached in order to avoid oscillation. In such compensations various signals relating to the amount of error, the rate of change in the error, and so on are summed and used to control the power sent to the servo motor. The "tuning" settings of the servo driver's electronics are usually different for various motors and loads so sometimes the servo driver circuit is supplied matched to a particular servo motor, since adjusting the "tuning" to get satisfactory results can be something that requires experience and expert knowledge.
If the positional error becomes very large the servo circuit will need to put the pause and hold line on the parallel port high to stop the computer, and my CAM programs, from sending any more step pulses so that the servo motor shaft can catch up with the destination counter in the servo driver circuit. When the motor can "talk back" to the computer in this way the motor is said to be working in a "closed loop" operation with the computer. Closed loop operation allows the computer to respond to the load the motor is trying to move by slowing down the rate of movement requested for heavy loads, this might be referred to as "sensitivity to load."
The motor speed ramping feature in my CAM programs should be used when servo motors are driven since servo motors do not generally start and stop as rapidly as stepper motors. The pulse rate multiplier value in my CAM program's configuration sub-menu might be used to set the minimum resolution to the largest acceptable quantity to insure the best high speed operation, e.g. if your servo circuit has an encoder resolution of 10000 steps to the inch, and you only need 0.002 resolution, you might set the pulse rate multiplier value in my CAM programs to 20 to make the maximum feed rate 20 times faster (provided the motor can turn that fast.) When my CAM programs are operated on faster computers the pulse rate multiplier would normally be set to one, and the p.w.f. increaser set to a value that lets the p.w.f. for all of the axis to be in the range of 500 to 8000 when the servo motors are running at their maximum RPM.
Commercially built servo circuits may be available that can read step pulse and direction signals. You will probably need to use the Jog commands to figure out the best p.w.f. and basic linear ramping rate, since the start and stop stepper motor tests do not allow the servo motors to get up to their maximum speed. You want to set the p.w.f. and p.w.f. increaser to the smallest value that you can, without having the computer send pulses faster than the servo motor can keep up with. If you "overrun" the servo motor's driver circuit it may stop the servo motor and light up an error alarm light, that would tell you the computer is sending step pulses too fast and needs to be slowed down somewhat by adjusting the values in my CAM program's configuration sub-menu.
If the servo motor electronics short out or develop other circuit problems the servo motor can start rotating at very high RPM, making servo motors very dangerous. This sort of out of control movement can also happen if the counters on the servo control board get upset because of EMI and RFI, power interruptions, overflow in the position counters, encoder problems, or other electrical and wiring problems. When stepper motor electronics go bad the stepper motor normally stops or just wiggles back and forth a little. Be extra careful when working with servo motors since the high speed and torque can damage things and kill you.
There are other kinds of motors used as servo motors than the DC brush type servo motors, but the idea is basically the same, they mostly just use a different arrangement of amplifiers and coils to make the motor shaft turn clockwise or counterclockwise under command of the logic part of the servo circuit.
The servo control approach can be applied to non-electronic motor types of motion devices, such as hydraulic cylinders, pneumatic cylinders, piezo electronic crystals, and others. The servo error signal from the servo driver electronics might be used to regulate the flow of hydraulic fluid, and a linear incremental encoder might be used to measure the position. The time delay and dead zone in the linkage to the encoder in such systems needs to be considered, otherwise the device will be in constant motion as the servo control circuit seeks the boundaries in the slack between the actuator and the encoder's response, i.e. the encoder must react to the even the smallest motion of the actuator with no slop or lost motion.
There are two basic kinds of encoders in general use, incremental encoders that measure the change from the current position, and absolute encoders that measure the position mechanically by their construction. When an absolute encoder is used the servo circuit does not need an encoder position counter, the motor position is read directly from the absolute encoder. Because absolute encoders are expensive and have a limited range of motion, incremental encoders are usually used. Incremental encoders come in two general types, rotational incremental encoders mounted directly on the servo motor, generally on the rear shaft extension of the servo motor, and linear incremental encoders that attach to the machine along the side of the moving part and measure the moving part as it moves. Because of the slack and backlash between the motor's movement and the movement of the moving part of the machine linear incremental encoders might produce constant movement of the servo motors as they try to correct for small errors in the position of the moving part by slamming the motor back and forth in much larger movements. Because of the need for the servo motor's encoder to feedback even the smallest motion of the servo motor's shaft the rotational incremental encoders are normally mounted right on the servo motor. In more sophisticated computer controlled machines both linear and rotational incremental encoders might be used, the rotational encoder on the motor to stabilize the servo motor, and the linear incremental encoder on the machine to measure the actual position of the moving parts. When used with my CAM programs you would probably just be using a rotational incremental encoder mounted directly on the servo motor. With my CAM programs the absolute position would be measured using the incremental encoders on the servo motors from the starting or home switch position just as is done when using stepper motors.
If I get time someday in the future I may add some more information on using servo motors.