Jump to content

Fc 51 Ir Sensor Datasheet -

Placed at the front of wheeled robots to prevent collisions.

void setup() pinMode(sensorPin, INPUT); // Set the sensor pin as an input pinMode(ledPin, OUTPUT); // Set the LED pin as an output Serial.begin(9600); // Start serial communication for debugging

int sensorPin = 2; int ledPin = 13;

~15mA (can directly drive a standard LED or small relay) Performance & Environmental Ratings

Always test your specific module’s output logic (Active HIGH vs. Active LOW) and refer to the manufacturer’s datasheet for exact thresholds. Happy building! Fc 51 Ir Sensor Datasheet

The sensitivity is too low, or the power supply voltage is dropping below 3.3V.

// Since output is Active LOW, "LOW" means object detected if (sensorState == LOW) digitalWrite(ledPin, HIGH); Serial.println("Obstacle detected!"); else digitalWrite(ledPin, LOW); Serial.println("Path clear");

The FC-51's simplicity makes it a great entry-level sensor.

The phototransistor receives the reflected light, and the onboard comparator compares this signal against the threshold set by the potentiometer. Placed at the front of wheeled robots to prevent collisions

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

The sensitivity might be set too high, or the sensor is catching reflections from the surface it is mounted on. Turn the potentiometer counter-clockwise to reduce sensitivity.

void loop() isObstacle = digitalRead(isObstaclePin); if (isObstacle == LOW) Serial.println("OBSTACLE!!, OBSTACLE!!"); digitalWrite(LED, HIGH); else Serial.println("clear"); digitalWrite(LED, LOW);

The FC-51 IR sensor has the following features: Happy building

The LM393 comparator circuit compares the signal from the photodiode with a reference voltage set by the onboard potentiometer.

Connecting the FC-51 sensor to an Arduino is straightforward. FC-51 VCC -> Arduino 5V FC-51 GND -> Arduino GND FC-51 OUT -> Arduino Pin 2 Simple Arduino Code:

Reflect maximum IR light, resulting in the maximum detection range (up to 30cm).

×
×
  • Create New...