Tcrt5000 infrared modules not working

Hello, I have no experience with arduino, but we are task to create a robot as one of our projects in school. We bought an already made robot online, but the tcrt5000 infrared tube is not working. This sensor is what we need to meet our robot proposal. We have three sensors, the center is connected to the d8, left to d7, and right to A1.

I have tried putting it in a black cardboard, cloth and even plastic, but the digital read is always zero. The status led is always on, where ever I put it, even when I lift it away from anything.

The analog read also does not change much on any surface, the center would change up to 10 value, while the other 2 only changes up to 1.

Searching the internet says that it could be power problem, but it is the same even when fully charged. I also don't know how to adjust the sensitivity, all the tutorial(Youtube) I saw never adjusted theirs.

This is my code:

void setup()
{
  Serial.begin(9600);
  pinMode(7, INPUT);//Left line tracking sensor is connected to the digital IO port D7
  pinMode(8, INPUT);//Center line patrol sensor is connected to the digital IO port D8
  pinMode(A1, INPUT);//Right line tracking sensor is connected to the digital IO port D9
}

void loop()
{
  Infrared_Tracing();

}

/*Define a sub-function, 
 the function of this function is to read the output signal 
 of the infrared tracking sensor and print it to the serial monitor*/
void Infrared_Tracing() 
{
  int Left_Tra_Value = 1;
  int Center_Tra_Value = 1;
  int Right_Tra_Value = 1;
  Left_Tra_Value = digitalRead(7);
  Center_Tra_Value = digitalRead(8);
  Right_Tra_Value = digitalRead(A1);
  Serial.print("Left Tracking value:");
  Serial.println(Left_Tra_Value);
  Serial.print("Center Tracking value:");
  Serial.println(Center_Tra_Value);
  Serial.print("Right Tracking value:");
  Serial.println(Right_Tra_Value);
  Serial.println("");
  delay(500);
}

This is the sensor:

This is where it is connected:

This is my first time using this platform, I apologize if I did something wrong.

Tell us what you were using for a reflector and how far away from the sensor! The document says " Detecting the reflected distance: 1mm ~ 25mm applicable". What was your distance?

There is NO analog read for this sensor. Only digital 0 for no reflection, 1 for reflection. Adjust the sensitivity pot for the distance you need.

I used white bond paper, and black electrical tape on a white paper, on a wood, and on white tiles. I also used black card board, but always gets 0 in digital read. Also, on all the tutorial that I followed, the led status only lights up if the sensor have something near it, while mine is always on, Even the guide provided by the item itself.

The distance is about 6-8 cm I guess. But I did tried closer and farther.

Seems like you need to make a drawing of how you have this thing connected to your Arduino so we can see what you see.

This is the official guide of the item:

Now make a pencil and paper drawing of how you have it wired and note what pin is connected to what pin and how you have the power supply wired.

Do you think each of the sensor will see the IR from the sensor next to it?

I apologize, but I don't know what you mean? This is my first time using arduino, and I'm just following tutorials. If you meant the 3 wires connected to the sensors. It was already wired, I just need to connect it to the board. The 3 wired is also encased in black plastic, so I can't play with it by changing what pins goes to what pins. If the pin is the 3 wires together, then the center sensor is connected to the D8. If the pin is the individual wire, then I don't know what each pin in the D8 line is called.

I got it, it was miss wired, I just needed to flip the black casing.

Encircled one is correct:

Thank you for your help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.