Tuesday, July 8, 2025

Arduino IR Reflectance Alarm Using Homemade Sensor

- Advertisement -
efytested SC Dwivedi

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

infrared sensor modules
Fig. 1: Various infrared sensor modules
Bill of Materials
ComponentsDescriptionQuantity
Arduino Uno/Nano (Board1)For uploading code1
Analogue reflectance sensor module or (IR and phototransistor pair)for example, CNY70 or homemade1
330Ω, ¼W resistorCurrent limiting1
10KΩ, ¼W resistorPull-up resistor1
Passive buzzerFor sound1
Jumper wireFor connectionAs required
Two-pin connectorFor the power supply1

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.

- Advertisement -
Fig. 2: Author’s homemade 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

SHARE YOUR THOUGHTS & COMMENTS

T.K. Hareendran
T.K. Hareendran
Hareendran Nair TK is a lifelong electronics enthusiast, educator, and innovator whose journey from curious child to seasoned expert reflects an enduring passion for technology. With decades of hands-on experience, he has witnessed—and actively contributed to—the evolution of electronics from vacuum tubes to modern microchips.
×