The 4 Channel Infrared Tracing Module is a sensor module designed for line-following robots. It is capable of detecting infrared light to trace lines on a surface, making it an essential component for robotics projects that require precise path-following capabilities. This module is widely used in educational robotics, hobby projects, and automated guided vehicles (AGVs).
Parameter | Value |
---|---|
Operating Voltage | 3.3V - 5V |
Operating Current | 20mA |
Output Type | Digital (High/Low) |
Detection Range | 0.1cm - 3cm |
Dimensions | 50mm x 20mm x 10mm |
Weight | 10g |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V - 5V) |
2 | GND | Ground |
3 | OUT1 | Digital output for sensor 1 (High/Low) |
4 | OUT2 | Digital output for sensor 2 (High/Low) |
5 | OUT3 | Digital output for sensor 3 (High/Low) |
6 | OUT4 | Digital output for sensor 4 (High/Low) |
// Sample code to read values from the 4 Channel Infrared Tracing Module
// and print them to the Serial Monitor.
const int sensor1Pin = 2; // Connect OUT1 to digital pin 2
const int sensor2Pin = 3; // Connect OUT2 to digital pin 3
const int sensor3Pin = 4; // Connect OUT3 to digital pin 4
const int sensor4Pin = 5; // Connect OUT4 to digital pin 5
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud rate
pinMode(sensor1Pin, INPUT); // Set sensor pins as input
pinMode(sensor2Pin, INPUT);
pinMode(sensor3Pin, INPUT);
pinMode(sensor4Pin, INPUT);
}
void loop() {
int sensor1Value = digitalRead(sensor1Pin); // Read sensor values
int sensor2Value = digitalRead(sensor2Pin);
int sensor3Value = digitalRead(sensor3Pin);
int sensor4Value = digitalRead(sensor4Pin);
// Print sensor values to Serial Monitor
Serial.print("Sensor 1: ");
Serial.print(sensor1Value);
Serial.print(" | Sensor 2: ");
Serial.print(sensor2Value);
Serial.print(" | Sensor 3: ");
Serial.print(sensor3Value);
Serial.print(" | Sensor 4: ");
Serial.println(sensor4Value);
delay(100); // Small delay to avoid flooding the Serial Monitor
}
No Detection: The module does not detect the line.
False Positives: The module detects lines where there are none.
Inconsistent Readings: The sensor values fluctuate.
By following this documentation, users can effectively integrate and utilize the 4 Channel Infrared Tracing Module in their line-following robot projects, ensuring accurate and reliable performance.