Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use FC-51 Obstacle Sensor: Examples, Pinouts, and Specs

Image of FC-51 Obstacle Sensor
Cirkit Designer LogoDesign with FC-51 Obstacle Sensor in Cirkit Designer

Introduction

The FC-51 Obstacle Sensor is an infrared proximity sensor designed for robotics and automation applications. It detects obstacles within a range of 2-40cm and provides a digital output that indicates the presence or absence of an object in its detection range. This sensor is widely utilized for obstacle avoidance in robots, line following, and object proximity detection.

Explore Projects Built with FC-51 Obstacle Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
IR Obstacle Detection System with Relay-Controlled Gearmotors and Boost Converters
Image of LFR 1: A project utilizing FC-51 Obstacle Sensor in a practical application
This circuit consists of two FC-51 IR Obstacle Sensors connected to two KF-301 relays, which likely serve as triggers for switching the relays. Four gearmotors are powered through two XL6009E1 Boost Converters, which are likely used to step up the voltage from a 2-cell 18650 Li-ion battery pack. The relays appear to control the power flow to the boost converters, and thus to the gearmotors, based on the obstacle detection inputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Obstacle Detection System with Buzzer Alert
Image of simple avoidance alarm: A project utilizing FC-51 Obstacle Sensor in a practical application
This circuit uses an Arduino UNO to control a buzzer based on input from an FC-51 IR Obstacle Sensor. When the sensor detects an obstacle, the Arduino activates the buzzer to alert the presence of the obstacle.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO R4 WiFi with IR Obstacle Detection and OLED Display
Image of proximtiy sensor: A project utilizing FC-51 Obstacle Sensor in a practical application
This circuit features an Arduino UNO R4 WiFi connected to a 0.96" OLED display and an FC-51 IR Obstacle Sensor. The Arduino powers both the display and the sensor, and it communicates with the OLED via I2C (using A4 and A5 pins as SDA and SCL). The IR sensor's output is read by the Arduino on digital pin D2 to detect the presence of obstacles, and the detection status is displayed on the OLED screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled IR Sensor and Servo Motor Obstacle Interaction
Image of IR sensor: A project utilizing FC-51 Obstacle Sensor in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an FC-51 IR sensor, two red LEDs, and an SG90 servo motor. The IR sensor output is connected to the Arduino's digital pin D8, which also controls one LED, while the other LED is controlled by pin D3 along with the servo motor's PWM signal. The Arduino runs a sketch that activates the servo and lights up the corresponding LED when the IR sensor detects an obstacle, indicating the servo's position and sensor status visually.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with FC-51 Obstacle Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of LFR 1: A project utilizing FC-51 Obstacle Sensor in a practical application
IR Obstacle Detection System with Relay-Controlled Gearmotors and Boost Converters
This circuit consists of two FC-51 IR Obstacle Sensors connected to two KF-301 relays, which likely serve as triggers for switching the relays. Four gearmotors are powered through two XL6009E1 Boost Converters, which are likely used to step up the voltage from a 2-cell 18650 Li-ion battery pack. The relays appear to control the power flow to the boost converters, and thus to the gearmotors, based on the obstacle detection inputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of simple avoidance alarm: A project utilizing FC-51 Obstacle Sensor in a practical application
Arduino UNO Obstacle Detection System with Buzzer Alert
This circuit uses an Arduino UNO to control a buzzer based on input from an FC-51 IR Obstacle Sensor. When the sensor detects an obstacle, the Arduino activates the buzzer to alert the presence of the obstacle.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of proximtiy sensor: A project utilizing FC-51 Obstacle Sensor in a practical application
Arduino UNO R4 WiFi with IR Obstacle Detection and OLED Display
This circuit features an Arduino UNO R4 WiFi connected to a 0.96" OLED display and an FC-51 IR Obstacle Sensor. The Arduino powers both the display and the sensor, and it communicates with the OLED via I2C (using A4 and A5 pins as SDA and SCL). The IR sensor's output is read by the Arduino on digital pin D2 to detect the presence of obstacles, and the detection status is displayed on the OLED screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of IR sensor: A project utilizing FC-51 Obstacle Sensor in a practical application
Arduino-Controlled IR Sensor and Servo Motor Obstacle Interaction
This circuit features an Arduino UNO microcontroller interfaced with an FC-51 IR sensor, two red LEDs, and an SG90 servo motor. The IR sensor output is connected to the Arduino's digital pin D8, which also controls one LED, while the other LED is controlled by pin D3 along with the servo motor's PWM signal. The Arduino runs a sketch that activates the servo and lights up the corresponding LED when the IR sensor detects an obstacle, indicating the servo's position and sensor status visually.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Obstacle avoidance for robots
  • Line following robots
  • Object detection in automation systems
  • Proximity sensing in interactive installations

Technical Specifications

Key Technical Details

  • Operating Voltage: 5V DC
  • Current Consumption: 10-15mA
  • Detection Range: 2-40cm
  • Output Type: Digital (High when obstacle is detected, Low when no obstacle)
  • Ambient Light Resistance: Good
  • Effective Angle: 35°

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 VCC Power supply input (5V DC)
2 GND Ground
3 OUT Digital output signal (High/Low)

Usage Instructions

Connecting to a Circuit

  1. Connect the VCC pin to the 5V power supply.
  2. Connect the GND pin to the ground of the power supply.
  3. Connect the OUT pin to a digital input pin on a microcontroller, such as an Arduino.

Important Considerations

  • Ensure that the sensor is mounted at a height where the desired detection range is clear of any obstructions.
  • Avoid exposing the sensor to direct sunlight or strong artificial light to prevent false detections.
  • The sensor's detection range may vary with environmental conditions and the reflectivity of the obstacle.

Best Practices

  • Use a pull-up or pull-down resistor on the OUT pin if the microcontroller input is high-impedance.
  • Test the sensor's detection range with the specific obstacles you intend to detect in your application.
  • Implement a debounce algorithm in your code to filter out spurious high-frequency signals.

Example Code for Arduino UNO

// Define the connection pin
const int obstacleSensorPin = 2; // FC-51 OUT pin connected to digital pin 2

void setup() {
  pinMode(obstacleSensorPin, INPUT); // Set the sensor pin as an input
  Serial.begin(9600); // Start serial communication at 9600 baud rate
}

void loop() {
  int obstacleDetected = digitalRead(obstacleSensorPin); // Read the sensor value
  if (obstacleDetected == HIGH) {
    // Obstacle detected
    Serial.println("Obstacle detected!");
  } else {
    // No obstacle detected
    Serial.println("Clear path");
  }
  delay(200); // Wait for 200 milliseconds before reading again
}

Troubleshooting and FAQs

Common Issues

  • Sensor always indicates an obstacle: Check for constant sources of infrared light or reflections that might trigger the sensor.
  • Sensor not responding: Ensure that the sensor is correctly powered and that the OUT pin is connected to the microcontroller.
  • Inconsistent detection range: Adjust the sensor's position or check for environmental factors that may affect the infrared signal.

Solutions and Tips

  • If the sensor is too sensitive, try to isolate it from other infrared sources or adjust the potentiometer on the sensor module to calibrate the detection threshold.
  • For issues with the microcontroller reading, verify the pull-up or pull-down resistor configuration and check the code for proper pin initialization.
  • When experiencing erratic behavior, consider adding a delay or debounce logic in the code to stabilize the output signal.

FAQs

Q: Can the FC-51 sensor detect all types of materials? A: The sensor is most effective with objects that reflect infrared light well. Transparent or highly reflective materials may not be detected reliably.

Q: Is the FC-51 sensor waterproof? A: No, the FC-51 sensor is not waterproof. Protect it from moisture and water to prevent damage.

Q: How can I adjust the detection range of the sensor? A: The sensor has a potentiometer that can be adjusted to fine-tune the detection threshold and range.

Q: Can the sensor work with 3.3V systems? A: The sensor is designed for 5V systems. Using it with 3.3V may result in reduced performance or no functionality. Use a level shifter if necessary.