Stepper driver 1
A simple circuit designed to drive stepper motors, from low current
types, to motors requiring a couple of amps. Both full step and half
step modes are supported.
above picture is of a Adruino like strip board prototype built back in
2005. Notice the over sized fan stripped from an old PC power supply.
This is the single sided version of the drive without the heat sink or fan added. A PDF of the PCB layout is available here.
This circuit provides a low cost, optically isolated
that achieves relatively high speeds through various
techniques. The motor is driven in a center tapped arrangement
with the coil's center taps connected to the POWER+ rail. Half
stepping, a technique by which the motor can provide twice the rated
resolution, is supported by having 2 separate constant current sensors.
When currents, and transients are high, as they are in
stepper motor drives, is is a good idea to separate the logic and drive
power supplies. This prevents earth loops from forming, interfering
with, and even destroying circuitry. This circuit uses the common and
cheap MCT2 optical isolator to electrically separate input from the
To allow stepper motors to archive higher speeds, this circuit operates
on a supply voltage that is typically 4 times higher than the rated
motor voltage. Each drive transistor does not act as a switch, but
rather as a constant current supply. As a result, the transistors do
GET HOT, and a good heat sink is recommended. The second technique used
to allow higher speeds, is to prevent EMF breaking. EMF braking
happens when the drive protection circuitry
provides a current path during normal operation. Here is a more
in depth discussion on the topic.
R8..11 provides some current limiting from the logic input
while U4 to 7 provides the optical isolation.
These optical isolators provide the positive gate drive signal to turn
on the main transistors Q1..Q4. As these opto isolators can only source
a signal, R2 .. R6 is needed to switch the transistors off when the
opto coupler is turned off.
However, the opto coupler's collectors are not connected to the supply
voltage. The power transistors act in pairs, Q1 and Q2 control the two
halves of coil A while Q3 and Q4 control the two halves of
coil B. Both coil A and coil B 's center taps are to be connected to
POWER+. The coils have separate constant current supplies so
as to prevent oscillation when the circuit is used in half step mode,
where both Coil A and B are driven at the same time.
Each sets gate voltages are controlled so as to provide the constant
current through the motor coils. Q5 and Q6 provides a supply,
controlled by how much current TL431's U2 and U3 draw.
The TL431 is a device that allows significant current flow between pin
2 and 3 when the voltage across pin 1 and 2 is equal to, or greater
than 2.5V. A small bias current of 1ma is always present though.
The input of the two TL431s are set to a constant voltage provided by
VR1 R1 and U1 via R14 and R15.
The voltage set by VR1 can vary from 2,5V to 2V less than the supply.
Let us say that the voltage is set to 3V, that would mean that U2 and
U3 would turn on until the voltage at their pin2s reach 3V - 2.5V
= 0.5V. So for the voltage across R12 or R13 to
reach 0,5V we would expect a current through R12 and R13 of 0,5 / 0,22
Circuits involving feedback and complex loads often suffer from
oscillations. C2 and C3 are there to slow the reaction rate of the
TL431s, reducing the chance of oscillations. Stepper motors come in
many different types, and to archive optimum response times, without
oscillation, you may have to select a different value for C2 and C3
for your particular case.