The 4N35 is an optocoupler (opto-isolator) that provides electrical isolation between two circuits using light. It is commonly used in signal isolation, microcontroller interfacing, and switching applications.
πΉ 1. What is the 4N35?
- The 4N35 is an optocoupler with an infrared LED and a phototransistor inside a single 6-pin package.
- It electrically isolates one circuit from another while allowing signal transfer using light.
- Used for protecting microcontrollers from high voltages and noise-sensitive circuits.
π Why use it?
- Prevents electrical damage between circuits.
- Reduces interference (noise isolation).
- Allows communication between different voltage levels.
πΉ 2. 4N35 Pinout & Functions
The 4N35 has 6 pins:
Pin No. | Name | Function |
---|---|---|
1 | Anode (A) | LED Positive Input |
2 | Cathode (C) | LED Negative Input (Ground) |
3 | NC | No Connection |
4 | Emitter (E) | Phototransistor Output |
5 | Collector (C) | Phototransistor Input |
6 | Base (B) | Optional Control (Normally Unused) |
π Key Features:
- Optical isolation between input and output.
- DC signal transfer with low power consumption.
- Input Voltage: 1.2V (LED Forward Voltage).
- Output Voltage: Up to 70V (Collector-Emitter Breakdown Voltage).
πΉ 3. How 4N35 Works
- The internal LED lights up when voltage is applied to pins 1 & 2.
- The light activates the internal phototransistor (pins 4 & 5).
- The transistor switches ON or OFF, depending on the LED state.
π This allows a low-voltage microcontroller to control high-voltage circuits safely.
πΉ 4. Using 4N35 for Microcontroller Isolation
π Required Components
- 1x 4N35 Optocoupler
- 1x 220Ξ© Resistor (LED Current Limit)
- 1x 10kΞ© Resistor (Pull-down for Transistor Output)
- 1x Arduino (or Any Microcontroller)
- 1x External Circuit (e.g., Motor, Relay, or High-Voltage Load)
π Wiring Diagram
4N35 Pin | Arduino Pin / External Circuit |
---|---|
Anode (Pin 1) | D7 (Arduino Output Pin) |
Cathode (Pin 2) | GND (Arduino Ground) |
Collector (Pin 5) | Relay/Motor Control Circuit |
Emitter (Pin 4) | GND (External Circuit Ground) |
πΉ 5. Arduino Code for 4N35
This example turns ON/OFF a high-voltage device using an Arduino and 4N35.
#define OPTOCOUPLER 7 // Connects to 4N35 Anode (Pin 1)
void setup() {
pinMode(OPTOCOUPLER, OUTPUT);
}
void loop() {
digitalWrite(OPTOCOUPLER, HIGH); // Turn ON the optocoupler (Activates output)
delay(2000); // Wait 2 seconds
digitalWrite(OPTOCOUPLER, LOW); // Turn OFF the optocoupler
delay(2000);
}
π What happens?
- The Arduino controls the optocoupler LED.
- When the LED is ON, the transistor allows current flow.
- When the LED is OFF, the transistor is OFF (isolates the circuit).
πΉ 6. Using 4N35 for AC Mains Isolation (Safe Switching)
π 4N35 can be used to switch AC appliances (e.g., lamps, fans) via a relay.
π Circuit Steps
- The Arduino controls the 4N35 LED.
- The 4N35 transistor switches ON a relay.
- The relay controls the AC device.
π Using 4N35 prevents high-voltage AC from reaching the microcontroller!
πΉ 7. Applications of 4N35
β
Microcontroller Isolation β Protects Arduino from high voltage circuits.
β
Switching High-Voltage Devices β Controls relays, motors, and power electronics.
β
Noise Reduction β Used in industrial automation and signal isolation.
β
AC/DC Power Control β Safe switching of mains appliances.
β
RS232 & Serial Communication Isolation β Protects data lines from voltage spikes.
πΉ 8. 4N35 vs Other Optocouplers
Feature | 4N35 | PC817 | MOC3021 (Triac) |
---|---|---|---|
Isolation Voltage | 5kV | 5kV | 7.5kV |
Max Output Voltage | 70V | 80V | 400V |
Output Type | Transistor | Transistor | Triac (For AC Control) |
Best For | General Microcontroller Isolation | Low-power isolation | AC Load Switching |
π Verdict:
- 4N35 is best for general-purpose switching.
- PC817 is a smaller, lower-power alternative.
- MOC3021 is used for AC load switching (Triac control).
π― Conclusion
- 4N35 is an optocoupler that provides electrical isolation between circuits.
- Used for switching high-power devices, protecting microcontrollers, and noise reduction.
- Works with Arduino, ESP32, STM32, and other microcontrollers.
- Prevents high-voltage damage and interference in sensitive circuits.