
Photoelectric sensors detect objects and surface changes using variations in optical properties. Each sensor includes a light emitter and a receiver, with most relying on infrared light. In optical proximity sensing, the emitter and receiver are housed in the same unit.
An infrared reflectance sensor, also known as a diffuse sensor, detects changes in reflected light from a target. This variation alters the light received, which is then converted into an electrical signal. Some of these sensors and modules, widely available at electronics retailers, are shown in Fig. 1. The components required to assemble the device are listed in the Bill of Materials table.
POC Video Tutorial

Bill of Materials | ||
Components | Description | Quantity |
Arduino Uno/Nano (Board1) | For uploading code | 1 |
Analogue reflectance sensor module or (IR and phototransistor pair) | for example, CNY70 or homemade | 1 |
330Ω, ¼W resistor | Current limiting | 1 |
10KΩ, ¼W resistor | Pull-up resistor | 1 |
Passive buzzer | For sound | 1 |
Jumper wire | For connection | As required |
Two-pin connector | For the power supply | 1 |
Note. A compact analogue reflectance sensor such as the CNY70 was not used in the Arduino Uno experiments described. Instead, a homemade sensor was assembled using a single infrared LED (IR333C) and a commonly available phototransistor (PT908-7C-F). Fig. 2 shows the homemade reflectance sensor.

For practical applications, the phototransistor output of an analogue infrared reflectance sensor must be connected to a pull-up resistor to form a voltage divider, which yields an analogue voltage that ranges between GND and Vcc. With strong reflectance, the output voltage tends towards GND; with weak reflectance, it tends towards Vcc. The resistor wired in series with the infrared LED sets the operating current to a safe value. This configuration can be tested using an Arduino Uno. Fig. 3 shows the internal circuit of an infrared reflectance sensor.

Circuit and working
OOPS! THIS IS EFY PRIME CONTENT...
which means that you need to be an EFY PRIME subscriber to read it.
EFY PRIME content is our best content. Hence, you need to make a small investment to access all of our content including EFY Prime content.
If you're already an EFY PRIME member, feel free to login below.
Else, CLICK HERE to invest in an EFY Prime account and become our VIP customer who can access all our content, and that too without the clutter of ads!
BENEFITS OF EFY PRIME MEMBERSHIP:
(1) Zero Clutter AD free experience
(2) Super-fast user experience
(3) Focussed reading experience with no distractions
(4) Access to all our content including our Best-of-Best which is EFY Prime