Line Tracking with Arduino

I ordered a number of infrared line trackers for my class in September.  At 33 cents per sensor the price was awesome:

First things first I checked out the datasheet for them.  Since I’m travelling I don’t have any resistors but based on the voltages I should be fine for a short test.  Time to wire it up.

Wired up line tracker
Yellow is out on sensor to A0 on Arduino.
Red is VCC on sensor to 5V on Ardunio.
Black is Gnd

For the code the AnalogReadSerial example is all I need to test it out.  The sensor worked great – when a dark object (i.e. phone case) was 1 cm away it was receiving a value of 0.  When white paper was held 1 cm away a value of 1007 was received.


Next Stage:

One of the tasks that my students will be required to complete is to build a variety of line following robots – from the simple (i.e. turn left if on black, turn right if on white) to the complex (PID – proportional integral derivative).


PID tutorial

PID Line follower

Using IR Sensor

Line Follower

Infrared line tracker
Infrared line tracker

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s