Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

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

Image of FC-51 Obstacle SensorDesign 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!
Image of IR Obstacle Detection System with Relay-Controlled Gearmotors and Boost Converters: 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.

Open Project in Cirkit Designer
Image of Arduino UNO R4 WiFi with IR Obstacle Detection and OLED Display: 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.

Open Project in Cirkit Designer
Image of Arduino-Controlled IR Sensor and Servo Motor Obstacle Interaction: 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.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

Key Technical Details

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

Best Practices

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

Solutions and Tips

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.