Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
135 views

3way Line Tracker Sensor Tutorial

The Line Tracker Sensor (3 Channels) consists of 3 IR transmitter and receiver pairs to detect lines. It has 3 digital outputs indicating the presence of a line detected by each sensor. The sensor can detect both dark and bright lines. It connects to an Arduino board to monitor the 3 sensor states and output the readings to the serial monitor.

Uploaded by

Josue Paz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views

3way Line Tracker Sensor Tutorial

The Line Tracker Sensor (3 Channels) consists of 3 IR transmitter and receiver pairs to detect lines. It has 3 digital outputs indicating the presence of a line detected by each sensor. The sensor can detect both dark and bright lines. It connects to an Arduino board to monitor the 3 sensor states and output the readings to the serial monitor.

Uploaded by

Josue Paz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Line Tracker Sensor (3 Channels)

Line Tracker sensor consists of 3 IR transmitter and IR receiver pairs. This


tracker sensor is typically used for robots in line following task. It can be used
for either dark or bright line following. The tracker sensor have 3 digital outputs

s
to user indicating the existence of the line. Every sensor is provided with its own

ic
LEDs as indication of line detection.

on
tr
ec
El
r e

Features:
tu

1- Three way tracing sensor.


Fu

2- The distance adjustable, stable performance.

3- The working voltage 5 v, white line output low level.

w w w . f u t - e l c t r o n i c s . c o m Page 1
PRODUCT LAYOUT:

s
ic
on
tr
ec
El

Label Function
A Sensor Indicator LEDs
e

B Distance Adjustable (potentiometer)


r

C Power and output signal connectors


tu

D LM 339
Fu

A – Sensor indicator LEDs (red) will light down showing that it detects line.

B – Distance adjustable is used to enter different distance.

C – Power and output signal connector

D – LM 339 for signal conditioning.

w w w . f u t - e l c t r o n i c s . c o m Page 2
Connection with Arduino

s
ic
on
tr
ec
El
r e
tu

Arduino Code:
const int PinL = 2;
const int PinC = 3;
Fu

const int PinR = 4;

int LState = 0;
int CState = 0;
int RState = 0;

void setup() {

w w w . f u t - e l c t r o n i c s . c o m Page 3
Serial.begin(9600);
pinMode(PinL, INPUT);
pinMode(PinC, INPUT);
pinMode(PinR, INPUT);
}

s
void loop() {
LState = digitalRead(PinL);

ic
CState = digitalRead(PinC);
RState = digitalRead(PinR);

on
if (LState == HIGH) {Serial.print(" black1"); Serial.print(" "); }
if (LState == LOW){Serial.print(" white1");Serial.print(" "); }

tr
if (CState == HIGH) {Serial.print(" black2"); Serial.print(" ");}
if (CState == LOW) {Serial.print(" white2");Serial.print(" "); }
ec
if (RState == HIGH) {Serial.print(" black3"); Serial.print(" "); }
El

if (RState == LOW) {Serial.println(" white3"); Serial.print(" ");}

Serial.println("****************************");
r e

delay(1000);
}
tu
Fu

w w w . f u t - e l c t r o n i c s . c o m Page 4
The Result:

s
ic
on
tr
ec
El
r e
tu
Fu

w w w . f u t - e l c t r o n i c s . c o m Page 5

You might also like