A small trim-pot used to adjust the sensitivity and detection distance. Indicator LEDs: Power LED: Glows when the module is powered. Signal LED: Lights up when an object is detected. Pinout Configuration
The following technical specifications are extracted from the FC-51 IR sensor datasheet:
Mounted on the front or sides of autonomous rovers to prevent collisions.
Used to adjust the detection range sensitivity. Fc 51 Ir Sensor Datasheet
Digital (High/Low). It typically outputs Low (0V) when an object is detected and High (VCC) when the path is clear. Detection Angle: Approximately 35°. Physical Components (The "Pieces")
If the obstacle LED stays on constantly, the sensitivity is set too high, or the sensor is pointing directly at a highly reflective surface. Turn the potentiometer counterclockwise to reduce sensitivity.
The FC-51 module consists of an infrared transmitter (IR LED) and an infrared receiver (photodiode) paired with an LM393 voltage comparator integrated circuit (IC). A small trim-pot used to adjust the sensitivity
Adapted from public examples.
Used in sanitary hardware or automated dispensers. Troubleshooting Guide Potential Cause Always outputs LOW / LED stays on
/* FC-51 IR Sensor Obstacle Avoidance Demo Outputs status to the Serial Monitor and lights up the built-in LED. */ const int IR_PIN = 2; // Connect FC-51 OUT to digital pin 2 const int LED_PIN = 13; // Use the onboard Arduino LED void setup() pinMode(IR_PIN, INPUT); // Set the sensor pin as an input pinMode(LED_PIN, OUTPUT); // Set the onboard LED as an output Serial.begin(9600); // Initialize serial communication Serial.println("FC-51 IR Sensor Initialized."); void loop() int sensorStatus = digitalRead(IR_PIN); // Read the digital output of FC-51 // Remember: FC-51 outputs LOW when an obstacle is detected if (sensorStatus == LOW) digitalWrite(LED_PIN, HIGH); // Turn on the onboard LED Serial.println("Obstacle Detected!"); else digitalWrite(LED_PIN, LOW) ; // Turn off the onboard LED Serial.println("Path Clear..."); delay(100); // Small delay to prevent serial flooding Use code with caution. Interfacing FC-51 with Raspberry Pi It typically outputs Low (0V) when an object
: Black or dark objects absorb IR light and may not be detected as easily as white or reflective surfaces.
Choose FC-51 for simple “object present/not present” binary detection from 2-30 cm. Avoid for distance measurement or shiny/black objects.
Because the sensor relies on light reflection, its effective range is highly dependent on the target object's color and texture.
Disclaimer: Specifications may vary slightly between manufacturers. Always test your specific module with a multimeter before integrating into a final design.