Home ArduinoArduino Code Arduino 4 channel line tracker sensor example

Arduino 4 channel line tracker sensor example

The next module to take a look at is quite often entitled 4-CHANNEL LINE TRACKER SENSOR, thats exactly what it does the module consists of a main module and 4 little sensor/reciever modules that connect via a 3 pin cable

here is a typical module and cables

The 4-Channel Line Tracker sensor provides an easy way for line tracking. A line sensor is composed of a number cells and each cell is composed of a sender and a receiver. The particularity of this sender/receiver pair is that it sends light that shall be reflected by the line to be detected but not by the eventually opaque background surrounding this line. Any sender/receiver pair that is able to make a difference between a line and the rest of ground (of a different color) can be used in a line sensor.

VCC pin is connected to 5V , GND pin is connected to the GND, S1, S2, S3, and S4 pins are connected to the digital I/O pins 2 – 5 but you can use others

Features

Operating voltage: DC 3.3V-5V
Operating Current:>1A
Operating temperature: -10 C – +50 C
Mounting Hole: M3 screws
Detection distance: 1mm to 60 CM adjustable, the closer the distance,the more stable performance, and white reflection farthest.
Output Interface: 6-wire (1234: signal output, +: positive supply -: ground)
Output signal: TTL level

 

Schematic

Code

Basic stuff here

[codesyntax lang=”cpp”]

void setup()
{
 Serial.begin(9600);
}

void loop()
{
 Serial.print(digitalRead(2));
 Serial.print(" ");
 Serial.print(digitalRead(3));
 Serial.print(" ");
 Serial.print(digitalRead(4));
 Serial.print(" ");
 Serial.println(digitalRead(5));
 delay(1000);
}

[/codesyntax]

 

Testing

The sensor module has a HIGH output when its placed over a black line, otherwise its LOW.

 

Links

You can pick one of these modules up for as little as $2.10
Newest 4-Channel Infrared IR Line Detector Patrol Tracking Sensor Module DC 3.3V-5V Durable Quality Sensors Modules lines

You may also like