# Where to start with building a line following robot?

Hey there,

So for school I need to build a line following robot. I haven't done anything like this before, although we have been familiarized with programming for the arduino during lab sessions, and I am familiar with breadboarding.

I have already decided on PID control with 2 differential motors.

Also, for the line sensor I have decided on using infrared.

Additionally, for power we are restricted to either 1x6 pack of 1.5V AAs or 2x3 pack of 1.5V AAs.

I was wondering if there are any useful tips or places to get started, or any advice that you guys could offer.

Thanks for your help!

I just googled “line following robot” and got over 4 million hits. There were some very good write-ups in the first 2 pages. I’d start there.

It’s probably your best shot.

A 555 timer, two photoresistors.

A 555 timer, two photoresistors.

I think we should assume that because the OP posted here and not the "two LDRs and a 555 forum" that they want to use a micro controller.

AWOL:

A 555 timer, two photoresistors.

I think we should assume that because the OP posted here and not the "two LDRs and a 555 forum" that they want to use a micro controller.

But if a simpler solution seems feasible, it's reasonable to point that out. (I don't think I'm smart enough to solve this with the timers, but it sounds like somebody is.)

Hi,

Take a look at the ArduinoInfo.Info WIKI here: http://arduino-info.wikispaces.com/Robot+7-wayMultiTrackingSensor

You can make you own equivalent of this sensor array with infrared LEDs and IR Phototransistors, or typical "Reflective Object Sensors" like these: http://goo.gl/lfKlU

But there's a LOT more to this! As the WIKI says:

Line following Algorithm? Now someone just needs to write a function that takes this data and outputs Left and Right Motor speeds from -100 (full reverse), to 0 (stop), to 100 (full forward) and follows a line. Dynamic control based on amount of error would be nice, maybe even PID. See the Video above to get an idea of what is needed.

...but we hope that learning this Mechatronics stuff is why you took the class!

Please make sure you come back and tell us what you did and how it worked out so WE learn something too !

DISCLAIMER: Mentioned stuff from my own shop...