Loading...
Schematic Circuits

Controlling Bipolar Stepper Motors With The PIC16F84

The bipolar motor I'm using is one salvaged from an old floppy drive. These motors typically have four wires. Each pair of wires controls the upper or lower portions of the motor. Panasonic manufactured the motor that I salvaged.

Another type of stepper motor is the unipolar which generally have 6 wires. These also have two coils but they are both center tapped. The center taps may be tied together. In these types, there will be 5 wires instead of 6.

Controlling the stepper means energizing the coils in there proper sequence causing the motor to step either forward or in reverse. Because you need to control the polarity of the coils independently, a transistor H-Bridge is utilized for each coil. The stepper I'm using has an 18 degree step but there are many different kinds of motors available with higher resolution steps. Having an 18 degree step means that I must step the motor 20 times for a complete revolution (360 degrees).
 

Forward Motion Backward Motion
Step# Q2-Q3 Q1-Q4 Q6-Q7 Q5-Q8
Step 1 ON OFF ON OFF
Step 2 OFF ON ON OFF
Step 3 OFF ON OFF ON
Step 4 ON OFF OFF ON
Step# Q2-Q3 Q1-Q4 Q6-Q7 Q5-Q8
Step 1 ON OFF OFF ON
Step 2 OFF ON OFF ON
Step 3 OFF ON ON OFF
Step 4 ON OFF ON OFF

The sequence is repeated from step 4 back to step1 to continue the stepping. You'll notice that the backward motion sequence is the forward sequence in reverse. Also, notice that the H-Bridge pairs Q1-Q4/Q2-Q3 and Q5-Q8/Q6-Q7 are either +/- (ON/OFF) or -/+ (OFF/ON).

When using the following schematic remember that different manufacturers may color the leads from the stepper motor differently than the Panasonic model that I used. However, all manufacturers have the same basic design. The motor is segmented into an upper half coil and lower half coil.


The current source on the PORTB pins is limited by the 1K resisters and will be about 2ma. The current consumption on the motor is much greater so use a 1A 7805 miniumum voltage regulator or better yet, a bench supply when testing this circuit for extended periods.

The PIC asm code is very simple and merely sends the proper sequences to PORTB with delays in between each step. The code repeatedly steps the motor 360 degrees forward and then 360 degrees backward ad. infinitum.


Keywords : Schematic, Circuit, Controlling, Bipolar, Stepper, Motors, PIC16F84, Programming, Asm
Writer : delon  |
14 Mar 2006 Tue   
|  23.688 Views
No Comments
Write Comment
Your Name
Email
You are writing as anonymous comment, if you are a member please login.