Instructables
Picture of Line Following Robot

This is a Line Following Robot. It follows a black line that is drawn. It is able to detect the black line through one photocell and one analog light sensor. There is an LED in between the two sensors that gives off red light when the Arduino is powered on. Then, when the light is reflected back, more light is detected when it is reflected on the white surface, compared to when it is reflected on the black surface. Using this, the right and left servo motors move accordingly to turn left or right when the sensors detect white surface rather than black. I used the Parallax BOEBot Robot for Arduino Kit as my base for the robot. Then I placed a breadboard in front of the base to attach all the sensors with the LED to face the black line.

Follow these steps, and you will be able to build your own line following robot! :)

 
Remove these adsRemove these ads by Signing Up

Step 1: Step 1: Parts

Picture of Step 1: Parts
DSC_0095.JPG
DSC_0098.JPG
DSC_0101.JPG
DSC_0077.JPG
DSC_0104.JPG
DSC_0085.JPG
DSC_0086.jpg

Parts needed:

  1. Arduino
  2. Motor Shield (https://www.adafruit.com/products/1438)
  3. LED with 100 ohms resistor
  4. Photo cell with 1K ohms resistor (https://www.adafruit.com/products/161)
  5. GA1A12S202 Log-scale Analog Light Sensor (https://www.adafruit.com/products/1384)
  6. A base for the robot with 2 wheels attached to servo motors ** I used : Parallax BOEBot Robot for Arduino Kit (https://www.adafruit.com/products/749)
  7. A breadboard
  8. A battery with a battery holder
  9. Black marker or black tape with white papers
  10. Tape to tape all the parts together
  11. Wire to connect all the parts (also jumper wires)
Can we use another photocell instead of the analog sensor ??
helenbang (author)  Arduino Tech15 days ago

Yes, of course you can! I just had the sensor with me, so I decided to work with both of them (just for fun)!

Nice project, why there a long wire attach to it,when the robot moving??

helenbang (author)  Magesh Jayakumar15 days ago

The black wire is just the USB cable to my laptop to power the robot. I was missing my batteries, so I had to take the video with the cable attached. :)

trus908 months ago

what's on top of the robot, above the motor shield?

Very nice project!!!

helenbang (author)  trus9015 days ago

Its just a protoshield! :) Thank you!

I saw this on the front tech page and thought "Huh, looks like that thing Matthew was working on"

I should have known it was you. Great work!

helenbang (author)  carolinebholmes8 months ago

hahahahahahaha yessss! I got it finally done right before break and now I had the time to post it! Thanks :)

helenbang (author)  oho8 months ago

Thank you oho! :))

nodcah8 months ago

Voted! Great simple project! =D

helenbang (author)  nodcah8 months ago

Thank you!! :D

This is so cool! I love these little guys!

helenbang (author)  Penolopy Bulnick8 months ago

haha thank you! :)