The IR reflective sensor is a digital input module, it acts like a pair of eyes inside your circuit, it senses objects around it and takes action. In real life, the IR reflective sensor is often used as car tracking devices.
The infrared sensor consists of an infrared LED and a phototransistor, the IR LED works as a light emitter, the phototransistor works as a receiver. Specifically, the IR LED emits a light which human eye can’t see. The photosensor will get a reflection when the light hits an object in front of the sensor. The interface of the IR reflective sensor module is a digital interface, it outputs logic low-level and high-level two states.
1. When the IR reflective sensor detects an object, it will output a logic high-level signal.
2. Otherwise, when there are no objects in front of the IR reflective sensor, it will output a logic low-level signal.
Use the IR reflective sensor together with a buzzer, when it detects an obstacle (non-black), the buzzer will alarm to remind you.
1. The effective detectable distance is less than 15mm.
2. Any white (or lighter) colored surface reflects more than a black (or darker) colored surface.