3.1 How does the 1063 control Stepper Motors?
Connect the motor to the PhidgetStepper's inputs. If you are having difficulty connecting the wires, refer to the technical section.
Connect the power supply using the barrel connector.
Power supplies with higher current (more than 2.5 Amps) should be wired directly to the terminal block.
Now that you have everything together, let's start using the 1063!
In order to demonstrate the functionality of the 1063, the Phidget Control Panel running on a Windows machine will be used.
Linux users can follow the getting started with Linux guide and continue reading here for more information about the 1063.
Use the Target Position slider to set a new target position. Change the Acceleration and Velocity sliders to speed up or slow down the 1063's approach.
Use the Current Limit slider to change the maximum amount of current supplied to the motor's coils. See your motor's datasheet for the recommended coil current.
How does the 1063 control Stepper Motors?
The 1063 can be used to control 4, 6, or 8 wire bipolar stepper motors.
The PhidgetStepper Bipolar is most effective when used with stepper motors designed to be driven with a chopper drive stepper controller. These motors are often large, with a rectangular industrial appearance.	The specifications of these motors are often confusing and may seem contradictory. Our users are often confused attempting to relate the specifications of their motor to the capabilities of the 1063. If you are in doubt if your motor will work with the 1063, call us.
When the steppers are first engaged from software, the stepper motor likely will not be at the same state as the default output state of the controller. This will cause the stepper to ‘snap’ to the position asserted by the controller - potentially moving by 2 full steps.
At low speeds, less than 1024 1/16th steps per second, the 1063 uses a microstepping scheme to allow precise control of the current to each coil, and therefore the position of the stepper. It’s important to note that many steppers are not designed to be microstepped precisely, and will not accurately produce the expected angle.
At higher speeds, the 1063 switches to a full stepping mode. The 1063 will automatically switch back to microstepping when approaching the target position.
To avoid the use of floating point in the APIs, the position, velocity and acceleration parameters are expressed in microsteps (1/16th steps), instead of full steps. If your application wants to move the motor by 1 full step, you change the position by 16.
Because stepper motors do not have the inherent ability to sense their actual shaft position, they are considered open loop systems.
This means that the value contained in the current position property is merely a count of the number of steps that have occurred towards the target value; it can not be relied upon as a measure of the actual shaft angle, as external forces may also be affecting the motor.
There are several ways of overcoming this drawback. The simplest is to allow the motor load to depress a limit switch located at a known position. This can be used to fire an event in software to recalibrate the shaft position values. A more elegant solution might involve the mounting of an optical encoder on the shaft and the development of a control system.
Bipolar Steppers motors are available in 4, 6 or 8 wire configurations. Driving a motor in the Bipolar Configuration produces maximum torque. The word Bipolar means that the controlling electronics have to be able to produce a current flow in either direction in each coil, to produce magnetic fields in opposite directions.
A 4 wire Stepper motor can only be controlled as a bipolar. There are two coils, with the ends of each coil brought out. By applying current to the two coils in sequence, and changing the direction of current flow, the motor can be made to rotate.
Determining how to connect a 4 wire stepper to the 1063 can be done by following this procedure. Suppose we have four wires: red, green, yellow and blue.
Looking at the table, you see that there are two pairs of wires (Green-Blue, and Yellow-Red), with roughly the same resistance measured between the wires in each pair. Pick one of the four wires and wire it to the A terminal. The other wire in this pair is connected to the B terminal. At random, wire the other pair to C and D. The motor will turn in clockwise or counter-clockwise rotation. Swapping the A and B wires or the C and D wires will change whether the motor considers “forward” to mean clockwise or counter-clockwise rotation (Remember, steppers can be run in forward or reverse by choosing a target position greater than or less than the current position).
In a 6 – wire bipolar motor, there is two + wires, one for each coil, which are the center taps for each coil. You will need to isolate which are the center tap wires and the corresponding wires for their coil.
These center taps are left unconnected to operate as a bipolar. Let’s assume our six wire stepper motor wires are colored as follows: red, green, blue, white, purple, and yellow.
Looking at our table, we can see our pattern. The red wire has the same resistance to the green and blue wires. The white wire has the same resistance to the yellow and purple wire. Red, green, and blue are for one pole, and white, yellow, and purple are the other pole. The red and white wires are the center of their coils. Leave the red/white wires unconnected, and follow the instructions for connecting a 4-Wire Bipolar Motor as described earlier in this section.
There are in fact two valid combinations, one that will produce a clockwise rotation in the stepper motor for increasing position and one that will produce counter-clockwise rotation. Swapping the A and B wires or the C and D wires will change whether the motor considers “forward” to mean clockwise or counter-clockwise rotation.
8 Wire Motors are very difficult to wire up if you do not have a schematic showing how the wires are connected to the internal coils. Only follow these instructions if you are really desperate.
In an 8 wire motor, the coils are split, and we have to reconnect the coils, to reduce them to a 4 wire. Assume our eight wire stepper motor wires are colored as follows: red, yellow, purple, orange, blue, green, brown, and white. In an 8-wire stepper motor, these wires would be part of 4 coils, 2 wires per coil. We need to determine the cable pairings.
After trying each permutation, engage the motor from software and try to rotate it. Do not connect the pairs to anything - as if you were using a 6-wire stepper in bipolar mode.
If you are not using a Phidget stepper, we suggest consulting any manuals or data sheets that are associated with your particular motor in order to determine the proper wiring for your motor.
When looking at a stepper motor's specifications, you may come across a "Rated Voltage" value. This value is usually equal to the rated current multiplied by the resistance of the coils of the motor, making it somewhat of a redundant specification. As mentioned earlier, you can increase your controller's supply voltage in order to allow the motor to reach higher speeds at a lower current (because high current causes high inductance which puts a hard limit on how much speed and torque a motor can produce). The motor will also produce more heat as you increase the supply voltage, so it's a good idea to choose a supply voltage based on the performance you need for the motor. Some motors will have a "Recommended Voltage" for a particular controller, which is the amount of voltage needed to reach the optimal speed and torque of the motor with minimal heating.
For more information about how supply voltage affects your motor's maximum speed and torque, check the Stepper Motor Primer.
The 1063 allows the current applied to the motor to be programmatically set. This is important - if the current limit is set too high, the motor’s internal resistance will cause the sine-wave approximations used to implement microstepping to clip at the maximum current possible, given your motor/supply voltage. This clipping will cause rough operation, or prevent the motor from turning. If the limit is set too low, the motor may not be able to handle it’s load, by missing steps, or not turning at all at high accelerations.
Disconnect one coil from the Phidget and make sure your power supply is set at the voltage you will use in your application.
The CurrentLimit has to be less than the current limit of your motor, so start CurrentLimit at a small value.
Using our example, change the position until you find a maximum current.
Move up the current limit until the current feedback is not increasing.
This is your current limit. If you do not need so much torque, you can reduce the current limit to save power and reduce heating. If you need more current than the 1063 is specified to provide, you'll need to add some form of heat dissipation to the driver chip (A3979), in the form of a heatsink, air circulation, or both. The only problem with artificially increasing this limit through cooling is that you have no way of knowing how much further you can push the controller without some sort of temperature monitoring.
For more information about setting the current limit, check the Stepper Motor Primer.
A stepper motor can be caused to rotate continuously by simply setting the motor position property to an extremely large number of steps. The valid range of values for the motor position property is large enough to be able to cause the motor to continuously turn at maximum velocity for 194 days.
Holding torque is the amount of torque required to rotate the motor ‘against it’s will’ when the full rated current is flowing through the coils. If current consumption / heating is a problem, and full holding torque is not required, the Current Limit can be decreased in software when the motor is not moving. Holding torque will decrease linearly with the Current Limit.
There is also a small resistance to movement within the motor even when there is no current, called Detent Torque. This may be sufficient to prevent rotation in your application, particularly if the stepper has a gearbox on it.
If the motor is not supporting a load or is not required to maintain a specific angle, it is recommended to set the Enable property to false. This will allow the motor shaft to rotate freely, but the present angle may be lost if forces on the motor-shaft are greater than can be resisted by the detent torque of the unpowered motor.
Stepper motor precision is limited by the manufacturing process used to build them. Errors in the rotor and coils will cause some degree of inaccuracy. In our experience, inexpensive stepper motors will often have positioning errors approaching a half-step. Gearing a stepper motor down with a gearbox will reduce this error proportional to the reduction ratio of the gearbox.
When looking for a motor that will be compatible with the 1063, check the motor's data sheet and make sure it meets the following specifications.
Bipolar motor - While the 1063 can control some six-wire unipolar motors, we recommend you look for bipolar stepper motors.
4, 6, or 8-wire motor - A 5-wire motor cannot be used with the 1063, because the coils of the motor are connected internally.
Rated/Recommended Voltage - If the motor comes with a rated or recommended voltage, it should be no more than 30 volts, and you should use a power supply that can output that voltage.
Rated Current - The motor should be rated for a maximum of 1.5A per coil.
If your stepper motor is not behaving correctly, you can use a multimeter to determine whether it is the controller or the motor that is at fault.
Disconnect the motor and set the current limit to 0. Set the target position to 7 and measure the voltage difference between the A and B terminals it should be either -12, or +12V assuming you are using a 12V power supply (just depending on which terminal you have the positive multimeter lead connected to). Then set the target position to 8, the voltage should drop to 0, and it will go to the opposite at 9 (-12 or +12). This pattern will repeat for 39,40,41 and 71,72,73 and 103,104,105 etc... in increments of 32. If this is behaving as expected then the problem is probably with how you have connected your motor, or your code.
For more information about the digital inputs on the 1063, check the Digital Input Primer.
For more information about stepper motors, check the Stepper Motor and Controller Primer.
This page was last modified on 28 August 2018, at 17:41.