Bipolar Stepper Motor Driver Circuit

30,058

Circuit Image

The circuit operates by using a clock signal to drive four D-flip-flops in the control section, which store the on/off state of each current direction for the two stepper motor coils. The flip-flops create a finite state machine (FSM) that advances to the next step of a half-stepping sequence with each rising clock edge. The drive section supplies the necessary current to convert control signals into coil-driving currents and includes protection diodes to prevent back-EMF from damaging the NTE1749/L293 integrated circuit. This circuit is designed to power a 12V stepper motor and uses 5V for logic. Modifications are necessary if the stepper motor is not rated for 12V. The circuit can be powered by a standard 12V lead-acid battery. The speed of the stepper motor is controlled by the rate at which the current direction is switched through the coils. The initial step in controlling the speed is generating a clock signal to operate the D-flip-flops in the control section, with the frequency of this clock signal determining the stepping speed of the motor. The clock generation circuit illustrates one method of producing a square wave signal at a specific frequency, utilizing a 555 timer IC. The frequency is influenced by a 0.18µF capacitor and a combination of a 10k potentiometer and 23k resistors, with timing derived from the capacitor's charging and discharging through the resistors. A switch between 2.2k and 23k for R1 selects either normal or fast modes, while the 10k potentiometer allows fine adjustments to the tracking speed. A 10nF capacitor connected to the reset pin is crucial for preventing false resets in noisy environments. Resistor or capacitor values may need adjustments to achieve the desired RPM. The setup typically operates at approximately 200 half-steps per second, equating to around 30 RPM. The frequency can be calculated using online resources based on R1/R2/C values. Stepper motors require a specific coil energization sequence to rotate in one direction; an incorrect sequence will cause the motor to vibrate in place. For energization sequence examples, refer to relevant resources. The half-stepping sequence is generated using four D-flip-flops (from two dual D-flip-flop ICs, 74LS74) and four AND gates (from a single IC, 74LS08). The flip-flops form a state machine progressing through the sequence 1000 → 1100 → 0100 → etc., activating the stepper coils to align the rotor correctly with each step. The outputs from the flip-flops control the current direction and state of the motor coils. For motors requiring more current than the flip-flops can provide, a dual H-Bridge IC, such as the L293 or NTE1749, is necessary to supply adequate power. This IC can handle up to two amps of peak current and is connected simply with four control lines to the chip's input lines and outputs to the motor coils, with chip enable lines connected to Vlgc. The two "A" lines connect to one coil, while the two "B" lines connect to the other. An ohmmeter can be used to identify the wire pairs for each coil, with similar coil wires showing resistance between 1-15 ohms, while different coils will show near infinite resistance. Current limiting is essential in stepper drive design, as the internal resistance of motor coils may not sufficiently prevent over-current conditions. At slower step rates, the impedance temporarily limits current, but once this limit is surpassed, the current will equal voltage divided by the coil's internal resistance. To prevent exceeding the motor's maximum current, resistive current limiting is implemented using 2.8-ohm, 5-watt resistors, ensuring that the current through the coils remains below 1.1 amps in conjunction with the 8-ohm internal resistance of the coils. The output stage includes eight diodes (four for each coil) that protect against back-EMF. When the voltage to a coil is dropped from 12V to high-impedance, the inductor's current does not cease instantly, potentially causing a damaging voltage spike. The diodes provide a return path for the current, mitigating back-EMF risks. Forward and reverse capabilities can be integrated by reversing the polarity of one coil using a double-pole double-throw (DPDT) switch. The circuit can be constructed in various configurations, with initial breadboarding recommended to test sections or the entire circuit. A prototype board with copper contacts for soldering components was used for construction, which took approximately five to six hours. A printed circuit board (PCB) design could significantly reduce assembly time. The completed electronics board features distinct sections for power wiring and signal connections, with the clock signal carried by yellow wires. The performance of the drive has been satisfactory, although noise from motor vibration is noticeable; however, no vibration is observed at the eyepiece or in photographs. A potential enhancement could involve transitioning to a microstepping design to minimize noise further.Briefly, the circuit works as follows; the clock signal drives 4 D-flipflops in the control section which store the on/off state of each of the current directions for the two stepper motor coils. The flipflops comprise a FSM (finite state machine) which advances to the next step of a half-stepping sequence on each rising clock edge.

The drive sect ion provides the current-driving capabilities to turn the control signals into coil-driving currents. The drive section also includes protection diodes to prevent back-EMF from the motor coils from destroying the NTE1749/L293 IC.

This circuit is designed to power a 12V stepper motor, and use 5V for logic. If your stepper is not 12V capable the circuit will require modification. The circuit can be powered with a standard 12V lead-acid battery. Stepper motor speed is controled by how fast the current direction is switched through the coils (hmm, current direction switched, sound familiar like AC power ). The first step in controlling stepper speed is to generate a clock signal to run the d-flipflops in the control section.

The frequency of this clock signal controls how fast the motor steps. The clock generation circuit shows one way of generating a square-wave signal (clock) at a specific freqeuncy. There are many good sites which describe the operation of the 555 timer IC used in this circuit, such as this one at the university of Guelph.

The frequency of the square wave produced by the 555 is controled by the 0. 18uF capacitor and the 10k pot / 23k resistors. Timing is generated from the charging and discharging of the capacitor through the resistors. The switch between 2. 2k and 23k for R1 selects track (noraml) or slew (fast) modes. The 10k pot allows fine adjustment of the exact tracking speed. The 10nF capacitor attached to the reset pin is very important for noisy envrionments - it prevents false resets. For your setup you may need to modify the resistor or capacitor values to meet your required RPM. The above setup runs at about 200 half-steps per second, or about 30RPM. Calculating the frequency according to R1/R2/C can be done online. Stepper motors require a specific coil energization sequence to turn in one direction. An incorrect sequence will result in the stepper motor vibrating in one place. For examples of an energization seqeuence please refer to the reference sites. Generating the half-stepping sequence is accomplished with four d-flipflops (on two dual d-ff ICs, 74LS74) and four AND gates (on one IC, 74LS08).

The four flipflops form a state machine that moves through the sequence 1000 -> 1100 -> 0100 -> etc. This sequence turns the stepper coils on in such a way that the rotor is aligned fully to one coil, then with two coils on the rotor is halfway to the next step, then fully aligned with the next coil, etc. The Q outputs from the flipflops form the signals that control current direction and state of the motor coils.

The outputs of the 74LS74 could not provide enough current to power my stepper motor. With a very small motor it may be possible to use them directly, in which case a power IC is not necessary. To power my motor, which requires a peak current of about an amp, a dual H-Bidge IC was used, the L293 (or equivalent, like NTE1749).

This IC provides up to two amps peak current. Connection and operation of this IC is fairly simple, the four control lines are connected to the four chip input lines, and the four outputs connect to the two motor coils. The chip enable lines are connected to Vlgc. The two "A" lines go to one coil, and the two "B" lines to the other coil. Use an ohm meter to test the four wires in your motor to figure out the pair for each coil. If two wires are the same coil the resistance will be around 1-15ohm, otherwise it should be near infinite.

Current limiting is an important aspect of stepper drive design. The internal resistance of the motor coils may not be suffecient to prevent over-current. At slow step-rates the impedance in the coils limits the current for only a relativly short time, after which the current will be the voltage divided by the internal resistance of the coil. If this current exceeds the maximum for your motor, your must add some form of current limiting. The 2. 8 Ohm 5 Watt resistors provide resistive current limiting in this circuit. In combination with the 8 Ohm internal resistance of the coils the power resisitors ensure that the current through the coils will never be more than 1.

1 amps. The eight diodes on the output stage (four around each coil) are critical for preventing damage from back-EMF. When outputs to a coil are dropped from 12V to high-impedance the current in the inductor does not stop instantly.

If there is no place for the current to flow when forward voltage is dropped a high voltage spike will occur as electrons "pile up" at the now-"open" switch. The diodes provide a path for the electrons to flow back through the power supply, thereby preventing damaging back-EMF.

Forward/reverse is easy to add to the circuit by switching the polarity of one of the coils. This is accomplished with a DPDT (double-pole double-throw) switch. The circuit can be built in many ways. I would suggest breadboarding the sections first, and maybe even the entire circuit. I chose a prototype board to build the circuit on. This board has copper contacts on the bottom which the various components and wires can be soldered to. Total construction time for the electronics was somewhat longer than I was expecting - soldering took about five or six hours.

Everything worked correctly on the first build. A PCB design would drastically reduce the soldering time. If anyone decides to put one together and is willing to share it, please let me know and I will post it. The finished electronics board is shown to the left. The four sections of the circuit are marked out. Power wiring is on the top of the board, and singals are underneath (not shown). The yellow wires on the top carry the clock singal. I`ve been happy with the performance of this drive. Note that it is loud when running due to stepper motor vibration, but there is no vibration visible at the eyepiece or in photos.

A possible improvement would be to convert to a microstepping design to reduce noise. 🔗 External reference




Warning: include(partials/cookie-banner.php): Failed to open stream: Permission denied in /var/www/html/nextgr/view-circuit.php on line 713

Warning: include(): Failed opening 'partials/cookie-banner.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/nextgr/view-circuit.php on line 713