Fc 51 Ir Sensor Datasheet -

void loop() sensorState = digitalRead(sensorPin);

Keep ambient IR low, adjust the potentiometer for your target reflectivity, and always confirm the pinout before powering up.

By referencing this , you now have the complete technical picture: pinouts, voltage limits, range adjustment, code examples, and troubleshooting. Whether you’re building a line-following robot, a contactless switch, or a factory counter, the FC-51 offers a straightforward “detect or not detect” solution that integrates with almost any microcontroller. Fc 51 Ir Sensor Datasheet

delay(50);

if (sensorState == LOW) // Object detected digitalWrite(ledPin, HIGH); Serial.println("Object Detected!"); else // No object digitalWrite(ledPin, LOW); delay(50); if (sensorState == LOW) // Object detected

| Symptom | Possible Cause | Solution | | :--- | :--- | :--- | | Output LED always ON | Potentiometer too sensitive; object too close; power supply noise | Turn potentiometer CCW; move objects; add capacitor | | Output LED always OFF | No power; broken IR LED; range too low | Check Vcc/GND; turn potentiometer CW; test with white paper | | Erratic detection | Ambient IR noise (sunlight, CFLs); loose wires | Shield sensor; use shorter wires; add 10ms debounce in code | | Very short range (under 5 cm) | Potentiometer misadjusted; black target | Recalibrate; use reflective tape on target | | Module gets hot | Reverse polarity | Immediately disconnect; check pinout version | How does the FC-51 stack up against common alternatives?

The FC-51 can run on 3.3V, making it safe for Pi GPIO. Use the same pinout but connect VCC to 3.3V. | Condition | Output Pin | Output LED

| Condition | Output Pin | Output LED | | :--- | :--- | :--- | | No object in front | HIGH (1) | OFF | | Object within set range | LOW (0) | ON | The FC-51 features a small, blue potentiometer (variable resistor) on the back of the PCB. Turning this potentiometer changes the comparator’s reference voltage, effectively adjusting the sensitivity.

Brother PE Design 11
Brother PE Design 11 Software Key
1
Scan the code