Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
71 views8 pages

Department of Electronics & Communication Course: Microcontroller Based System Design Course Code: ECE-358

The document describes the design of a robot that uses a microcontroller and stepper motors to move in a square path. It includes: 1) A block diagram and assembly code for an 8051 microcontroller that controls two stepper motors to move the robot forward, turn right, and repeat the sequence to form a square path over 4 minutes. 2) An explanation of how stepper motors work, noting that each electrical pulse rotates the shaft by a precise angle and multiple pulses are combined to control rotation speed and direction. 3) Diagrams showing how changing the current in a stepper motor's stator windings rotates its rotor in incremental steps as the motor's magnetic poles align with the

Uploaded by

Varun Singh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views8 pages

Department of Electronics & Communication Course: Microcontroller Based System Design Course Code: ECE-358

The document describes the design of a robot that uses a microcontroller and stepper motors to move in a square path. It includes: 1) A block diagram and assembly code for an 8051 microcontroller that controls two stepper motors to move the robot forward, turn right, and repeat the sequence to form a square path over 4 minutes. 2) An explanation of how stepper motors work, noting that each electrical pulse rotates the shaft by a precise angle and multiple pulses are combined to control rotation speed and direction. 3) Diagrams showing how changing the current in a stepper motor's stator windings rotates its rotor in incremental steps as the motor's magnetic poles align with the

Uploaded by

Varun Singh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 8

Department of Electronics & Communication

Course: Microcontroller Based System


Design
Course Code: ECE-358

Name :Ramanjeet Singh section a6801


Roll no 32

Q. Design a circuit and model diagram of a robot.

a) Robot should have differential drive of stepper motors to move on the surface.
b) Write an assembly language program for 8051 microcontroller.
Note: 1. Robot should move in a straight path for 1 min.
2. After 1 min robot should take the right turn and start moving in the same direction.
3. Again after 1 min it should take the right turn.
4. Robot should make the square path (See sketch diagram below).
c) One rotation of stepper motor should complete in 1 sec.
Block Diagram:

Source code:

ORG 00h

Stepper equ P1

Main:

acall Move_Straight

acall delay1

acall stop
acall wait

acall Move_RightTurn

acall stop

acall wait

acall Move_Straight

acall delay1

acall stop

acall wait

acall Move_RightTurn

acall stop

acall wait

acall Move_Straight

acall delay1

acall stop

acall wait

acall Move_RightTurn

acall stop

acall wait

acall Move_Straight

acall delay1

acall stop

Move_Straight:

mov Stepper, #9Ch

mov Stepper, #36h

mov Stepper, #63h

mov Stepper, #0C9h


ret

Move_RightTurn:

mov Stepper,#0CCh

mov Stepper,#66h

mov Stepper,#33h

mov Stepper,#99h

ret

stop:

mov Stepper,#00h

ret

delay1:

mov r4,#2

mov r3,#166

mov r2,#223

mov r1,#117

delay2:

djnz r1,delay2

djnz r2,delay2

djnz r3,delay2

djnz r4,delay2

ret

wait:

mov r1,#6

wait1:

djnz r1,wait1

ret
end

Stepper Motor Theory of Operation:

Stepper motors provide a means for precise positioning and speed control without the use of
feedback sensors. The basic operation of a stepper motor allows the shaft to move a precise
number of degrees each time a pulse of electricity is sent to the motor. Since the shaft of the motor
moves only the number of degrees that it was designed for when each pulse is delivered, you can
control the pulses that are sent and control the positioning and speed. The rotor of the motor
produces torque from the interaction between the magnetic field in the stator and rotor. The strength
of the magnetic fields is proportional to the amount of current sent to the stator and the number of
turns in the windings

The stepper motor uses the theory of operation for magnets to make the motor shaft turn a precise
distance when a pulse of electricity is provided. You learned previously that like poles of a magnet
repel and unlike poles attract. Figure 1 shows a typical cross-sectional view of the rotor and stator of
a stepper motor. From this diagram you can see that the stator (stationary winding) has eight poles,
and the rotor has six poles (three complete magnets). The rotor will require 24 pulses of electricity to
move the 24 steps to make one complete revolution. Another way to say this is that the rotor will
move precisely 15° for each pulse of electricity that the motor receives. The number of degrees the
rotor will turn when a pulse of electricity is delivered to the motor can be calculated by dividing the
number of degrees in one revolution of the shaft (360°) by the number of poles (north and south) in
the rotor. In this stepper motor 360° is divided by 24 to get 15°.
.

Diagram that shows the position of the six-pole rotor and eight-pole stator of a typical
stepper
motor.

When power is applied, it is directed to only one of the stator pairs of windings, which will cause that
winding pair to become a magnet. One of the coils for the pair will become the North Pole, and the
other will become the South Pole. When this occurs, the stator coil that is the North Pole will attract
the closest rotor tooth that has the opposite polarity, and the stator coil that is the South Pole will
attract the closest rotor tooth that has the opposite polarity. When current is flowing through these
poles, the rotor will now have a much stronger attraction to the stator winding, and the increased
torque is called holding torque. By changing the current flow to the next stator winding, the magnetic
field will be changed 45°. The rotor will only move 15° before its magnetic fields will again align with
the change in the stator field. The magnetic field in the stator is continually changed as the rotor
moves through the 24 steps to move a total of 360°. Figure 2 shows the position of the rotor
changing as the current supplied to the stator changes.
Movement of the stepper motor rotor as current is pulsed to the stator. (a) Current is applied
to the A and A’ windings, so the A winding is north, (b) Current is applied to B and B’
windings, so the B winding is north, (c) Current is applied to the C and C’ windings, so the C
winding is north, (d) Current is applied to the D and D’ windings so the D winding is north. (e)
Current is applied to the A and A’ windings, so the A’ winding is north.
In Fig. 2a you can see that when current is applied to the A and A’ stator windings, they will become
a magnet with the top part of the winding being the North Pole, and the bottom part of the winding
being the South Pole.You should notice that this will cause the rotor to move a small amount so that
one of its south poles is aligned with the north stator pole (at A), and the opposite end of the rotor
pole, which is the north pole, will align with the south pole of the stator (at A’). A line is placed on the
south-pole piece so that you can follow its movement as current is moved from one stator winding to
the next.

In Fig. 2b current has been turned off to the A and A” windings, and current is now applied to the
stator windings shown at the B and B’ sides of themotor. When this occurs, the stator winding at the
B’ position will have the polarity for the south pole of the stator magnet, and the winding at the B
position will have the north-pole polarity. In this condition, the next rotor pole that will be able to align
with the stator magnets is the next pole in the clockwise position to the previous pole. This means
that the rotor will only need to rotate 15° in the clockwise position for this set of poles to align itself so
that it attracts the stator poles.
In Fig. 2c you can see that the C and C’ stator windings are again energized, but this time the C
winding is the north pole of the magnetic field and the C’ winding is the south pole. This change in
magnetic field will cause the rotor to again move 15° in the clockwise position until its poles will align
with the C and C’ stator poles. You should notice that the original rotor pole that was labeled 1 now
moved three steps in the clockwise position.

In Fig.2d you can see that the D and D’ stator windings are energized, the winding at D position is
the north pole. This change in polarity will cause the rotor to move another 15° in the clockwise
direction. You should notice that the rotor has moved four steps of 15° each, which means the rotor
has moved a total of 60° from its original position. This can be verified by the position of the rotor
pole that has the line on it, which is now pointing at the stator winding that is located in the 2 o'clock
position.

In Fig.2e you can see that the A and A’ stator windings are energized, the winding at A position is
the south pole. This change in polarity will cause the rotor to move another 15° in the clockwise
direction. You should notice that the rotor has moved four steps of 15° each, which means the rotor
has moved a total of 75° from its original position. Thus the sequence of energizing ABCDA will
move the rotor in the clockwise direction. It can be easily verified that for the counter clockwise
direction the sequence should be ADCBA.

You might also like