This code prints "OBSTACLE!!" to the serial monitor when an object is detected.
The transmitter IR LED constantly emits an invisible beam of infrared light.
The FC-51 IR sensor is a reflective infrared sensor that can detect the presence of objects within a certain range. It is commonly used for obstacle detection, line following, and other applications. Fc 51 Ir Sensor Datasheet
Arduino (Anode) and GND (Cathode via 220-ohm resistor) Sample Arduino Code
The FC-51 is an active infrared proximity sensor designed to detect obstacles or surfaces within a short range. Because it uses light reflection to sense objects, it is commonly used in line-following robots, obstacle-avoiding cars, security systems, and factory assembly lines. This code prints "OBSTACLE
On some variants, the middle pin is VCC and the outer pin is OUT. Use a multimeter to confirm if unsure.
Emits infrared light at a specific frequency (usually 950nm). It is commonly used for obstacle detection, line
The effective range of the FC-51 depends heavily on the color and texture of the obstacle. Black surfaces absorb infrared light, significantly reducing the detection range (sometimes down to zero). Conversely, white or highly reflective surfaces maximize the detection range. Interfacing FC-51 IR Sensor with Arduino Uno
Thanks to its simplicity and reliability, the FC-51 is used in hundreds of projects. Here are the top applications:
| Pin Number | Name | Function | | :--- | :--- | :--- | | 1 | | Digital output signal (HIGH = no object, LOW = object detected) | | 2 | VCC | Power supply input (3.3V or 5V) | | 3 | GND | Ground (0V) |