|
~: Bipolar stepper motor :~
First I want to give the specifications of the stepper motor with which I have experimented. I have taken stepper motor from 5.25" (Big) floppy drive. It's technical specifications are
Max rated voltage - 5 V DC
Max RPM - 1000 (approx.)
Step resolution - 18o (degree) /pulse
Bipolar stepper motor Theory:-
As I told you earlier there are two coils in bipolar stepper motor. Its four terminals are given and they are color coded. RED and BLUE wire gives one coil and YELLOW and WHITE gives another. Now there are three parameters of stepper motor that you can control
1. Direction
2. Speed
3. No. of rotations
To change the direction of motor you have to change sequence of pulses applied to its coils.
To vary the speed you have to vary the Pulse Repetition Frequency (PRF). It’s a frequency of pulses that are applied to motor
By limiting number of applied pulses you can restrict the motor to rotate desired number of rotations.
To change the direction sequence of pulses is given to all these four terminals to rotate motor either clock wise or anticlockwise. It would be better understood by these tables
To rotate motor clockwise
|
Red |
Blue |
White |
Yellow |
|
0 |
1 |
0 |
1 |
|
1 |
0 |
0 |
1 |
|
1 |
0 |
1 |
0 |
|
0 |
1 |
1 |
0 |
To rotate motor anticlockwise
|
Red |
Blue |
White |
Yellow |
|
0 |
1 |
0 |
1 |
|
0 |
1 |
1 |
0 |
|
1 |
0 |
1 |
0 |
|
1 |
0 |
0 |
1 |
click here to see the animated preview of how motor rotates
Note :- here 0 indicates -Ve (low logic) and 1 indicates +Ve (high logic). Now we know that current flows from +Ve to -Ve. So here actually we are changing the directions of current that flows through these coils.
To vary the speed we have to vary PRF. Suppose PRF if 20 Hz means 20 pulses will be given to stepper motor in 1 second. Now because step resolution of motor is 18o/pulse motor will rotate 20*18o = 360o (means complete 1 revolution)in 1 second. So the speed of motor is 1 RPS (60 RPM). Now if you increase PRF from 20 Hz to 40 Hz then RPS will also double to 2 RPS (120 RPM).
To vary no. of rotations, as we know the step resolution is 18o /pulse. Means if we apply only one pulse motor will rotate only 18o. If you apply 10 pulses in series motor will rotate 180o that means half revolution. So if you limit number of pulses applied to motor then you can restrict it to rotate desired number of rotations.
Bipolar stepper motor Driver:-
H-Bridge is standard, well known circuit and widely used as stepper motor driver. It’s bridge connection of four transistors. Its schematic is as shown below. Because there are two coils in bipolar stepper motor we need two H-bridge circuits one for each coil.

Connections:- Inputs are given to bases of all eight transistors (all are of 2N2222
(datasheet) type) through 1K resistors. T1, T4, T2 & T3 forms one H-Bridge and first coil of motor with RED and BLUE terminals is connected with this section as shown. T5, T8, T6 & T7 forms another bridge and second coil of motor with WHITE and YELLOW terminals is connected with this section as shown. 5 V DC supply is given to circuit.
Operation:- Now when we apply high input voltage (<0.7V) to the base of transistor that will switch the transistor ON and it will be a closed switch and current will pass through it. Same way if we give low input voltage ( around 0.09V), the transistor is OFF and it will be an opened switch and current can not pass through it.
We already know that how sequences of pulses should be given to all four coil terminals (Red, Blue, White and Yellow)
Clockwise Rotation
To rotate motor clockwise first BLUE and YELLOW terminals are on high logic and RED and WHITE are on low logic. So we have to switch ON transistors T2, T3, T6 and T7 and switch OFF the rest transistors. For this we have to apply HEX data word CC (1100 1100). Then for next sequence RED and YELLOW terminals are on high logic and BLUE and WHITE are on low logic. So we have to switch ON transistors T1, T4, T6 and T7 and switch OFF the rests. For this we have to apply HEX data word 3C (0011 1100). In same manner next RED and WHITE terminals are on high logic and BLUE and YELLOW are on low logic. So we have to switch ON transistors T1, T4, T5 and T8 and switch OFF the rests. HEX data word will be 33 (0011 0011). And last now RED and YELLOW terminals are on low logic and BLUE and WHITE are on high logic. So transistors T2, T3, T5 and T8 should be ON and all others should be OFF. For this we have to apply HEX data word C3 (1100 0011).
Thus the complete sequence needed to rotate motor clockwise is CC-3C-33-C3.
Anticlockwise Rotation
As in clockwise rotation the only change for anticlockwise rotation is that here current changes its direction in coil 2 (WHITE & YELLOW) first and then in coil 1 (RED & BLUE). So for anticlockwise rotation sequence will be CC-C3-33-3C.
These sequences are applied to motor with appropriate delay (depending upon RPM) in between till the motor completes desired rotations.
Bipolar Stepper motor control:-
To change the direction of motor the program generates desire sequence either CC-3C-33-C3 (to rotate motor clockwise) or CC-C3-33-3C (to rotate motor anticlockwise) with appropriate delay in between. The delay adjustment is done depending upon current RPM.
To vary the RPM the program varies PRF. First current RPM is converted in to RPS by dividing it by 60 (s1 = s/60). Now for 1 complete revolution we have to apply 20 pulses. So what ever the RPS factor (s1) will be multiplied by 20 that will give us desired PRF (= 20*s1). And the reverse of PRF is the delay (d = 1000 / 20*s1 = 50/s1 in millisecond) that we give in between the pulse sequence.
Number of rotations directly depends upon number of pulses applied. Because four pulses are given in loop you have to multiply this number by 5 for one complete revolution (5*4 = 20 pulses means 1 complete revolution) of motor. |