How to use a phototransistor for a line follow robot

arduinophototransistor

I'm building a line follow robot for a competition in 2 months and I'm using Arduino but I have no idea how to find the line (what sensors needed). I did some research and discovered that if I can use a photo transistor and red LED to detect the line. I wanted to know would this set-up work? Will the data received be fast and accurate?

Best Answer

This is a very very ... common application - if you search the web you will find a very large number of methods and circuits and practical guides.

This page - Line following robot sensor is one of the many you could find.
The advantage of this method over many others is that it uses an integrated :"transmitter receiver" IC (a CNY70) which means you do not have to worry about relative alignment of the two parts - you just positiuon the sensor near the line and detect the reflected (or not) signal. The CNY70 is an old IC but also very available.
If using it read the data sheet carefully - you'll find that the transmitter and receiver polarity are opposite - ask me how I know :-) (from long long ago).

enter image description here

https://www.google.co.nz/search?q=line+following+robot&espv=2&tbm=isch&tbo=u&source=univ&sa=X&ei=tvzeU-qfL87j8AX4-4KQCg&ved=0CB0QsAQ&biw=2133&bih=1194&dpr=0.9

The rest of the circuit is more complex than necessary - butr not too much so - you can take input to the Arduino from "SIG".


Lots of detail here.
Fig 1 shows what you want.
LM324 IC is cheap and available.
He uses 4 sensors - how many you use is up to you.
He also provides AVR code.

Award winner from VingPeaw Competition 2543 , the robot built with 2051, L293D, and four IR sensors. Simple circuit and platform, quick tracking and easy-understand program using C language.


Simple 2 sensor LFR looks good

And another

and more ...



Here are many many many examples - each is linked to a related page