Optocoupler diagram
1 is positive
2 is negative
3 is the emitter
4 is the collector
The interior of the optocoupler is composed of a light-emitting diode and a phototransistor. When the light-emitting diode emits light, if the light intensity meets the requirements, the phototransistor will be turned on. It mainly plays the role of signal isolation, which can be understood as the input and output of 0 and 1.
See the data sheet for details:
R= (Vs−Vf) / If
R: Required resistor value (in ohms)
Vs: Supply voltage (in volts)
Vf: Forward voltage drop of the LED (in volts, from the datasheet)
If: Desired forward current of the LED (in amperes, from the datasheet)
Among them, If is the maximum allowable forward current of the light-emitting diode value is 80mA. This is the first condition to be considered.
A. Vf is the voltage on the diode, when If is 20mA, the maximum value of Vf is 1.4V. This is the second condition to be considered.
B. The third condition we need to consider is, are you driving with 3.3V? Or drive with 5V?
C. If you are using a 3.3V voltage driver, the minimum current limiting resistor is (3.3V-1.4V)/0.08A=23.75 ohms…
D. If you are using a 5V voltage driver, the smallest current limiting resistor is (5V-1.4V)/0.08A=45 ohms…
E. Less than this resistance value, the optocoupler will be damaged.
Therefore, our resistor selection here is greater than these calculated results. Here, you can choose 330 ohms, 470 ohms, 510 ohms, 1K, all of which can make the light-emitting diode light up and drive the triode inside it to conduct. However, if the resistance value is too large, the LED will not light up.
application circuit of optocoupler
1. Use a multimeter to judge whether it is good or bad, disconnect the power supply at the input end, and use the R×1k gear to measure the resistance of pins 1 and 2. The forward resistance is several hundred ohms, the reverse resistance is tens of thousands of ohms, and the resistance between pins 3 and 4 should be infinite. .
2. Any group between pins 1 and 2 and pins 3 and 4 has infinite resistance. After the input terminal is powered on, the resistance of pins 3 and 4 is very small. Adjusting RP, the resistance between pins 3 and 4 changes, indicating that the device is good.
Note: R×10k file cannot be used, otherwise the launch tube will be broken down.
3. Simple test circuit, when the power is turned on, the LED does not emit light, press SB, the LED will emit light, and the luminous intensity of RP and LED will change, indicating that the photocoupler under test is good.
The optocoupler uses the optical signal as the medium to realize the coupling and transmission of the electrical signal. The input and output are completely isolated electrically, and it has the characteristics of strong anti-interference performance.
For the industrial application measurement and control system that includes both the weak current control part and the strong current control part, the use of optocoupler isolation can well achieve the isolation of weak current and strong current, and achieve the purpose of anti-interference. However, the use of optocoupler isolation requires consideration of the following issues:
① When the optocoupler is directly used to isolate and transmit analog quantities, the nonlinear problem of the optocoupler should be considered;
② When the optocoupler isolates and transmits digital quantities, the response speed of the optocoupler should be considered;
③ If the output has power requirements, the power interface design of the optocoupler must be considered.
④ Isolation, the grounds on both sides of the device need be the different ground.