Stepper Motor Driver

Not rated 9,578

Circuit Image

The circuit is based on the SN74LS194 Bidirectional Universal Shift Register and is designed to drive unipolar stepper motors, providing basic control functions such as forward, reverse, stop, and speed adjustment. Direction control is selected by an ON-OFF-ON type toggle switch, which can be replaced by an alternative method such as transistors controlled by a PC's parallel output port. Speed control is achieved through a potentiometer, although the circuit can also accept pulses or controls from other sources like a push button or a simple computer interface. The direction can also be controlled via a computer interface. The web page utilizes integrated circuits from the SN74LSxx family of TTL devices. It is important to note that the circuit lacks error detection or correction and should not be used in applications requiring precise step control or positioning accuracy. The circuit is intended for hobby use only. A testing version is illustrated at the end of the page, presented in a different layout showing the SN7474 in logic block form, with LEDs indicating the motor coils being activated. Each positive CLOCK pulse shifts the HIGH state at the SN74194's output terminals (pins 12, 13, 14, 15) either up or down, with the direction of shifting controlled by switch S2. In the center OFF position, the HIGH output state remains in its last position, stopping the motor. The outputs from the SN74194 are fed to the four segments of the ULN2003 driver. When an input segment is HIGH, the corresponding transistor turns ON, allowing current to flow through one of the motor's coils. The stepper motor driver circuit diagram includes external connection terminals, with the motor coils omitted for clarity. The ULN2003 integrated circuit is a 7-unit Darlington high-current, high-voltage peripheral driver, capable of handling currents up to 500 milliamps and voltages up to 50 volts. The stepping order of the inputs to the ULN2003 for forward and reverse motor directions is illustrated in the accompanying diagram, with pin numbers dependent on the PCB layout. Additional links to stepper motor-related web pages are provided for further understanding of stepper motor operation and control. The schematic indicates that with the specified component values and a capacitor C1 of 1µF, setting resistor R1 to zero ohms results in a calculated CLOCK frequency of approximately 100Hz, allowing the motor to achieve 100 steps per second. This frequency is generally slow enough for proper motor operation, although the maximum RPM at which stepper motors function effectively is relatively low, and the torque decreases rapidly as speed increases. Testing may be required to determine the minimum values for R1 and C1 to achieve the maximum CLOCK input frequency for a specific motor. Data sheets, if available, will assist in determining this frequency. There is no minimum step speed below which stepper motors cannot operate, theoretically allowing R1 and C1 values to be as large as desired. However, practical limitations exist, and the 555 timer data sheet should be consulted for more information. The printed circuit board has provisions for modifying the values of R1 and C1 through external connections, and it is also possible to inject CLOCK pulses via these connections for external step control. The calculated minimum and maximum CLOCK frequencies are valid for the specified component values, taking into account the tolerances of real components and the leakage currents.Based on the SN74LS194 - Bidirectional Universal Shift Register the circuit is designed to drive UNIPOLAR type stepper motors and provides only basic control functions - Forward, Reverse, Stop and Speed adjustment. For the purposes of this page the direction control function is selected by an ON-OFF-ON type toggle switch.

This could be easily rep laced by another method such as transistors controlled by a PC`s parallel output port. Speed control is by means of a potentiometer but the circuit could accept pulses or controls from other sources such as a push button or a simple computer interface. The direction could also be controlled by a computer interface. This web page uses integrated circuits from the SN74LSxx family of TTL devices. It is not the purpose of this page to provide detailed explanations of how these devices work and an understanding of simple logic circuits would be helpful.

N. B. - Due to the lack of error detection or correction this circuit should not be used for application that require accurate step control or positioning accuracy. The circuit is intended for hobby use only. A testing version is shown near the end of this page. It is laid out differently and shows the SN7474 in logic block form and LED`s are used to indicate the motor coils being switched.

Each time the CLOCK pulse goes positive the HIGH state at the SN74194`s OUTPUT terminals, (PIN`s 12, 13, 14, 15), is shifted either UP or DOWN. Refer to the "Stepper Motor Driver Waveforms" diagram. The direction of this shifting is controlled by switch S2. When S2 is in the center OFF position the HIGH output state will remain in its last position and the motor will be stopped.

The pulses from the OUTPUT`s of the SN74194 are fed to four segments of the ULN2003 Driver. When a segments input is HIGH the transistor will turn ON and its OUTPUT will conduct current through one of the motors coils. The following diagram shows the Stepper Motor Driver circuit with its circuit boards external connection terminals.

The motor coils have been omitted from the diagram. The ULN2003 integrated circuit is a 7 Unit, Darlington High Current, High Voltage Peripheral Driver. Its outputs can handle currents of up to 500 milliamps and voltages up to 50 volts. The following diagram shows the stepping order of the inputs to ULN2003 Peripheral Driver for forward and reverse motor directions. Pin numbers are not indicated as this depends on the PCB layout. There are some links to other stepper motor related web pages further down the page. These may be helpful in understanding stepper motor operation and control. With the parts values shown on the schematic and capacitor C1 being 1uF. If resistor R1 is set to "ZERO" ohms the calculated CLOCK frequency will be approximately 100Hz and the motor will make 100 steps per second.

This CLOCK frequency will be slow enough for most motors to operate properly. The maximum RPM at which stepper motors will operate properly is quite low and the torque the motor can produce drops of rapidly as motor speed increases. Testing may be needed to determine the minimum values for R1 and C1 to produce the maximum CLOCK INPUT frequency for any given motor.

Data sheets, if available, will also help determine this frequency. There is no minimum step speed at which stepper motors cannot operate. Therefore, in theory, the values for R1 and C1 can be as large as desired. There are practical limitations to these values though and the 555 timer data sheet should be consulted for more information. Provision has been made on the printed circuit board to change the values of R1 and C1 through external connections.

It will also be possible to inject CLOCK pulses through these connections for external step control. In the above items the "calculated" minimum and maximum CLOCK frequencies are valid for the actual parts values shown. Given the tolerances of real components and the leakage currents of e 🔗 External reference