The FC-51 has a simple 3-pin interface, making it easy to connect to almost any microcontroller (MCU).
The FC-51 is an excellent building block for many creative projects:
Direct sunlight or heavy incandescent lighting contains large amounts of infrared radiation. This can flood the photodiode and cause false triggers. For outdoor use, shield the sensor housing from direct sunlight. Common Applications Fc 51 Ir Sensor Datasheet
Here are some example code snippets to quickly get the FC-51 up and running.
When an object enters the detection range, the IR light reflects back. The FC-51 has a simple 3-pin interface, making
Digital signal (LOW when an obstacle is detected, HIGH when clear) Onboard IC: LM393 Dual Differential Comparator Dimensions: 3.2cm × 1.4cm Mounting Hole Size: 3mm (for easy chassis installation) Pin Configuration and Functionality
# Bibliotheken laden from machine import Pin from time import sleep For outdoor use, shield the sensor housing from
pinMode(2, INPUT); pinMode(13, OUTPUT); if (digitalRead(2) == LOW) digitalWrite(13, HIGH); else digitalWrite(13, LOW);
FC-51 IR Sensor Datasheet: Comprehensive Guide to the Infrared Obstacle Avoidance Module
Even a simple sensor like the FC-51 can exhibit issues. Here’s a troubleshooting guide:
The FC-51 IR sensor can be easily interfaced with microcontrollers such as Arduino, Raspberry Pi, and other digital devices. The sensor's digital output signal can be connected to a microcontroller's digital input pin, allowing for easy detection of obstacles or objects.