How full drive sequence works with BJT based stepper motor driver

Stepper motors are widely used in various applications such as robotics, CNC machines, and other types of precision equipment. These motors are known for their precise positioning and high torque capabilities, but they require specialized drivers to control the movement of the rotor. In this blog post, we will be discussing the full drive sequence of a BJT-based stepper motor driver.

A BJT-based stepper motor driver is a type of driver that uses bipolar junction transistors (BJTs) to control the current flowing through the windings of the stepper motor. The full drive sequence is a method used to control the movement of the stepper motor by applying a sequence of current pulses to the windings.

The full drive sequence is divided into four steps, with each step corresponding to the current flowing through one of the two windings of the stepper motor. In the first step, the current flows through the first winding, which causes the rotor to rotate to a specific position. In the second step, the current is switched to the second winding, which causes the rotor to rotate to the next position. This process is repeated for the third and fourth steps, resulting in the rotor moving to the next position.

The full drive sequence can be implemented using a microcontroller or other electronic devices that can generate the required current pulses. The length and frequency of the current pulses can be adjusted to control the speed and acceleration of the stepper motor.

In this blog post, we will be discussing the circuit diagram, working principle, and programming code of a full drive sequence system using a BJT-based stepper motor driver. We will also be discussing the advantages and disadvantages of using BJT-based stepper motor drivers and the full drive sequence method.

By the end of this blog post, you will have a good understanding of how a full drive sequence works with a BJT-based stepper motor driver, and how it can be used to control the movement of a stepper motor.

To operate a stepper motor a motor driver is required. The motor driver can be a single integrated chips(IC) such as L298N, L293D, dedicated stepper motor driver such as A4988 stepper motor driver, a motor driver module such as the Motor Shield or using BJT or FET transistors. Here it is illustrated how a stepper motor driver can be build using bipolar transistors and how the motor driver works with current flow animation.

Bipolar stepper motor Example

The following picture shows Nema17 stepper motor which is one example of bipolar stepper motor.

 

A bipolar stepper motor has four wires which are internally connected to the winding coil inside a bipolar stepper motor as shown below.

The coil between the connecting wires A and B is called winding 1 and the coil between the connecting wires C and D is called winding 2. So this bipolar stepper motor has two windings called winding 1 and winding 2.

In this tutorial we will use the following circuit bipolar stepper motor component with wiring terminals as shown below. 

BJT based bipolar stepper motor driver

We can build a BJT(Bipolar Junction Transistor) based bipolar stepper motor driver. The following shows a simple stepper motor driver using BJT transistors.

BJT based bipolar stepper motor driver

The winding coil 1 inside the motor between A and B is controlled using the four general purpose transistors Q1, Q2, Q3 and Q4. These four transistors forms an H bridge. Similarly, the transistors Q5, Q6, Q7 and Q8 forms another H bridge which are used to control the other coil winding 2 of the stepper motor. By applying suitable phase sequence explained next to these two H bridges we can change the direction of rotation of the stepper motor. 

Here the motor is setup with 90 degree step angle.

Types of drive sequence

There are 3 types of drive sequences that are used with stepper motors. These are:

a. Full drive 4 step sequence

b. Half drive 8 step sequence

c. Wave drive

In this tutorial the full drive 4 step sequence for clockwise and counter clockwise direction is explained. The half drive and wave drive are explained in the next tutorials.

a. Full drive 4 step sequence

The following is the table of phase sequence of full drive in clockwise(CW) and counter clockwise(CCW) direction. 

full drive 4 step sequence

In the above table, hex digits are listed for each phase steps.

Full Drive in Clockwise Direction

Consider the full drive in clockwise direction. 

Step 1

The current flow in the first step with inputs A=1, B=0, C=0 and D=1 is shown below.

step 1 of full drive clockwise direction

When the wire A is high, the transistor Q1 is high and so it lets the current flow from +12V from collector to emitter. This current flows into A of the windings 1 of the motor and comes out of B and goes into the transistor Q4. The Q4 is connected to the input A and therefore the current flows in collector to the emitter and then ground. Since the input B to the transistor Q2 is low, the transistor Q is cutoff and therefore it stops any flow of current. Similarly the transistor Q3 does not conduct since its input is also low.

Similarly, on the other H bridge, input C is low and input D is high. So the transistors Q6 and Q7 are ON and the transistors Q5 and Q8 are OFF. So the current flows from +12V supply through the transistor Q6 into the coil winding 2 of the motor, then goes through the transistor Q7 and into the ground.

Because of the flow of current direction in the two H-bridge as explained above, the motor rotates in the clockwise direction. The motor will rotate to an angle of +45 degree.

Step 2

In the second step the inputs are A=0, B=1, C=1 and D=0. For this step the current flow into the motor is shown below.

step 2 of full drive clockwise direction

In this step, the input A and B are high and therefore all transistors Q1, Q2, Q3 and Q4 in the first h-bridge are turned on. This drives the motor from the +45 degree to +90 degree of rotation. All the transistors in the 2nd h-bridge are turned off.

Step 3

In the second step the inputs are A=0, B=1, C=1 and D=0. For this step the current flow into the motor is shown below.

step 3 of full drive clockwise direction
In this case, the transistors Q2 and Q3 are turned on in the first h-bridge and the transistors Q5 and Q8 of the second h-bridge are turned on. This creates the current flow as shown in the figure above. This drives the stepper motor from +90 to +225 degree of rotation.

Step 4

In the second step the inputs are A=0, B=0, C=1 and D=1. For this step the current flow into the motor is shown below.

step 4 of full drive clockwise direction

In this case, all the transistors in the first H-bridge driver are off while all the transistors of the second H-bridge driver are ON. This rotates the motor from previous +225 to +270 degree in clockwise direction. 

After this step, the previous steps are repeated and the stepper motor rotates in clockwise direction.

Full Drive in Counter Clockwise Direction

The full drive sequence for counter clockwise direction is provided above. Each step is described next.

Step 1

In the first step 1 of counter clockwise direction the inputs are A=0, B=0, C=1 and D=1. In this case the current flow is shown below.

step 1 of full drive counter clockwise direction

The motor is rotated from 0 degree to -90 degree.

Step 2

In the first step 1 of counter clockwise direction the inputs are A=0, B=1, C=1 and D=0. In this case the current flow is shown below.

step 2 of full drive counter clockwise direction

 

 The motor is rotated from -90 degree to -135 degree.

Step 3

In the first step 1 of counter clockwise direction the inputs are A=1, B=1, C=0 and D=0. In this case the current flow is shown below.

step 3 of full drive counter clockwise direction

 

  The motor is rotated from -135 degree to -180 degree.

Step 4

In the first step 1 of counter clockwise direction the inputs are A=1, B=0, C=0 and D=1. In this case the current flow is shown below.

step 4 of full drive counter clockwise direction

 

  The motor is rotated from -180 degree to -315 degree.

 After this step the sequence is repeated and the stepper motor is rotated in counter clockwise direction.

See the following animation video of how the full drive sequence for stepper motor works with BJT motor driver.

Post a Comment

Previous Post Next Post