Вы находитесь на странице: 1из 36

Chapter 8

Digital and Analog


Interfacing Methods
Lesson 8

Opto-Isolator, Coil, Relay,


Speaker, Music Play box and
Stepper Motor Interfaces

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Outline
• Optical Isolation
• Opto-isolator circuit
• coil and relay interface circuits
• Loudspeaker Interface
• Music Play Box
• Stepper Motor
Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Optical Isolation - Protection
and Isolation
• (1) Transient surges
•(2) Larger Signal inputs (For
example, ~ 30V)
(3) Mistakes like an input
shorted to the power line (220V
or 110V)
Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Optical Isolation - Protection
and Isolation
• (4) Large Input Offsets, for
example 440V

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Outline
• Optical Isolation
• Opto-isolator circuit
• coil and relay interface circuits
• Loudspeaker Interface
• Music Play Box
• Stepper Motor
Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Opto-isolator

•A Sealed LED -Phototransistor


pair

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
IR
transparent
+5V capsule
P R Rc

C
Port bit
1 or 0 N E
Optical Isolation > 4 kV

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Outline
• Optical Isolation
• Opto-isolator circuit
• coil and relay interface circuits
• Loudspeaker Interface
• Music Play Box
• Stepper Motor

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Coil Interface applications
examples
(i) a magnetic field generating
solenoid coil, for example in an
LVDT,
(ii) a relay,
(iii) a loudspeaker and
(iv) a coil of stepper motor
Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
+5V +24/12V
C R +12
P c
Opto- V
Isolator
N
E
Port bit Rb
1 or 0
GND

Coil Interface Circuit


Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
+5V +24/12V
C R +12
P c
Opto- V NC
Isolator
N
E
Port bit Rb
1 or 0
GND

Relay Interface Circuit


Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Outline
• Optical Isolation
• Opto-isolator circuit
• coil and relay interface circuits
• Loudspeaker Interface
• Music Play Box
• Stepper Motor

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
+5V +12V
C R
P c
Opto-
Isolator
N
E
Port bit Rb
1 or 0
GND

Loudspeaker Interface Circuit


Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Outline

• Optical Isolation
• Opto-isolator circuit
• coil and relay interface circuits
• Loudspeaker Interface
• Music Play Box
• Stepper Motor
Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Music Play Box
P3.7
SL0-3
P1.7 GND +12
- RL0- V
8051 RL2
P1.0
P3.6-.5 shift

Mode
select
Key Array
Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Music Play Box two interfaces

• one for the keypad and


• other for the speaker

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Keypad Interface

Software for the keypad can be


designed to work in various modes

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Keypad Interface Modes

•Mode 1 musician mode


•Mode 2 stored music playing mode
•Mode 3 to define the note durations
and generate the tunes for the
different type of the musical
instruments using the same interface
Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Speaker Interface

•Loudspeaker Coil Interface

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Low Power Speaker

P3.7

GND +12
V

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Outline

• Optical Isolation
• Opto-isolator circuit
• coil and relay interface circuits
• Loudspeaker Interface
• Music Play Box
• Stepper Motor

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Stepper Motor Interface
12V
12V

8051

12V
12V
Figure 8.18
full circuit
Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Stepper Motor(s) Applications

•Printer
•Drive
•Robot

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Stepper Motor

•one step- A motor step angle


example- 1.8°
•half step at an instance.
.

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Four Pole Stepper Motor

•Four Coils A, B, C and D, cyclically


fed current for one steps at a time
rotation
• Pair of Coils cyclically fed current
for one steps at a time rotation

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Stepper Motor Mode 1

•A, B, C, and D given the current


cyclically at the successive instances
T0, T1, T2,....to rotate in one
direction
•Programming Example 8.9

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Stepper Motor Mode 2

•Stepper Coils A, B, C, and D given


the current cyclically at the
successive instances T0, T1, T2,....to
rotate in another direction
•Programming Example 8.10

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Four Stepper Motors Circuit

•Refer Figure 8.20

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Summary

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Opto-isolator
•• Protects
Protectsand
andIsolates
Isolates
•• Encapsulated
EncapsulatedLED-PT
LED-PTpair
pair

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Coil Circuits
• Uses Reverse biased diode
across coil
• Darlington Transistor Pair for
High coil Currents
• Invertors-buffers and transistor
for low coil Currents

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Music Play Box
• Mode select keys and play keys
• Speaker Interface
• Key-array Interface

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
Stepper Motor

• Four Coils,each coil interfaces


to a port bit

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
End of Lesson 8

Opto-Isolator, Coil, Relay,


Speaker, Music Play box and
Stepper Motor Interfaces

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005
THANK YOU

Ch07L8 -"Microcontrollers.........",
Raj Kamal, Pearson Education, 2005

Вам также может понравиться