

The FC-51 IR Obstacle Sensor is a compact and efficient device designed to detect obstacles using infrared (IR) light. It works by emitting IR signals and measuring the reflected light to determine the presence of an object. When an obstacle is detected, the onboard detection indicator (an LED) lights up, providing a clear visual signal. This sensor is widely used in robotics, automation systems, and proximity detection applications due to its simplicity and reliability.








The following table outlines the key technical details of the FC-51 IR Obstacle Sensor:
| Parameter | Specification |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Operating Current | 20mA (typical) |
| Detection Range | 2cm to 30cm (adjustable) |
| Detection Angle | ≤ 35° |
| Output Type | Digital (High/Low) |
| Dimensions | 3.1cm x 1.5cm x 0.7cm |
The FC-51 IR Obstacle Sensor has a 3-pin interface. The pin configuration is as follows:
| Pin Name | Pin Number | Description |
|---|---|---|
| VCC | 1 | Power supply pin (3.3V to 5V) |
| GND | 2 | Ground pin |
| OUT | 3 | Digital output pin (High when no obstacle, Low when obstacle detected) |
VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.OUT pin to a digital input pin of your microcontroller (e.g., Arduino UNO).OUT pin will output a LOW signal, and the onboard LED will light up.Below is an example of how to use the FC-51 IR Obstacle Sensor with an Arduino UNO:
// FC-51 IR Obstacle Sensor Example Code
// Connect the OUT pin of the sensor to Arduino digital pin 2
const int sensorPin = 2; // Sensor output pin connected to digital pin 2
const int ledPin = 13; // Onboard LED pin for visual feedback
void setup() {
pinMode(sensorPin, INPUT); // Set sensor pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = digitalRead(sensorPin); // Read the sensor output
if (sensorValue == LOW) {
// Obstacle detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Obstacle detected!");
} else {
// No obstacle
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No obstacle.");
}
delay(100); // Small delay for stability
}
The sensor is not detecting obstacles:
False detections or erratic behavior:
The onboard LED does not light up:
Q: Can the FC-51 IR Obstacle Sensor detect transparent objects?
A: The sensor may struggle to detect transparent or highly reflective objects due to insufficient IR reflection.
Q: How do I increase the detection range?
A: Use the onboard potentiometer to adjust the sensitivity. Turn it clockwise to increase the range.
Q: Can I use the sensor with a 3.3V microcontroller?
A: Yes, the sensor operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V systems.
Q: What is the maximum detection angle of the sensor?
A: The sensor has a detection angle of ≤ 35°, so ensure obstacles are within this range for accurate detection.