You are on page 1of 11

# PicKit projects 3 of 3

By
Ibrahim N. Tansel

Example 5 – Stepping motor Goal: Rotate a stepping motor .

RC1. RC1 C RC2 and RC3 control the Darlington RC2 B array chip to connect the coil ends to the ground.Example 5 – Stepping motor + 5V 1. Let the RC0. Properly connect the stepping A Coil B motor to the circuit A. Connect the end of the RC0 A coils to the ground through Darlington array chip (2803). Connect the center tap of C D the connected coils to + 5V + 5V B. RC3 D Ground .

Example 5 – Stepping motor When you apply +5V to any of the left RC0 A pin of the Darlington array chip +5V RC1 C RC2 B RC3 D Ground The corresponding leg on the right side RC0 A is connected to the ground +5V RC1 C RC2 B RC3 D Ground .

Example 5 – Stepping motor E How you identify the ends of the A Coil B stepping motor with a multimeter? C D First find E and F The resistance of AE and EB are R ohm F while the resistance of AB is 2R ohm The resistance of CF and FD are R ohm While the resistance of CD is 2R ohm A. B has no connection to C. F and D . E.

Let the microcontroller control the Darlington array to connect the ends of coils to the ground with proper order TRISC=0x00 'define outputs . Obtains better delay_ms(100) torque PORTC=0x0c ' Sending 1100 delay_ms(100) PORTC=0x09 ' Sending 1001 delay_ms(100) goto tida end.Example 5 – Stepping motor 2.All port C pins are output now tida: ' this is the sequence code PORTC=0x03 ' Sending 0011 delay_ms(100) Fires two coils at the same PORTC=0x06 ' Sending 0110 time. .

Example 5 – Stepping motor When coils of the stator are magnetized the permanent magnet based rotor rotates properly Coil A Red indicates the magnetized coils by Coil C Coil D applying voltage Rotor Coil B Coil A and B are connected together Coil C and D are connected together .

Example 5 – Stepping motor When coils of the stator are magnetized the permanent magnet based rotor rotates properly .

Example 5 – Stepping motor Connect the PicKit demo board to the Darlington array which is attached to the breadboard. Darlington array PicKit demo Stepping board motor . Connect the stepping motor to the Darlington array. Run the program.

Example 5 – Stepping motor Connect the PicKit demo board to the Darlington array which is attached to the breadboard. Connect the stepping motor to the Darlington array. Run the program. Don’t forget to connect the +5V and Ground connections .

you cannot make the motor turn smoothly.Hint – Controlling stepping motor rotation How can you make a full stepping motor rotation? You have to use the 4 steps (at the example 5) all the time in order. If you make a for loop for I = 1 to 15 Four steps (8 instruction with delays) Next I Above instructions will let you complete one revolution . You have to check the specs of your stepping motor. If you use only 1 or 2 or 3. Rotation for each step is given. 60/4=15 times 4 step (our 4 instructions and delays) are needed. Assume that each step is 6 degrees according to the specs. 360/6=60 step will be needed for one rotation.