Download presentation
Presentation is loading. Please wait.
Published byJanis Johnson Modified over 9 years ago
1
KyungHee Univ. 2-0 Chapter 8 Parallel Port Interfaces
2
KyungHee Univ. 2-1 8.4 Transistors Used for Computer-Controlled Current Switches 전류 제어 Switch(BJT)
3
KyungHee Univ. 2-2 8.4 Transistors Used for Computer-Controlled Current Switches
4
KyungHee Univ. 2-3 8.4 Transistors Used for Computer-Controlled Current Switches
5
KyungHee Univ. 2-4 8.5 Computer-Controlled Relays, Solenoids, and DC Motors 8.5.1 Introduction to Relays
6
KyungHee Univ. 2-5 8.5.1 Introduction to Relays 제어 회로와 다른 전원으로 구동하는 Relay 의 예
7
KyungHee Univ. 2-6 8.5.1 Introduction to Relays
8
KyungHee Univ. 2-7 8.5.2 Electromagnetic Relays Basics
9
KyungHee Univ. 2-8 8.5.2 Electromagnetic Relays Basics
10
KyungHee Univ. 2-9 8.5.2 Electromagnetic Relays Basics
11
KyungHee Univ. 2-10 8.5.3 reed Relays
12
KyungHee Univ. 2-11 8.5.4 Solenoids
13
KyungHee Univ. 2-12 8.5.4 Solenoids
14
KyungHee Univ. 2-13 8.5.5 Pulse-Width Modulated DC Motors DC 모터의 속도 제어 ( 모터에 가해지는 실효 전력을 제어 함 ) 를 위하여 펄스 폭 변조 기술을 사용 한다.
15
KyungHee Univ. 2-14 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
16
KyungHee Univ. 2-15 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors DiodeMaximum voltage (V) 1N400150 1N91475 1N4002100 1N4003200 1N4004400 1N4005600 1N4006800 1N40071000 Table 8.12 Maximum voltage parameter for typical snubber diodes
17
KyungHee Univ. 2-16 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
18
KyungHee Univ. 2-17 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
19
KyungHee Univ. 2-18 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
20
KyungHee Univ. 2-19 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
21
KyungHee Univ. 2-20 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
22
KyungHee Univ. 2-21 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
23
KyungHee Univ. 2-22 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
24
KyungHee Univ. 2-23 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
25
KyungHee Univ. 2-24 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
26
KyungHee Univ. 2-25 8.5.6 Interfacing EM Relays, Solenoids, and DC Motors
27
KyungHee Univ. DC Motor and Stepper Controller Current Motor Supply Logic Current Sensing Voltage Enable Supply Enable Sensing A Out Out Vs In A In GND Vs In B In Out Out B 1 2 1 2 3 4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 GND Dir1 En1 Dir2 En2 Vcc In Put Control Signal Connector +Vout 1 Motor 1 -Vout1 +Vout 2 Motor 2 -Vout2 Vs Supply Voltage GND +-+- 470uF 35V 104 1+1+ 1+1+ 2 4 33 4 2 Vs 2W06 L298N 2 7414 1 4 7414 3 Vs Supply Voltage GND
28
Dual Full-Bridge Driver L298 High voltage : 46V high current : 4A Dual full-bridge driver Accept standard TTL logic levels Drive inductive loads such as Relays, Solenoids, DC and, Stepping motors KyungHee Univ. 2-27
29
L289 Block Diagram KyungHee Univ. 2-28 M M
30
KyungHee Univ. 2-29 8.5.7 Solid-State Relays
31
KyungHee Univ. 2-30 8.5.7 Solid-State Relays
32
KyungHee Univ. 2-31 8.5.7 Solid-State Relays
33
KyungHee Univ. 2-32 8.6 Stepper Motors
34
KyungHee Univ. 2-33 8.6.1 Stepper Motors Example
35
KyungHee Univ. 2-34 8.6.1 Stepper Motors Example PORTB Output AA’A’BB’B’ 10ActivateDeactivateActivateDeactivate 9ActivateDeactivate Activate 5DeactivateActivateDeactivateActivate 6DeactivateActivate Deactivate Table 8.13 Stepper motor sequence
36
KyungHee Univ. 2-35 8.6.1 Stepper Motors Example
37
KyungHee Univ. 2-36 Program 8.24. A double circular linked list used to control the stepper motor. // 6811 or 6812 const struct State{ unsigned char Out; // Output const struct State *Next[2]; // CW/CCW }; typedef struct State StateType; typedef StateType *StatePtr; #define clockwise 0 // Next index #define counterclockwise 1 // Next index StateType fsm[4]={ {10,{&fsm[1],&fsm[3]}}, { 9,{&fsm[2],&fsm[0]}}, { 5,{&fsm[3],&fsm[1]}}, { 6,{&fsm[0],&fsm[2]}} }; unsigned char Pos; // between 0 and 199 StatePtr Pt; // Current State
38
KyungHee Univ. 2-37 Program 8.25. Helper functions used to control the stepper motor. // 6811 or 6812 // Move 1.8 degrees clockwise void CW(void){ Pt = Pt->Next[clockwise]; // circular PORTB = Pt->Out; // step motor if(Pos==199){ // shaft angle Pos = 0; // reset } else{ Pos++; // CW } // Move 1.8 degrees counterclockwise void CCW(void){ Pt = Pt->Next[counterclockwise PORTB = Pt->Out; // step motor if(Pos==0){ // shaft angle Pos = 199; // reset } else{ Pos--; // CCW } // Initialize Stepper interface void Init(void){ Pos = 0; Pt = &fsm[0]; DDRB = 0xFF; // 6812 only }
39
KyungHee Univ. 2-38 Program 8.26. High-level function to control the stepper motor. // 6811 or 6812 void Seek(unsigned char desired){ short CWsteps; if((CWsteps=desired-Pos)<0){ CWsteps+=200; } // CW steps is 0 to 199 if(CWsteps>100){ while(desired<>Pos){ CCW(); } else{ while(desired<>Pos){ CW(); }
40
KyungHee Univ. 2-39 8.6.2 Basic Operation
41
KyungHee Univ. 2-40 8.6.2 Basic Operation
42
KyungHee Univ. 2-41 8.6.2 Basic Operation
43
KyungHee Univ. 2-42 8.6.2 Basic Operation
44
KyungHee Univ. 2-43 8.6.2 Basic Operation
45
KyungHee Univ. 2-44 8.6.2 Basic Operation
46
KyungHee Univ. 2-45 8.6.2 Basic Operation
47
KyungHee Univ. 2-46 8.6.2 Basic Operation
48
KyungHee Univ. 2-47 8.6.3 Stepper Motor Hardware Interface
49
KyungHee Univ. 2-48 8.6.3 Stepper Motor Hardware Interface
50
KyungHee Univ. 2-49 8.6.3 Stepper Motor Hardware Interface
51
KyungHee Univ. 2-50 8.6.3 Stepper Motor Hardware Interface
52
KyungHee Univ. 2-51 8.6.4 Stepper Motor Shaft Encoder
53
KyungHee Univ. 2-52 8.6.4 Stepper Motor Shaft Encoder
54
KyungHee Univ. 2-53 8.6.4 Stepper Motor Shaft Encoder
55
KyungHee Univ. 2-54
56
KyungHee Univ. 2-55
57
KyungHee Univ. 2-56
58
KyungHee Univ. 2-57
59
KyungHee Univ. 2-58
60
KyungHee Univ. 2-59
61
KyungHee Univ. 2-60
62
KyungHee Univ. 2-61
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.