Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 4n25: Examples, Pinouts, and Specs

Image of 4n25
Cirkit Designer LogoDesign with 4n25 in Cirkit Designer

Introduction

The 4N25 is an optoisolator (or optocoupler) manufactured by IC. It integrates a light-emitting diode (LED) and a phototransistor within a single package. This component is designed to transfer electrical signals between two isolated circuits, ensuring electrical isolation and protecting sensitive components from high voltages or noise.

Explore Projects Built with 4n25

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Emergency Alert System with NUCLEO-F072RB, SIM800L, and GPS NEO 6M
Image of women safety: A project utilizing 4n25 in a practical application
This circuit is an emergency alert system that uses a NUCLEO-F072RB microcontroller to send SMS alerts and make calls via a SIM800L GSM module, while obtaining location data from a GPS NEO 6M module. The system is powered by a Li-ion battery and includes a TP4056 module for battery charging and protection, with a rocker switch to control power to the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Controlled NRF24L01 Wireless Joystick
Image of DRONE TRANSMITTER: A project utilizing 4n25 in a practical application
This circuit features an Arduino Nano configured as a 4-channel transmitter, interfacing with two KY-023 Dual Axis Joystick Modules for user input and an NRF24L01 module for wireless communication. The joysticks provide analog inputs to control throttle, pitch, roll, and yaw, which are read by the Arduino's analog pins and transmitted via the NRF24L01 to a remote receiver. A Lipo Battery provides power to the system, and an electrolytic capacitor is likely used for power supply decoupling to reduce noise.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano-Based Quadcopter with NRF24L01 Wireless Control and MPU-9250 Sensor
Image of Drone Circuit: A project utilizing 4n25 in a practical application
This circuit is a quadcopter control system that uses an Arduino Nano to manage four brushless motors via Electronic Speed Controllers (ESCs). It includes an NRF24L01 wireless module for remote communication and an MPU-9250 sensor for orientation and motion sensing, all powered by a LiPo battery through an XT60 power distribution board.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano 33 BLE Battery-Powered Display Interface
Image of senior design 1: A project utilizing 4n25 in a practical application
This circuit features a Nano 33 BLE microcontroller interfaced with a TM1637 4-digit 7-segment display for information output, powered by a 3.7V battery managed by a TP4056 charging module. The microcontroller communicates with the display to present data, while the TP4056 ensures the battery is charged safely and provides power to the system.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 4n25

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of women safety: A project utilizing 4n25 in a practical application
Battery-Powered Emergency Alert System with NUCLEO-F072RB, SIM800L, and GPS NEO 6M
This circuit is an emergency alert system that uses a NUCLEO-F072RB microcontroller to send SMS alerts and make calls via a SIM800L GSM module, while obtaining location data from a GPS NEO 6M module. The system is powered by a Li-ion battery and includes a TP4056 module for battery charging and protection, with a rocker switch to control power to the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of DRONE TRANSMITTER: A project utilizing 4n25 in a practical application
Arduino Nano Controlled NRF24L01 Wireless Joystick
This circuit features an Arduino Nano configured as a 4-channel transmitter, interfacing with two KY-023 Dual Axis Joystick Modules for user input and an NRF24L01 module for wireless communication. The joysticks provide analog inputs to control throttle, pitch, roll, and yaw, which are read by the Arduino's analog pins and transmitted via the NRF24L01 to a remote receiver. A Lipo Battery provides power to the system, and an electrolytic capacitor is likely used for power supply decoupling to reduce noise.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Drone Circuit: A project utilizing 4n25 in a practical application
Arduino Nano-Based Quadcopter with NRF24L01 Wireless Control and MPU-9250 Sensor
This circuit is a quadcopter control system that uses an Arduino Nano to manage four brushless motors via Electronic Speed Controllers (ESCs). It includes an NRF24L01 wireless module for remote communication and an MPU-9250 sensor for orientation and motion sensing, all powered by a LiPo battery through an XT60 power distribution board.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of senior design 1: A project utilizing 4n25 in a practical application
Arduino Nano 33 BLE Battery-Powered Display Interface
This circuit features a Nano 33 BLE microcontroller interfaced with a TM1637 4-digit 7-segment display for information output, powered by a 3.7V battery managed by a TP4056 charging module. The microcontroller communicates with the display to present data, while the TP4056 ensures the battery is charged safely and provides power to the system.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Signal isolation in microcontroller circuits
  • Protection of low-voltage devices from high-voltage circuits
  • Noise suppression in industrial control systems
  • Data communication between systems with different ground potentials
  • Motor control and power supply circuits

Technical Specifications

Below are the key technical details of the 4N25 optoisolator:

Parameter Value
Manufacturer Part ID IC
Input LED Forward Voltage 1.2V (typical), 1.5V (maximum)
Input LED Forward Current 10mA (typical), 60mA (maximum)
Output Phototransistor Voltage 30V (maximum)
Collector Current 50mA (maximum)
Isolation Voltage 5000V RMS
Current Transfer Ratio (CTR) 20% to 300%
Operating Temperature Range -55°C to +100°C
Package Type 6-pin DIP

Pin Configuration and Descriptions

The 4N25 is housed in a 6-pin Dual Inline Package (DIP). The pinout is as follows:

Pin Number Name Description
1 Anode (LED) Positive terminal of the internal LED. Connect to the input signal.
2 Cathode (LED) Negative terminal of the internal LED. Connect to ground or the return path.
3 NC (No Connect) Not connected internally. Leave unconnected or use as a mechanical support.
4 Emitter Emitter terminal of the phototransistor. Connect to the output circuit.
5 Collector Collector terminal of the phototransistor. Connect to the output circuit.
6 Base (optional) Base terminal of the phototransistor. Typically left unconnected.

Usage Instructions

How to Use the 4N25 in a Circuit

  1. Input Side (LED):

    • Connect the anode (Pin 1) to the positive side of the input signal through a current-limiting resistor.
    • Connect the cathode (Pin 2) to ground or the return path of the input circuit.
    • Calculate the resistor value to limit the LED current to a safe level (typically 10mA): [ R = \frac{V_{in} - V_f}{I_f} ] Where (V_{in}) is the input voltage, (V_f) is the forward voltage of the LED (1.2V typical), and (I_f) is the desired forward current.
  2. Output Side (Phototransistor):

    • Connect the collector (Pin 5) to the positive supply voltage through a pull-up resistor.
    • Connect the emitter (Pin 4) to ground.
    • The output signal can be read across the pull-up resistor. When the LED is on, the phototransistor conducts, pulling the output low.

Example Circuit with Arduino UNO

The following example demonstrates how to use the 4N25 to isolate a digital input signal for an Arduino UNO:

Circuit Connections

  • Input Side:
    • Connect Pin 1 (Anode) to a 5V signal through a 470Ω resistor.
    • Connect Pin 2 (Cathode) to ground.
  • Output Side:
    • Connect Pin 5 (Collector) to the Arduino's 5V pin through a 10kΩ pull-up resistor.
    • Connect Pin 4 (Emitter) to the Arduino's ground.
    • Connect Pin 5 (Collector) to an Arduino digital input pin (e.g., D2).

Arduino Code

// 4N25 Optoisolator Example with Arduino UNO
// This code reads the output of the 4N25 and toggles an LED based on the input signal.

const int optoInputPin = 2;  // Digital pin connected to 4N25 collector
const int ledPin = 13;       // Onboard LED pin

void setup() {
  pinMode(optoInputPin, INPUT);  // Set optoInputPin as input
  pinMode(ledPin, OUTPUT);       // Set ledPin as output
}

void loop() {
  int optoState = digitalRead(optoInputPin);  // Read the optoisolator output

  if (optoState == LOW) {
    // If the optoisolator output is LOW, turn on the LED
    digitalWrite(ledPin, HIGH);
  } else {
    // Otherwise, turn off the LED
    digitalWrite(ledPin, LOW);
  }
}

Important Considerations and Best Practices

  • Current Limiting Resistor: Always use a resistor in series with the LED to prevent overcurrent damage.
  • Pull-Up Resistor: Use an appropriate pull-up resistor on the phototransistor's collector to ensure proper operation.
  • Isolation Voltage: Ensure the input and output circuits do not exceed the isolation voltage rating (5000V RMS).
  • Base Pin (Pin 6): Leave the base pin unconnected unless specific gain control is required.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output Signal:

    • Verify the input LED is receiving sufficient current. Check the current-limiting resistor value.
    • Ensure the pull-up resistor is connected on the output side.
  2. Output Signal Always High:

    • Check if the input LED is properly connected and functioning.
    • Verify the LED forward current is within the recommended range (10mA typical).
  3. Output Signal Always Low:

    • Ensure the pull-up resistor is correctly connected to the collector.
    • Check for short circuits or incorrect wiring on the output side.
  4. Signal Distortion or Noise:

    • Use decoupling capacitors on the power supply lines to reduce noise.
    • Ensure proper grounding and avoid long, unshielded wires.

FAQs

Q: Can the 4N25 be used for analog signal isolation?
A: The 4N25 is primarily designed for digital signal isolation. While it can transfer analog signals, the linearity and bandwidth are limited.

Q: What is the maximum switching speed of the 4N25?
A: The 4N25 has a typical switching speed of 2-10µs, making it suitable for low- to medium-speed applications.

Q: Can I use the base pin (Pin 6)?
A: The base pin is typically left unconnected. However, it can be used to adjust the phototransistor's gain if needed.

Q: Is the 4N25 suitable for high-frequency applications?
A: No, the 4N25 is not ideal for high-frequency applications due to its limited switching speed. For such cases, consider high-speed optoisolators.