This video is sponsored by PCBWay. Only $5 for 10 PCBs and Only $4.98 for 3D Printing + Express 24 hour service on [ Ссылка ] ⭐ An opto-isolator, also known as an optocoupler, is a device that uses light to transfer electrical signals between two isolated circuits, providing galvanic isolation to prevent high voltages from affecting the system receiving the signal. There are many different optocoupler chips on the market. In this video I will use EL817. The optocoupler consists of an LED and a photosensitive component, such as a phototransistor, within a single package. When the LED is activated by an input signal, it emits light detected by the phototransistor, thus transferring the signal while maintaining electrical isolation. According to the datasheet EL817 is with typical forward voltage: 1.2V and max forward current: 60mA. The common forward current for reliable operation: 10-20mA.
The formula to calculate R1 is:
R1 = (Vin - Vf)/If
For 12V: R1 = (12V-1.2V)/10mA = 1080 Ohm (approximately 1.1K Ω resistor)
For 24V: R1 = (24V-1.2V)/10mA = 2280 Ohm (approximately 2.4K Ω resistor)
Choosing the right R2 Pull-Up Resistor value depends on the specific requirements of your circuit and the application of the optocoupler in that circuit. Typically the range for digital logic applications is from 1kΩ to 10kΩ. The board in the video uses 4.7KΩ.
The board from the video is capable of supporting and has silkscreen labels for the following galvanically isolated DC DC voltage converter combinations:
12V to 3.3V
12V to 5V
24V to 3.3V
24V to 5V
The demonstration of the video has been done with 12V to 3.3V and a simple Arduino sketch to read the GPIO value of ESP32C3. The same setup can be created with any other microcontroller or computer that has 3.3V tolerant GPIOs like Raspberry Pi single board computers, Raspberry Pi RP2040 microcontroller, ESP8266, ESP32, ESP32C6, etc.
🔗 Useful links:
===
ANAVI Opto-Isolator: [ Ссылка ]
EL817 datasheet: [ Ссылка ]
📑 Chapters
===
0:00 What is galvanic isolation?
1:17 What is opto-isolator?
2:16 EL817 optocoupler
2:30 KiCad
3:55 Soldering
4:48 Wiring 12V to 3.3V
5:29 R1 and R2
6:33 Demo
7:59 Conclusions
Ещё видео!