The CNY70 is an optoisolator (or optocoupler) 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 switching, signal isolation, and reflective object detection. Its ability to detect reflected infrared light also makes it suitable for proximity sensing and line-following robots.
Below are the key technical details of the CNY70:
Parameter | Value |
---|---|
Forward Voltage (LED) | 1.2 V (typical), 1.5 V (max) |
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 | Anode (LED) | Positive terminal of the infrared LED. Connect to a current-limiting resistor. |
2 | Cathode (LED) | Negative terminal of the infrared LED. |
3 | Emitter | Emitter of the phototransistor. Connect to ground or a pull-down resistor. |
4 | Collector | Collector of the phototransistor. Connect to the input of a microcontroller or circuit. |
Connect the LED Side:
Connect the Phototransistor Side:
Positioning for Reflective Sensing:
Power the Circuit:
Below is an example of how to use the CNY70 for reflective object detection with an Arduino UNO:
// Define pin connections
const int sensorPin = A0; // Analog pin connected to the CNY70 collector
const int ledPin = 9; // Digital pin to control an indicator LED
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the sensor value
Serial.println(sensorValue); // Print the value to the Serial Monitor
// If the sensor detects a reflective surface, turn on the LED
if (sensorValue > 500) { // Adjust threshold based on your setup
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
delay(100); // Small delay for stability
}
500
in the example) based on the reflective surface and ambient conditions.No Signal Detected:
Inconsistent Readings:
Low Sensitivity:
Overheating:
Q: Can the CNY70 detect black surfaces?
A: The CNY70 has difficulty detecting black or dark surfaces due to their low reflectivity. Use light-colored or white surfaces for better results.
Q: What is the maximum detection range of the CNY70?
A: The optimal detection range is between 0.3 mm and 3 mm. Beyond this range, the sensitivity decreases significantly.
Q: Can the CNY70 be used for high-speed sensing?
A: Yes, the CNY70 can be used for high-speed sensing applications, but ensure the circuit and microcontroller can handle the required response time.
Q: How do I reduce noise in the output signal?
A: Use a capacitor (e.g., 0.1 µF) across the phototransistor's collector and emitter to filter out noise.
By following this documentation, you can effectively integrate the CNY70 into your projects for reliable signal isolation and reflective sensing.