If youre interested in robotics, motion control, or just want to learn about stepper motors, then you should try building this versatile stepper motor controller.
This project allows you to control the speed, direction, and step size of a unipolar four-phase stepper motor. The controller is capable of handling motor winding currents of up to 1.25 amps per phase and it operates from a single supply voltage of 6-30 volts DC. A unique feature f this project is that the circuit can operate in either remote mode or stand-alone mode. In the stand-alone mode, an on-board pulse generator and a four-position DIP switch allows you to demonstrate all of the functions without any additional connections. This mode is perfect for demonstrating basic stepper motor control principles. The circuit even has LEDs that show the energized phases for each step. In remote mode, all motor functions can be interfaced to external logic or a microcontroller. This allows the controller to be incorporated into a robot, an X-Y plotter, or any motion control project you have in mind!
CIRCUIT DESCRIPTION
Refer to the schematic of the stepper driver shown in Figure 1. Power is supplied by a DC wall transformer or DC power supply at P1. The voltage can be anything from 6 to 30 volts, depending upon the rating of the stepper motor. The stepper motor uses most of the current in this circuit, so it is powered directly from the transformer output through resistors R1 & R2. These resistors limit the current to the motor and allow the motor to be operated with a power supply voltage greater than the voltage rating of the motor for improved performance.
Stable voltage for the rest of the circuit is obtained by regulating the input voltage down to 5V with U4, a LM78L05 voltage regulator IC. Capacitors C7, C1, and C5 provide additional voltage filtering. U1 is capable of supplying up to 100 mA of current.
The heart of the stepper controller is U1, a UCN5804B stepper-motor translator/driver IC. It contains a CMOS logic section for the sequencing logic and a high-voltage bipolar output section to directly drive a unipolar stepper motor. U1 can generate waveforms for three different sequence modes: (1) FULL-STEP with two phases energized, (2) FULL-STEP WAVE and (3) HALF-STEP. The waveforms for these three sequence modes are shown in Figure 5. Diodes D1-4 are clamps to prevent damage to U1 if the outputs swing below ground when driving the inductive load of the motor. Each of the LEDs L1-4 light when the corresponding output goes LOW and are useful for observing the output waveforms. Resistor R3 provides current limiting to the LEDs.


Pins 9, 10, 14, and 15 of U1 are control inputs for phase, halfstep, direction, and output-enable. These signals are pulled-down to a logic LOW level by resistors R7-11. The control signals go to both connector P3 and the four-position DIP switch (S1-4). Switches 1-4 allow for manual control of each function, or alternatively, connector P3 allows the functions to be controlled by external logic or a microcontroller chip.The UCN5804B requires an external pulse input on pin 11 to advance the stepper motor. This signal can be supplied by external logic via connector P3 or can be provided by U2 or U3. U2 and U3 are LM555N timer ICs and are used to provide single- step or continuous pulses to U1. U2 is configured as an astable oscillator that delivers continuous pulses. The pulse rate is controlled by potentiometer R13 and capacitor C2. Jumper J2 connects C6 in parallel with C2 to give a LOW SPEED range. U3 is configured in a monostable mode to produce a single pulse when S5 is pressed. Jumper J1 selects between the single-step or continuous mode.
ASSEMBLY INSTRUCTIONS
The easiest way to build the stepper motor controller is to use an etched circuit board as shown in Figure 2. If you don’t want to fabricate your own board, a pre-etched and drilled board can be purchased from the source shown in the parts list. Locate all the components shown in the parts list and use Figure 3 to determine component placement on the PC board. Begin by using three pieces of solid wire for J1, J2, and J3. Next install and solder the four diodes in place, noting their polarity. Then move on to the resistors and ceramic capacitors.
When installing the 5-watt resistors R1 and R2, leave a small space between the resistors and the PC board to allow for air circulation. Be sure to observe proper polarities when installing the electrolytic and tantalum capacitors and the voltage regulator. Note that it may be necessary to bend the leads of the U4 to fit the PC board.
Now solder IC sockets for U1, U2, and U3 to the board. If you use the switch specified in the parts list for S5, it can be soldered directly on the printed circuit board. Then install the four LEDs as shown in Figure 3.It is recommended that you use screw-terminal connectors for P1 and P2. Potentiometer R13 can be either PC mount style or panel mount style. To use a panel mount potentiometer, cut three pieces of stranded wire to connect R3 to the PC board. If you plan to use the controller in stand alone mode, solder a four-position DIP witch for S1-4. You may omit the DIP switch if you plan to use the P3 connector for remote interfacing.
Next, locate the UCN5804B integrated circuit (U1). Since U1 is a CMOS device, it can be easily damaged by static electricity. Take proper anti-static precautions when handling the chip. Refer again to Figure 3 before installing U1 to make sure of the proper orientation of pin 1, then press the IC firmly into the 16-pin socket. Repeat the procedure with ICs U2 and U3.
FINAL ASSEMBLY
Before continuing, clean the foil side of the PC board with alcohol or flux remover. Then refer to Figure 4 for details on connecting the stepper motor and DC power supply. Note that the wire colors for the stepper motor shown in Figure 4 apply only to the PF-42 motor that is included in the purchased kit. If you use a different motor, you will need to determine the appropriate wire connections to P2. Also note that the circuit is designed to drive six-wire UNIPOLAR motors only. Next, attach the wires from the DC power source to the PC board, observing the polarity show in Figure 4.
OPERATION
To run the stepper controller using the on-board oscillator, install jumper J1 in the “A� position and leave J2 open. On the four-position DIP switch, set S1, S2, S3, and S4 all to the “OFF� position. Switch the DC power source ON and the stepper motor should start to turn. The speed can be regulated with potentiometer R13. Installing jumper J2 will switch to a low-speed range. If you try to drive a stepper motor too fast or with too large of a load, it can stall (see the note listed at the end of the article).
With the motor turning properly, you can switch S2, S3, and S4 to change the direction, step size, or phasing (see Figure 6). Note that S1 is the output enable and will stop the motor when the switch is in the “ON� position. To control the stepper functions remotely, set all of the DIP switches to the “OFF� position and then use P3 to connect the control signals to an external microcontroller or toggle switches.
To operate the stepper controller in the single-step mode, install jumper J1 in the “B� position. Each time you press switch S5, the LN555 (U3) will produce a single pulse and will cause the UCN5804 to advance the motor one sequence position. The motor sequence will still be determined by the settings of S2, S3, and S4. For single-step to work properly, you must release S5 before U3 completes its output pulse or else the LM555 will automatically re-trigger. The single-step mode is a great educational tool because you can actually observe the various step sequences in the LEDs (L1-4). This controller is a robot builder’s dream come true! The kit also makes a great educational project for demonstrating basic stepper motor control principles.

NOTE: All stepper motors exhibit an inverse speed-torque relationship. As the stepping rate increases, the back EMF produced by the motor causes the current to decrease, which leads to a decrease in torque. If the stepping rate continues to increase, at some point the torque of the motor will drop below the inertial load and the motor will ‘STALL’ The speedtorque curve can be greatly improved by using a higher input voltage with series resistors (R1 and R2). Higher input voltages will continue to improve the performance until practical power dissipation limits are reached or the voltage/current ratings of the UCN5804B are exceeded.
Source: Nuts & Volts Magazine



















Post a Comment