5V
5V
20mA
1-10mm
1ms
3 x Digital Output (High/Low)
Onboard Potentiometer
24mm x 22mm x 10mm
10g
Applications
| The 3 Channel IR Infrared CTRT5000 Line Detection Module is suitable for a wide range of applications, including |
Robotics
Autonomous vehicles
Automated guided vehicles (AGVs)
Line following robots
Edge detection in industrial automation
Surface inspection systems
Obstacle detection systems
Technical Support
For more information, please refer to the datasheet or contact our technical support team for assistance with integrating the 3 Channel IR Infrared CTRT5000 Line Detection Module into your project.
3 Channel IR Infrared CTRT5000 Line Detection Module DocumentationOverviewThe 3 Channel IR Infrared CTRT5000 Line Detection Module is a sensor module designed for line detection applications in robotics, automation, and IoT projects. The module features three infrared sensors, which detect the reflection of infrared light from the surface, allowing it to detect lines, boundaries, or edges.Pinout and ConnectionsThe module has a 3-pin interface:VCC (Power Supply, 5V)
GND (Ground)
OUT (Output, Digital)Technical SpecificationsOperating Voltage: 5V
Operating Current: 10mA
Detection Range: 1-10mm
Response Time: 10ms
Sensor Type: Infrared LED and PhotodiodeCode Examples### Example 1: Basic Line Detection using ArduinoIn this example, we'll use the 3 Channel IR Infrared CTRT5000 Line Detection Module with an Arduino Board to detect a line and trigger an LED accordingly.Hardware Requirements:Arduino Board (e.g., Arduino Uno)
3 Channel IR Infrared CTRT5000 Line Detection Module
LED
Jumper Wires
BreadboardCode:
```c++
const int ledPin = 13; // Choose a digital pin for the LED
const int irPin = 2; // Choose a digital pin for the IR sensor outputvoid setup() {
pinMode(ledPin, OUTPUT);
pinMode(irPin, INPUT);
}void loop() {
int irState = digitalRead(irPin);
if (irState == HIGH) {
digitalWrite(ledPin, HIGH); // Turn on the LED when the line is detected
} else {
digitalWrite(ledPin, LOW); // Turn off the LED when no line is detected
}
delay(50); // Debounce time
}
```
### Example 2: Line Following Robot using Raspberry Pi and PythonIn this example, we'll use the 3 Channel IR Infrared CTRT5000 Line Detection Module with a Raspberry Pi to create a line following robot.Hardware Requirements:Raspberry Pi
3 Channel IR Infrared CTRT5000 Line Detection Module
Robot chassis with motors
Jumper Wires
BreadboardCode:
```python
import RPi.GPIO as GPIO
import time# Set up GPIO pins
GPIO.setmode(GPIO.BCM)
ir_pin = 17 # Choose a GPIO pin for the IR sensor output
motor_left_forward = 23
motor_left_backward = 24
motor_right_forward = 25
motor_right_backward = 26# Set up motor control pins as outputs
GPIO.setup(motor_left_forward, GPIO.OUT)
GPIO.setup(motor_left_backward, GPIO.OUT)
GPIO.setup(motor_right_forward, GPIO.OUT)
GPIO.setup(motor_right_backward, GPIO.OUT)while True:
ir_state = GPIO.input(ir_pin)
if ir_state == GPIO.HIGH:
# Line detected, move forward
GPIO.output(motor_left_forward, GPIO.HIGH)
GPIO.output(motor_right_forward, GPIO.HIGH)
time.sleep(0.1)
else:
# No line detected, turn
GPIO.output(motor_left_backward, GPIO.HIGH)
GPIO.output(motor_right_forward, GPIO.HIGH)
time.sleep(0.1)
GPIO.output(motor_left_forward, GPIO.LOW)
GPIO.output(motor_left_backward, GPIO.LOW)
GPIO.output(motor_right_forward, GPIO.LOW)
GPIO.output(motor_right_backward, GPIO.LOW)
time.sleep(0.1)
```
These examples demonstrate the basic usage of the 3 Channel IR Infrared CTRT5000 Line Detection Module in different contexts. You can modify and extend these examples to suit your specific project requirements.