H Bridge Driver for Two-Phase Bipolar Stepper Motor
This MOSFET H bridge circuit is for reversing the current in a single coil of a two-phase bi-polar stepper motor; hence, two of these circuits will be required in total. A two-phase bipolar stepper motor has one coil per phase. Usually each coil winding is on a separate stator. Therefore, expect two stators, each with a single coil winding. Usually, such a motor has four wires coming out from it. Since each coil requires one changeover switch, this type of stepper motor requires two changeover switches in total. The implementation of each switch is a full H bridge driver circuit. The circuit usually consists of high power switching transistors, and they can be MOSFETs or BJTs depending upon quality requirements. However, MOSFET transistors are a better choice for this type of application because they behave as almost perfect switches, in comparison to BJT. In this circuit, I am using two p-channel, and two n-channel enhancement MOSFETS to switch the direction of current in one coil. The same type of circuit is also used for the other coil as well.
As you can see in the animated diagram, the trick to understanding H bridge operation is to first draw the direction of the current through the coil, and then ask yourself which two transistors should be conducting. As you can see from this vivid diagram -- that you will even remember in your exams -- always the alternate pair conducts. This way the current switches through the coil in either direction.
The advantage of using n-channel and p-channel MOSFETs is that we can control two of them simultaneously with a single control signal at their gates. Therefore, we can join their gates, and it minimizes the complexity of the required logic circuitry. However, this is optional, and you can control all four gate inputs independently if you so wished.
The logic circuitry could be the simple complementary outputs of a D-type flip-flop where Q and /Q alternate between logic 1 and logic 0. These outputs could feed input 1 and input 2 of the H bridge driver circuit.
Protection Diodes
Inductive loads usually generate huge amounts of back EMF that can damage the MOSFET transistors. Consequently, protection diodes are usually used to channel these dangerous voltages. Some MOSFETS have internal protection diodes which are sufficient, however if your transistors do not have them internally, then you need to install external protection diodes between the drain and source gates, and they should install exactly as the diodes shown in the diagram above.