Description:
5-channel tracing module analog output and distance, object color related.
5-way infrared tracking sensor overview:
Based on the TRCT5000 infrared reflection sensor, it is often used to make tracking smart cars. The infrared emitting diode of the TRCT5000 sensor continuously emits infrared rays. When the emitted infrared rays are reflected by the object, they are received by the infrared receiver and output analog values. The output analog value is related to the object distance and the color of the object. The position of the tracking line is judged by calculating the analog value of the five outputs.
How it work:
The stronger the infrared reflection (white), the larger the output, the weaker the infrared radiation (black), and the smaller the output.
The closer the detector is to the black line, the smaller the output, so that the distance of the black line can be judged by the output analog.
The smaller the value, the closer the sensor is to the black line. Compared with other track sensors that can only output high and low levels, the 5-channel analog output of this product can feedback the distance of the black line, and the feedback is more accurate.
Wiring:
VCC: VCC is the positive input port of the power supply and can be connected to the voltage of 3.3V~5V.
GND: GND is the negative input of the power supply
3. OUT1~5: OUT is the signal output port, which links the I/O port of the MCU.
The sensor adopts TCRT5000, which uses infrared light detection, high sensitivity, anti-interference and stable performance.
Features:
Kit include:
1 x 5 channel IR Sensor TCRT5000 Line Track Follower Module
Mikroelectron Code:
/* For Testing purpose only*/
void setup()
{
Serial.begin(115200);
Serial.println("TRSensor example");
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);
pinMode(A4, INPUT);
}
void loop()
{
Serial.print(analogRead(A0));
Serial.print(" ");
Serial.print(analogRead(A1));
Serial.print(" ");
Serial.print(analogRead(A2));
Serial.print(" ");
Serial.print(analogRead(A3));
Serial.print(" ");
Serial.print(analogRead(A4));
Serial.println();
delay(200);
}