419408_634124997373765000 (1)

18

Upload: tejaswini-skumar

Post on 06-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 1/18

Page 2: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 2/18

8255 -PPI

Programmable Peripheral Interface

Page 3: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 3/18

• Functional configuration of each port is

controlled by the command word.• Control Word Register can only be written

into, no read operation is allowed.

• 8255 offers 3 modes – Mode 0 – Basic I/O

 – Mode 1 – Strobed I/O

 – Mode 2 – 

Strobed bidirectional I/O

• 24 I/O lines organized as 3-ports having 8 I/O

lines each

Page 4: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 4/18

8255 MODE INSTRUCTION FORMAT

PORT C (UPPER)1- Input

0- Output

PORT A

1- Input

0- Output

Mode select

0 0 - Mode 0

01  – Mode 1

1X  – Mode 2

Mode set

1  – Active

PORT B

1- Input

0- Output

PORT C LOWER)1- Input

0- Output

Mode select0 - Mode 01  – Mode 1

Page 5: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 5/18

STEPPER MOTOR• Rotor able to assume discrete stationary angular positions.

• Rotor motion in stepwise-manner from one equilibriumposition to the next.

• Two types of Stepper-Motor.

 – Reluctance type

 – Permanent Magnet type (PM).

• PM type consists of multiphased stator and two part

permanent magnet rotor.

• Two phase stepper-motor consists of two pairs of stator poles

• Each of 4 poles has its own windings.

• Excitation generates N & S poles at diametrically opposite

side.

Page 6: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 6/18

NS

N

S

N

S

NN

S

S

Stepper-Motor Cross-sectional view

N

NN S

SS

Front-ViewRear-View

Page 7: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 7/18

• Ns is no. of stator poles

• Nr is no. of pairs of rotor poles

3-Schemes for “Stepping” a stepper-Motor1. Wave Scheme.

2. 2-Phase Scheme.

3. Half-Stepping or Mixed Scheme.

Page 8: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 8/18

Energizing of Coils in 4-Pole Stepper-

Motor

Page 9: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 9/18

Wave SchemeN-Pole

S-Pole

Page 10: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 10/18

• A single phase is activated at a time.

• The same number of steps as the full step drive, but the

motor will have significantly less than rated torque. It is rarely

used.

• 30o for each step.

Anticlockwise Clockwise

Step A1 A2 B1 B2 Step A1 A2 B1 B2

1 1 0 0 0 1 1 0 0 02 0 0 0 1 2 0 0 1 0

3 0 1 0 0 3 0 1 0 0

4 0 0 1 0 4 0 0 0 1

Wave Scheme

Page 11: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 11/18

2-Phase Scheme

• step angle is 30o but is offset by 15o in the two-phase scheme.

• 12 steps required to move rotor 360o.

Anticlockwise Clockwise

Step A1 A2 B1 B2 Step A1 A2 B1 B2

1 1 0 0 1 1 1 0 1 0

2 0 1 0 1 2 0 1 1 0

3 0 1 1 0 3 0 1 0 1

4 1 0 1 0 4 1 0 0 1

N-Pole

S-Pole

Page 12: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 12/18

Stepper Motor Wiring

• Most stepper motors have 6 wires,

however there are motors with 4, 5, or 8

wires also.

• Each of the four coils is made up of one

length of wire with two ends.

• One end is called live and the other end

is called common.

• In a five-wire stepper motor all

four commons are joined together, in a

six-wire stepper motor two pairs

of common wires are joined together, and

in an eight-wire stepper motor none of 

the four common wires are joined

Page 13: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 13/18

Programming a Stepper

Basics• VLIM-013A supports Stepper motor interface.

• Board consists of 3-parts

1. Address decoding.

2. Stepper-Motor driving circuitry.

3. Operating voltage selections.

8255 PPI0C  – Port A0D  – Port B0E  – Port C0F  – Control

Register

TIP 122Darlington pair used

According totorque range

from 2Kg -20Kg12V, 24V, & 6V

Page 14: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 14/18

1050:

Software ExperimentsTo run a stepper motor at different speeds

MOV AL, 80H

OUT 0026H, AL

L3: MOV SI,1050H

MOV BL, 04HL2: MOV AL,[SI]

OUT 0020H, AL

CALL L1

INC SI

DEC BL

JNZ L2JMP L3

L1: MOV CX, 0A03

L4: DEC CX

JNZ L4

RET

09H

05H

06H

0AH

INPUT

Page 15: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 15/18

To run a stepper motor for required angle within 460o which is

equivalent to 256 steps

MOV AL, 80H

OUT 0026H, AL

MOV CL, 064

L1: MOV SI, 1200H

MOV BL, 04L2: MOV AL,[SI]

OUT 20, AL

DEC CL

JZ L4

MOV DX, 0505

L3: DEC DXJNZ L3

INC SI

DEC BL

JNZ L2

JMP L1

L4: HLT

1200: 09H

05H

06H

0AH

INPUT

Page 16: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 16/18

To rotate the motor in both forward and reverse direction

MOV AL, 80H

OUT 0026H, AL

L1: MOV CL, 050

FWD: MOV SI, 1200H

CALL ROTATE

DEC CLJNZ FWD

CALL DELAY

MOV CL, 050

REV: MOV SI, 1300H

CALL ROTATE

DEC CLJNZ REV

CALL DELAY

JMP L1

ROTATE: MOV BL,04

L2: MOV AL, [SI]

OUT 0020,AL

MOV DX, 0505L3: DEC DX

JNZ L3

INC SI

DEC BL

JNZ L2

RET

DELAY: MOV DX, 0FFF

L4: DEC DX

JNZ L4

RET

Page 17: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 17/18

1200: 09H 05H 06H 0AH

INPUT

1300: 0AH 06H 05H 09H

Page 18: 419408_634124997373765000 (1)

8/2/2019 419408_634124997373765000 (1)

http://slidepdf.com/reader/full/419408634124997373765000-1 18/18