

The 6N138 optocoupler, manufactured by Vishay Semiconductors, is a high-performance component designed to provide electrical isolation between input and output circuits. It achieves this by utilizing a gallium arsenide infrared LED and a photodetector. This design allows for signal transmission without any direct electrical connection, ensuring safety and noise immunity.








The following table outlines the key technical details of the 6N138 optocoupler:
| Parameter | Value |
|---|---|
| Input LED Forward Voltage | 1.2 V (typical), 1.5 V (maximum) |
| Input LED Forward Current | 10 mA (typical), 20 mA (maximum) |
| Output Collector-Emitter Voltage | 30 V (maximum) |
| Current Transfer Ratio (CTR) | 300% to 600% |
| Isolation Voltage | 5000 Vrms |
| Propagation Delay (High to Low) | 2 µs (typical) |
| Operating Temperature Range | -55°C to +100°C |
| Package Type | DIP-8 or SMD-8 |
The 6N138 is available in an 8-pin DIP or SMD package. The pinout is as follows:
| Pin Number | Name | Description |
|---|---|---|
| 1 | Anode | Positive terminal of the input LED. Connect to the input signal. |
| 2 | Cathode | Negative terminal of the input LED. Connect to ground or a current-limiting resistor. |
| 3 | NC (No Connect) | Not connected internally. Leave unconnected or use as a mechanical support. |
| 4 | Emitter (E) | Emitter of the phototransistor. Connect to ground or load. |
| 5 | Collector (C) | Collector of the phototransistor. Connect to the output circuit. |
| 6 | Vcc | Positive supply voltage for the output side. |
| 7 | Base | Base of the phototransistor. Typically left unconnected or used for biasing. |
| 8 | NC (No Connect) | Not connected internally. Leave unconnected or use as a mechanical support. |
Input Side (LED):
Output Side (Phototransistor):
Power Supply:
Optional Base Connection:
The following example demonstrates how to use the 6N138 to isolate a digital input signal for an Arduino UNO:
// Example: Using 6N138 Optocoupler with Arduino UNO
// This code reads a digital signal from the optocoupler and toggles an LED.
const int optoInputPin = 2; // Pin connected to the optocoupler output
const int ledPin = 13; // Built-in LED on Arduino UNO
void setup() {
pinMode(optoInputPin, INPUT); // Set optocoupler output pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
int signal = digitalRead(optoInputPin); // Read the optocoupler output
digitalWrite(ledPin, signal); // Reflect the signal on the LED
}
Note: Ensure the pull-up resistor is connected to the optocoupler's output pin to provide a valid logic level for the Arduino.
No Output Signal:
Output Signal is Weak or Unstable:
Excessive Heat or Component Damage:
Q: Can the 6N138 be used for analog signal isolation?
A: The 6N138 is primarily designed for digital signal isolation. While it can handle some analog signals, its performance may degrade for high-frequency or precision analog applications.
Q: What is the maximum data rate supported by the 6N138?
A: The 6N138 supports data rates up to approximately 100 kHz, making it suitable for many high-speed digital applications.
Q: Can I use the 6N138 with a 3.3 V system?
A: Yes, the 6N138 can operate with a 3.3 V supply, but ensure the input LED current and output pull-up resistor are appropriately adjusted for the lower voltage.
By following this documentation, users can effectively integrate the 6N138 optocoupler into their designs for reliable signal isolation and noise immunity.