I made this robot for my 5th grade science fair. It follows
a black line on something white. Its base is made of legos, with two lego motors and lego gears. It is powered by a 9-volt battery. I put an upside-down breadboard on top of it with a circuit I designed. It only used four transistors, some resistors and two potentiometers for adjusting it.
My robot uses LEDs and CDS cells to sense the line. It
has two LEDs, one on each side of the line, and two CDS
cells, one on each side of the line. Whenever one of
the CDS cells goes over the line(the line bends and the robot keeps going), the robot turns in the direction of the
CDS cell over the line. The only problem I had (which I
didn't fix until after the science fair) was that when
the motor turned off the wheel it was powering would keep
coasting, and it would drive off the line on sharp turns.
After trying to fix this with a more complicated
circuit, I finaly found out that all I had to do was put
a piece of electrical tape over the gears for the wheels.
The tape didn't stop them from turning when the motor
was on, but it did stop it from coasting when the motor was
off.
I was doing my science fair project on electronics,
and I thought of the idea of making a line following
robot. I remember thinking that I only had 2 weeks, so I
know it took me less than 2 weeks to build. It didn’t
cost me any money, because I already had all the supplies.