AED 19.95
Description
The TCRT5000 Red 3Ch Line Follower Sensor features three channels of infrared sensors that use infrared light to distinguish between dark and light colors, particularly black and white, based on the difference in surface color. It operates on 5V and produces a low output when detecting a black line and a high output when detecting a white line. The sensor is easy to install with its fixed bolt hole and is beneficial for robotics projects, specifically for creating line-follower robots. It emits an infrared beam onto an object and measures the amount of light reflected back to accurately track and follow lines.
Package Includes:
- 1 x Funduino TCRT5000 3Ch Line Follower Sensor Red
Features:
- Uses three infrared sensors to detect surface color differences, specifically black and white lines
- Provides a digital output, with a low output when detecting a black line and a high output when detecting a white line
- Operating voltage of 5V
- Compact design with a fixed bolt-hole for easy installation
- Suitable for line following robots, sumo/mini-sumo robots, and other applications that require infrared tracking detection
- Emits an infrared light beam onto the object and measures how much light is reflected back
- Can be used for various robotics projects that require accurate tracking and detection of lines
Description:
The Line Follower 3 Channels Infrared Tracking Detection Sensor TCRT5000 Red is an electronic sensor used in robotics projects. The sensor is made up of 3 channels of infrared sensors that detect the difference in surface color by distinguishing between dark and light colors, specifically black and white. The sensor operates on a voltage of 5V and has a fixed bolt-hole for easy installation. When the sensor detects a black line, the output is low, while the output is high when it detects a white line. The TCRT5000 reflective optical sensor is designed for line-following robots, sumo/mini-sumo robots, and other applications that require infrared tracking detection. With a size of 118 mm x 80 mm x 10mm and weighing only 11 grams, this sensor is compact and easy to use. It works by shining a beam of infrared light onto an object and measuring how much light is reflected back. This sensor is a valuable tool for anyone working on robotics projects that require accurate tracking and detection.
Principle of Work:
The Funduino 3CH Line Follower IR Module, which is based on the TCRT5000 reflective optical sensor, works on the principle of detecting the difference in surface color by using three infrared (IR) sensors to distinguish between dark and light colors, specifically black and white lines. When the module is placed over a surface, it emits an IR light beam onto the surface and measures the amount of light that is reflected back. When the module is over a light-colored surface (usually white), the IR light will be reflected back to the sensor, which will produce a high output signal. On the other hand, when the module is over a dark-colored surface (usually black), the IR light will be absorbed by the surface and will not be reflected back to the sensor, which will produce a low output signal.
This output signal can then be used to control a robot's movement in order to accurately track and follow lines. The module is designed with three IR sensors aligned in a line to provide a more accurate reading of the surface color differences, making it an ideal component for use in line-following robots and other similar applications.
Pinout:
- VCC: This pin is used to power the module and should be connected to a 5V power source.
- GND: This pin is the ground connection for the module and should be connected to the ground of the power source.
- L: This pin is the digital output for the left sensor, which detects whether the module is over a dark or light surface on the left side of the module.
- C: This pin is the digital output for the center sensor, which detects whether the module is over a dark or light surface in the center of the module.
- R: This pin is the digital output for the right sensor, which detects whether the module is over a dark or light surface on the right side of the module.
The L, C, and R outputs can be used to control a robot's movement based on the position of the line being followed, making it an ideal component for use in line-following robots and other similar applications.
Applications:
- Line-following robots: The module can be used to build robots that can follow a line autonomously, making them useful for applications such as warehouse automation, transportation systems, and even amusement park rides.
- Automated guided vehicles (AGVs): AGVs are used to transport materials and goods in manufacturing and warehousing environments. The Funduino 3CH Line Follower IR Module can be used to help guide these vehicles along predetermined paths and avoid obstacles.
- Traffic control: The module can be used to detect and track lines on roads, enabling automated traffic control systems to manage traffic flow more efficiently and safely.
- Industrial automation: The module can be used to guide robotic arms or other machinery in industrial automation applications, such as assembly lines or material handling systems.
- Educational projects: The module is a popular component for educational robotics projects, helping students learn about electronics, sensors, and robotics while building their own line-following robots.
Circuit:
Connect the Arduino board to the 3-way IR sensor module. Use the circuit diagram below :
Library:
No need for any library here.
Code:
The code defines the pin connections and sets up the Arduino board. It then reads the values of the 3 infrared sensors connected to pins 6, 7, and 8. Depending on the sensor readings, the code calls various functions to control the two motors. The left motor is controlled by pins ENA, IN1, and IN2 while the right motor is controlled by pins ENB, IN3, and IN4.
#define left 6 #define center 7 #define right 8 //motor one #define ENA 9 #define IN1 2 #define IN2 3 //motor two #define ENB 10 #define IN3 4 #define IN4 5 int Speed = 120; // speed of this robot void setup() { Serial.begin(9600); pinMode(left, INPUT); pinMode(center, INPUT); pinMode(right, INPUT); pinMode(ENA, OUTPUT); pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); pinMode(ENB, OUTPUT); } void loop() { bool leftV = digitalRead(left); bool centerV = digitalRead(center); bool rightV = digitalRead(right); Serial.println(rightV); if (leftV == 1 && centerV == 0 && rightV == 1) { carforward(); Serial.println("forward"); } else if (leftV == 0 && centerV == 0 && rightV == 0) { carStop(); } else if (leftV == 1 && centerV == 1 && rightV == 1) { carStop(); } else if (leftV == 0 && centerV == 0 && rightV == 1) { carturnleft(); } else if (leftV == 1 && centerV == 0 && rightV == 0) { carturnright(); } else if (leftV == 0 && centerV == 1 && rightV == 1) { carturnleft(); } else if (leftV == 1 && centerV == 1 && rightV == 0) { carturnright(); } } void carforward() { analogWrite(ENA, Speed); analogWrite(ENB, Speed); digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); } void carturnleft() { analogWrite(ENA, Speed); analogWrite(ENB, Speed); digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); } void carturnright() { analogWrite(ENA, Speed); analogWrite(ENB, Speed); digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); } void carStop() { digitalWrite(IN1, LOW); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, LOW); }
The code uses the analogWrite()
function to control the speed of the motors by sending a PWM signal to pins ENA and ENB. The digitalWrite()
function is used to set the direction of rotation of the motors by sending a high or low signal to pins IN1, IN2, IN3, and IN4. The carforward()
, carturnleft()
, and carturnright()
functions are called depending on the sensor readings to control the direction of the motors. The carStop()
function is called to stop the motors. The Serial.println()
function is used to print out the sensor values and the direction of the robot to the serial monitor for debugging purposes.
Technical Details:
- TCRT5000 reflective optical sensor
- 3 sensors aligned in line
- Digital output
- Operating Voltage: 5V
- Size: 118 mm x 80 mm x 10mm
- Weight: 11
Resources:
Comparisons:
A line follower robot using a single-channel IR module can only detect a black line on a white surface or a white line on a black surface. This can be limiting in certain situations and may not allow for more complex line-following tasks. On the other hand, a line follower robot using the Funduino TCRT5000 3-channel IR module can detect lines of any color and can also be used to track multiple lines at the same time. This allows for more complex line-following tasks and greater versatility in robotics projects. Additionally, the use of multiple sensors in the 3-channel IR module can provide more accurate readings and help to eliminate errors or false readings that may occur with a single sensor.