Stepper motor interfacing
description
Transcript of Stepper motor interfacing
![Page 1: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/1.jpg)
1LAKSHMI.B.E.
![Page 2: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/2.jpg)
Full step -clock
2LAKSHMI.B.E.
![Page 3: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/3.jpg)
Full step –anti clock
3LAKSHMI.B.E.
![Page 4: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/4.jpg)
4LAKSHMI.B.E.
![Page 5: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/5.jpg)
5LAKSHMI.B.E.
![Page 6: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/6.jpg)
ULN 2003SEVEN DARLINGTONS PER PACKAGEOUTPUT CURRENT 500mA PER DRIVER( 600mA
PEAK) OUTPUT VOLTAGE 50VINTEGRATED SUPPRESSION DIODES FOR
INDUCTIVE LOADSOUTPUTS CAN BE PARALLELED FORHIGHER
CURRENT TTL/CMOS/PMOS/DTL COMPATIBLE INPUTS INPUTS PINNED OPPOSITE OUTPUTS TO
SIMPLIFY LAYOUT6LAKSHMI.B.E.
![Page 7: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/7.jpg)
7LAKSHMI.B.E.
![Page 8: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/8.jpg)
8LAKSHMI.B.E.
![Page 9: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/9.jpg)
9LAKSHMI.B.E.
![Page 10: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/10.jpg)
ULN 2803
10LAKSHMI.B.E.
![Page 11: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/11.jpg)
11LAKSHMI.B.E.
![Page 12: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/12.jpg)
12LAKSHMI.B.E.
![Page 13: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/13.jpg)
How to Driving the Relay:Digitals system and microcontroller pins are
couldn’t produce sufficient current to drive the relay.
While relay’s coil’s need 10mA current to be energized. But the microcontroller pin provide a maximum 1-2mA current
For these reason, we place a driver (or) power transistor in between the micro controller and relay
13LAKSHMI.B.E.
![Page 14: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/14.jpg)
DRIVE CIRCUIT:
14LAKSHMI.B.E.
![Page 15: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/15.jpg)
15LAKSHMI.B.E.
![Page 16: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/16.jpg)
INTERFACING WITH OPTOCOUPLER
16LAKSHMI.B.E.
![Page 17: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/17.jpg)
Opto isolator is otherwise called as opto coupler. It isolates two parts of a system.
In an example for driving a motor, the motor can produces back emf.
Back emf is a high voltage spike produced by a sudden change of current.
In ordinary circuits, the unwanted spike voltage is reduced by using decoupling capacitors.
In any systems, that have inductors (coil windings), such as motors, decoupling capacitor or a diode will not reduce the spike voltages. In such cases, opto isolators can be used.
17LAKSHMI.B.E.
![Page 18: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/18.jpg)
An opto isolator has an LED transmitter and a photo sensor receiver, both are separated from each other by a small gap.
When current flows through the LED, it transmits a light signal to the receiver.
The receiver produces the signal with the same phase but a different current and amplitude.
The opto isolator comes in a small IC Package with four or more pins. There are also packages that contain more than one opto isolator. When placing an opto isolator between two circuits, we must use two separate voltage sources, one for each side
18LAKSHMI.B.E.
![Page 19: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/19.jpg)
IL 74SINGLE CHANNEL
19LAKSHMI.B.E.
![Page 20: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/20.jpg)
ILD 74 ILQ74
20LAKSHMI.B.E.
![Page 21: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/21.jpg)
21LAKSHMI.B.E.
![Page 22: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/22.jpg)
22LAKSHMI.B.E.
![Page 23: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/23.jpg)
7 segment displays
23LAKSHMI.B.E.
![Page 24: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/24.jpg)
CONFIGURATION
24LAKSHMI.B.E.
![Page 25: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/25.jpg)
COMMON ANODENEGATIVE LOGIC
25LAKSHMI.B.E.
![Page 26: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/26.jpg)
PIN DIAGRAM
+5V SUPPLY 26LAKSHMI.B.E.
![Page 27: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/27.jpg)
CODES
27LAKSHMI.B.E.
![Page 28: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/28.jpg)
CONNECTION DIAGRAM
28LAKSHMI.B.E.
![Page 29: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/29.jpg)
SINGLE DIGIT0 DISPLAY PROGRAMORG 0H
START:MOV P1,#11000000BACALL DELAYSJMP START DELAY:MOV R1,#255DELAY1:MOV R2,#255DELAY2:DJNZ R2,DELAY2DJNZ R1,DELAY1
RETEND
29LAKSHMI.B.E.
![Page 30: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/30.jpg)
Program Using Rotate Instruction
ORG 0HMOV A,#11111110B
START: RL AMOV P1,AACALL DELAYSJMP START DELAY:MOV R1,#255DELAY1:MOV R2,#255DELAY2:DJNZ R2,DELAY2DJNZ R1,DELAY1RETEND
30LAKSHMI.B.E.
![Page 31: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/31.jpg)
RELATED INSTRUCTIONS AND REGISTERREGISTER NAME:DPTRThe Data Pointer (DPTR) is the 8051’s only
user-accessible 16-bit (2-byte) register. The Accumulator, "R" registers, and "B" register are all 1-byte values.
31LAKSHMI.B.E.
![Page 32: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/32.jpg)
INSTRUCTIONDB DEFINE BYTE DIRECTIVES
32LAKSHMI.B.E.
![Page 33: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/33.jpg)
PROGRAM USING LOOK UP TABLEORG 0H
MOV R0,#10
MOV DPTR,#SEG
START :CLR A
MOVC A,@A+DPTR
MOV P3,A
ACALL DELAY
INC DPTR
DJNZ R2,START
DELAY:……………
RET
ORG 400H
SEG:DB 0c0h,0f9h,0a4h,0b0h,99h,
92h,82h,0f8h, 80h,90h
END
33LAKSHMI.B.E.
![Page 34: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/34.jpg)
INTERFACING 7SEG WITH DECODER
34LAKSHMI.B.E.
![Page 35: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/35.jpg)
7-SEGMENT WITH DECODER USING LOOKUP TABLE
org 0hagain:mov a,#0hmov r0,#0hbranch:mov a,r0mov dptr,#400hmovc a,@a+dptrmov p2,ainc r0acall delaycjne r0,#10h, branch ljmp again
35LAKSHMI.B.E.
![Page 36: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/36.jpg)
delay:mov r1,#255delay1:mov r2,#255delay2:djnz r3,delay2djnz r2,delay1ret org 400hdecodercode:db0,1,2,3,4,5,6,7,8,9end
36LAKSHMI.B.E.
![Page 37: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/37.jpg)
MULTIPLEXING
37LAKSHMI.B.E.
![Page 38: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/38.jpg)
7-SEGMENT MUTLIPLEXING AND SWITCH (Binary Inputs 0-255)ORG 0HMOV P1,#0FFHLOOP:MOV A,P1MOV B,#100DIV ABORL A,#010000000BMOV R0,AMOV A,BMOV B,#10DIV ABORL A,#00100000BMOV R1,AMOV A,B
38LAKSHMI.B.E.
![Page 39: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/39.jpg)
ORL A,#00010000B
MOV P3,A
ACALL DELAY
MOV P3,R1
ACALL DELAY
MOV P3,R0
ACALL DELAY
SJMP LOOP
DELAY:MOV R4,#2
REPEAT:MOV R3,#230
REPEAT1:DJNZ R5, REPEAT1
DJNZ R4, REPEAT
RET
END
39LAKSHMI.B.E.
![Page 40: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/40.jpg)
40LAKSHMI.B.E.
![Page 41: Stepper motor interfacing](https://reader034.fdocuments.in/reader034/viewer/2022050700/56814e86550346895dbc21ee/html5/thumbnails/41.jpg)
The End
LAKSHMI.B.E. 41