Download MIT-240 Lab#5 - Optocouplers - Community College of Allegheny

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Ground (electricity) wikipedia , lookup

Relay wikipedia , lookup

Ohm's law wikipedia , lookup

Ground loop (electricity) wikipedia , lookup

Power inverter wikipedia , lookup

Islanding wikipedia , lookup

Stepper motor wikipedia , lookup

Electrical substation wikipedia , lookup

Flip-flop (electronics) wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Stray voltage wikipedia , lookup

Voltage optimisation wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Variable-frequency drive wikipedia , lookup

Mains electricity wikipedia , lookup

Surge protector wikipedia , lookup

TRIAC wikipedia , lookup

History of the transistor wikipedia , lookup

Rectifier wikipedia , lookup

Alternating current wikipedia , lookup

Power electronics wikipedia , lookup

Current source wikipedia , lookup

Voltage regulator wikipedia , lookup

P–n diode wikipedia , lookup

Power MOSFET wikipedia , lookup

Transistor wikipedia , lookup

Schmitt trigger wikipedia , lookup

Two-port network wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Buck converter wikipedia , lookup

Current mirror wikipedia , lookup

Opto-isolator wikipedia , lookup

Transcript
Community College of Allegheny County
Unit 5
Page #1
Optocouplers / OptoIsolators
"A bad engineer tries to get something to work. A good engineer
tries to get something not to work -- that is, after getting it
working, the good engineer tries to find its limits and make
sure they are well-understood and acceptable." - Michael
Covington
Revised: Dan Wolf, 3/27/2017
Community College of Allegheny County
Unit 5
Page #2
OBJECTIVES:
 Isolation via Optocouplers
 Types of Optocouplers, Photo-transistor & photodarlington
 Optocouplers for Motor Control
 Interfacing to Open-collector outputs
 Interfacing to digital “short to ground” inputs
DELIVERABLES THAT YOU MUST SUBMIT
1. Experiment #1 – Table #1
2. Experiment #2 – Table #2
3. Experiment #3 – Schematic and Table #3
On-Line Reading Material:
Required:
1. http://www.learningaboutelectronics.com/Articles/Optocouple
r-circuit.php
Optional:
INTRODUCTION TO OPTOCOUPLERS:
Optocouplers (also known as optoisolators) provide an isolated
galvanic barrier between the input and output utilizing infrared
light. On the input side (see Figure #1a and #1b), an infrared
light emitting diode is used. On the output, a wide variety of
actuators can be implemented, the most commonly known types use
transistor outputs. Other available outputs include TRIAC,
MOSFET, highspeed, photovoltaic, and photodiodes.
Optocouplers are commonly used if two separate circuits need to
be isolated from each other for safety or isolation reasons yet
one must controls the other. Additionally, they can be used to
suppress electrical noise effects and speed up development time.
Optocouplers are essential in circuit designs for isolation of
critical parts.
Community College of Allegheny County
Unit 5
Figure #1a – Infrared Isolation Examples
Example of a home-made Opto-Coupler:
Input-to Output Isolation
Page #3
Community College of Allegheny County
Unit 5
Figure #1b – Infrared Isolation Examples
Page #4
Community College of Allegheny County
Unit 5
Page #5
INTRODUCTION TO OPEN-COLLECTOR OUTPUTS:
See Figure #7. Some types of IC's have Open Collector
(Transistor) Outputs. This means there will no measurable
voltage on this type of pin without a pull up resistor between
the output pin and +V. The resistive value of the pull up is
chosen to suit the current/voltage sink current rating of the
devices output pin. Often the specified working voltage rating
of an open collector/drain can be a lot higher than the +Vdd
required by the device.
Examine the figure directly above which is used to directly
drive a load which requires a higher voltage. When the
transistor is OFF, the output is pulled high, no current flows,
and the load is OFF. When the transistor is ON, the opencollector pin goes low, current flows and the load is turned ON.
An alternate use is shown in the next figure which “levelshifts” an input that requires a higher voltage level (maybe a
3.3V digital output which must drive a +5V digital input). When
the transistor is OFF, the output is pulled high and the OUT
signal is high. When the transistor is ON, the open-collector
pin goes low, current flows and the OUT signal is low.
Community College of Allegheny County
Unit 5
Page #6
Experiment #1 – Opto-coupler Circuit:
1. Figure #3 shows a basic optocoupler circuit.
EQUIPMENT REQUIRED:
a. Misc. wire
b. LED and 470 Ω load resister
c. 4N25 Optocoupler
d. Switch and 470Ω resister
e. +5 and +12V Volt power supplies
1. Connect the circuit shown in Figure #3. The forward
voltage drop across the optocoupler input diode is 1.5V
maximum. The forward voltage drop across the optocoupler
collector-emitter junction is 0.5V maximum and the voltage
across the LED is 1.5Vmax. Draw your circuit then
calculate the expected current through the optocoupler
diode and transistor and update Table #1. Submit your
schematic and Table #1 as your documentation for this
experiment. Ask the instructor to help with these
calculations!
2. Ask the instructor to check the circuit before you apply
power! Test the circuit.
Table #1
Power
Supply
Optocoupler
Diode
Current
LED Current
5V
12V
Calculated
Current
R
470Ω
470Ω
Forward voltage
drop across the
diode = 1.5Vmax
Forward voltage
drops:
Across the C-E
junction = 0.5Vmax
and
Across the LED
junction = 2V
Community College of Allegheny County
Unit 5
Page #7
Experiment #2 – Optocoupled Motor Control
2. Figure #4a shows a motor control optocoupler circuit.
EQUIPMENT REQUIRED:
f. Misc. wire
g. DC Motor
h. 4N25 Optocoupler
i. 220Ω resister and 2N2222 transistor
j. 1000Ω resister
k. +5 and +12V Volt power supplies
3. Connect the circuit shown in Figure #4a but you will have
to add a switch to the input. Draw your circuit then
calculate the expected current through the optocoupler
diode, the optocoupler transistor, and the 2N2222
transistor then update Table #2. Submit your schematic and
Table #2 as your documentation for this experiment. Ask
the instructor to help with these calculations!
4. Ask the instructor to check the circuit before you apply
power! Test the circuit.
Table #2
Power
Supply
Optocoupler
Diode
Current
Optocoupler
C-E
Transistor
Current
R
12V
Forward voltage
1000 Ω drop across the
diode = 1.5Vmax
5V
Forward voltage
drops:
Across the C-E
R2=220 junction = 0.5V
Ω
and
Across the
2N2222 B-E
junction = 1.5V
Imax_2N2222_CE =
Maximum
2N2222 C-E
current
5V
Optocoupler C-E
Transistor Current
* Gain2N2222
Calculated
Current
Actual
Current
Community College of Allegheny County
Unit 5
Page #8
Experiment #3 – DIGITAL “SHORT TO GROUND” INPUTS
Figure #5a shows a type of digital input that is activated when
it is shorted to ground. When left unconnected, the input is
internally pulled to a high state (+5V) by R2. When the input
is shorted to ground, the input is pulled to ground through R1.
The +5V zener and R1 together provide protection if the input
voltage ever exceeds +5.1V.
Figure #5b shows the same input being controlled by a
conventional digital output (0 or +3.3V) that uses a transistor
to perform the level shifting necessary to short the ScorBot
input. Note that a logic high (+3V) at the camera output will
result in a logic low (shorted) at the Scorbot input.
1. Assume that you have a N.O. switch that controls +12V (on
or off). Design a relay circuit which will control the
Scorbot input when the switch is pressed. Label each
component and include Table #3. Turn it in as part of this
lab assignment.
Switch
Open/
closed
Relay Coil
(energized/
deenergized)
Table #3 – Signal Flow
Relay NO
Relay NC
contacts
contacts
Open/closed
Open/closed
ScorBot
Input
High/low
Open
Closed
Optional Experiment #1 – DIGITAL Isolator
Download the datasheet for the HCPL-0900-000E Digital Isolator
from the course website. Design a schematic that interfaces a
SPST switch to the input and an LED or small motor to the
output.
Community College of Allegheny County
Unit 5
Page #9
Figure 2 – The 4N35 Optocoupler
Figure 3 – Optocoupler Basic Circuit Example
Community College of Allegheny County
Unit 5
Figure 4a – Motor Drive Circuits
Figure 4b – Optocoupled Level-Shifter
Page #10
Community College of Allegheny County
Unit 5
Page #11
Figure 5a – Digital “short-to-ground” inputs
ScorBot
+5 V
Input
R2=100k
R1=2k
Shorting these out will
provide a low input state
and not shorted will
provide a high input state.
5.1 V
Figure 5b – Digital “short-to-ground” inputs
ScorBot
+5 V
R2=100
k
Pixy Camera
R1=2k
Input 0
330 ohm
Pin 1
0 to 3.3V
5.1 V
2N2222
Pin 6,8,10
Gnd
Community College of Allegheny County
Unit 5
Page #12
PRACTICE PROBLEMS:
1. Design a circuit that allows a 5volt digital signal interfaced
to an opto-coupler which will energize a +12Volt / 75mA relay
coil. The relay contacts are DPDT and should turn on a
120volt motor when the relay is NOT energized. The maximum
output current for the digital output must not exceed 40mA.
2. For the circuit above, show the calculations for the LED
current limiting resister.
3. Design a circuit where a digital output turns on an LED when
the digital output is low (0volts).
4. Design a circuit that uses SPDT relay contacts to apply either
+5volt or 0volts to a digital input. The digital input does
not have internal pull-up or pull-down resisters so it must
not be allowed to be in a “floating” state.