Sie sind auf Seite 1von 11

PicKit projects 3 of 3

By
Ibrahim N. Tansel
Example 5 Stepping motor
Goal:

Rotate a stepping motor


Example 5 Stepping motor + 5V
1. Properly connect the stepping A Coil B
motor to the circuit

A. Connect the center tap of C D


the connected coils to + 5V

+ 5V
B. Connect the end of the RC0 A
coils to the ground through Darlington
array chip (2803). Let the RC0, RC1, RC1 C
RC2 and RC3 control the Darlington RC2 B
array chip to connect the coil ends to
the ground.
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, E, B has no connection to C, F and D


Example 5 Stepping motor
2. Let the microcontroller control the Darlington array to connect the ends of coils to the
ground with proper order

TRISC=0x00 'define outputs - 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. 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
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.
Connect the stepping motor to the Darlington array. Run the program.

Darlington array

PicKit
demo
Stepping
board
motor
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.

Dont forget to connect


the +5V and Ground
connections
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 use only 1 or 2 or 3, you cannot make
the motor turn smoothly.

You have to check the specs of your stepping motor. Rotation for each step is given. Assume that each step is 6
degrees according to the specs. 360/6=60 step will be needed for one rotation. 60/4=15 times 4 step (our 4
instructions and delays) are needed.

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

Das könnte Ihnen auch gefallen