

The CNY70 is an optoisolator that integrates an infrared LED and a phototransistor within a single compact package. This component is designed to provide electrical isolation between different sections of a circuit while enabling signal transmission. The CNY70 is widely used in applications such as object detection, line-following robots, and signal isolation in industrial systems. Its ability to detect reflected infrared light makes it particularly useful in proximity sensing and reflective optical systems.








The following table outlines the key technical details of the CNY70:
| Parameter | Value |
|---|---|
| Forward Voltage (LED) | 1.2 V to 1.5 V |
| Forward Current (LED) | 50 mA (max) |
| Collector-Emitter Voltage | 32 V (max) |
| Emitter-Collector Voltage | 5 V (max) |
| Collector Current | 50 mA (max) |
| Spectral Peak Wavelength | 950 nm |
| Operating Temperature Range | -40°C to +85°C |
| Package Type | 4-pin through-hole |
The CNY70 has four pins, as described in the table below:
| Pin Number | Name | Description |
|---|---|---|
| 1 | LED Anode | Positive terminal of the infrared LED. Connect to a current-limiting resistor. |
| 2 | LED Cathode | Negative terminal of the infrared LED. Connect to ground. |
| 3 | Phototransistor Collector | Output terminal of the phototransistor. Connect to the load or pull-up resistor. |
| 4 | Phototransistor Emitter | Ground terminal of the phototransistor. |
Connect the LED Side:
Connect the Phototransistor Side:
Positioning for Reflective Sensing:
Read the Output:
The following example demonstrates how to use the CNY70 to detect a reflective surface with an Arduino UNO:
// Define the pin connections
const int sensorPin = A0; // Connect the phototransistor collector to analog pin A0
const int ledPin = 9; // Connect the LED anode to digital pin 9 (via a resistor)
// Setup function
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as output
pinMode(sensorPin, INPUT); // Set the sensor pin as input
Serial.begin(9600); // Initialize serial communication for debugging
}
// Main loop
void loop() {
digitalWrite(ledPin, HIGH); // Turn on the infrared LED
delay(10); // Allow the LED to stabilize
int sensorValue = analogRead(sensorPin); // Read the sensor value
Serial.print("Sensor Value: "); // Print the sensor value to the serial monitor
Serial.println(sensorValue);
digitalWrite(ledPin, LOW); // Turn off the infrared LED to save power
delay(100); // Wait before the next reading
}
sensorPin reads the voltage from the phototransistor's collector. A higher value indicates more reflected light.ledPin controls the infrared LED, which can be turned on and off as needed.No Output Signal:
Weak or Inconsistent Signal:
Interference from Ambient Light:
Overheating LED:
Q1: Can the CNY70 detect black surfaces?
A1: Black surfaces absorb infrared light and reflect very little, making detection difficult. Use highly reflective surfaces for best results.
Q2: What is the maximum detection range of the CNY70?
A2: The CNY70 is most effective at distances between 0.3 and 1 cm. Beyond this range, the reflected signal diminishes significantly.
Q3: Can the CNY70 be used for high-speed applications?
A3: Yes, the CNY70 can respond quickly to changes in reflected light, making it suitable for high-speed applications like rotary encoders.
Q4: Is the CNY70 suitable for outdoor use?
A4: The CNY70 is not designed for outdoor use as it is sensitive to ambient light and environmental conditions. Use it in controlled environments for optimal performance.