Society of Robots - Robot Forum

Mechanics and Construction => Mechanics and Construction => Topic started by: stewazy on April 05, 2013, 01:56:22 AM

Title: My first robot - line follower
Post by: stewazy on April 05, 2013, 01:56:22 AM
Hello, I'm trying to make a line follower robot with a microcontroller arduino uno, im a total newbie in applied electronics, im building a robot from scratch, i need parts and tools. I found a fiew schematics online for microcontroller and motor connection i will be using 2 DC motors from a fan or something old, but now i dont know with sensor to take and what logic to use for the line following. Can you guys suggest a sensor and how to make it and how to connect it with a microcontroller. Thank you for the answer in advance :)
Title: Re: My first robot - line follower
Post by: ErikY on April 05, 2013, 06:48:21 AM
Ive done a line follower with a phototransistor.

I used this one, which has the IR and the phototransistor combined which is very convenient, but not necessary:

http://www.mouser.com/Search/ProductDetail.aspx?R=TCRT5000Lvirtualkey61370000virtualkey782-TCRT5000L (http://www.mouser.com/Search/ProductDetail.aspx?R=TCRT5000Lvirtualkey61370000virtualkey782-TCRT5000L)

You really need to use multiple phototransistor/IR sensors so that you can have enough control.

I used 5 of them, and my code was all about constantly trying to get the line in the center, by checking the values of the phototransistors and turning left or right appropriately.