Description
CNY70 Reflective Infrared Optical Sensor
The CNY70 is a reflective optical sensor containing an infrared emitter and phototransistor in one compact package. It detects nearby objects by sensing reflected infrared light.
Specifications stated in the listing
- Operating voltage: 3.3–5V (seller listing; confirm the emitter drive design)
- Operating current: 20mA (seller listing; check whether this refers to the emitter)
- Detection distance: 0–5mm, seller claim
- Operating temperature: -40°C to +85°C
- Dimensions: 7 × 7 × 6mm
- Emitter wavelength: 950nm
- Daylight-blocking filter
The CNY70 itself has a phototransistor output, not a digital logic output. A pull-up/load resistor or additional signal-conditioning circuit is required to read it; output depends on distance and surface reflectivity. The manufacturer describes an operating range of 0–5mm and peak operating distance below 0.5mm. See the seller-linked datasheet (PDF) and Vishay manufacturer datasheet.
Pin connections listed by the seller
- Pin 1: IR LED anode; connect to supply through a current-limiting resistor
- Pin 2: IR LED cathode; connect to GND
- Pin 3: phototransistor collector; read through a suitable load/pull-up circuit
- Pin 4: phototransistor emitter; connect to GND
Verify the pin numbering against the package drawing before wiring. The listing’s Arduino example is a possible external circuit arrangement, not an onboard digital output.
Applications listed
- Robotics: line following and obstacle detection
- Presence detection and object sensing
- Position control and industrial object detection
- DIY electronics projects
Setup and precautions
Test and calibrate in the actual lighting and surface conditions. Ambient light and target reflectivity affect the reading. The source suggests pulsing the IR emitter and measuring background light to reduce ambient-light effects. Use current-limiting and signal-conditioning components appropriate to your circuit.









