Let's Make Robots!

Line follower bot

Torrentula's picture
Following a line
Cost to build: 
$75
Time to build: 
3 hours
Weight: 
250 grams

Hey everyone!

I'm new to LMR and I'd like to post my first robot. It is a simple line following bot. It can follow a black line on a white background and vice versa.

These are the parts I used:

  • ATmega8
  • 2 hacked Servos
  • 3 CNY70 reflex optocouplers
  • 1 74HC14 schmitt-trigger

I built the robot because I got fed up with the other robot project I worked on and I wanted to get some kind of robot going. The idea of a line following robot seemed very simple. Just hook up 3 CNY70 to a schmitt trigger, connect this to the microcontroller and then let the microcontroller decide wich way the robot should go.

The robot needs a little more tweaking but actually it's pretty good at what it is supposed to do

Some more images:

ATmega8 "The brain"

 

 

The sensors

 

Tell me what you think :)

So long

Torrentula

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

schematic & code??

Andres Briano's picture

Welcome to LMR, Torrentula!

I found it a very interesting approach to line following, using Reflex Optocouplers. I didn´t know they even existed, so I did a little research. At first I thought "Cool, a simpler and cheaper IC that can replace Sharp sensors!" But the Datasheet indicates that beyond 10mm, the coupler will not detect an object in front of it. Did this pose problems for you? Having the detectors so close to the ground?

Cool project and thanks for sharing.

Andrés

PS: Where are you from?

Torrentula's picture

Cool project and thanks for sharing.

Thanks a lot!

"Cool, a simpler and cheaper IC that can replace Sharp sensors!" But the Datasheet indicates that beyond 10mm, the coupler will not detect an object in front of it.

In my case the sensors being close to the ground didn't cause any problems because they are not sitting directly on the ground. The 5mm LED in the front of the sensor board ensures, that the sensors don't touch the ground. The CNY70 is not desgined to be a distance sensor. I don't know for what purpose they were originally designed but they make great line following sensors.

 

Torrentula

 

P.S.: I'm a student from Germany

ignoblegnome's picture

The CNY70 is a reflective sensor. It is great for line following, and could also be used to read an encoder wheel or any other application where you want to detect a dark-light transistion.

The QRD1114 is a similar device, and their are others out there as well.

Andres Briano's picture

I see. I am already thinking of different uses for them!!

propellerheadgeek's picture

Very cool! I like it.

Krumlink's picture
Very nice! Here's a little walk through I wrote about batteries, It might help you out on 9V batteries, since they can be the source of many problems: http://letsmakerobots.com/node/28427
Torrentula's picture

Hey Krumlink!

I had just the problem you described in your guide with the 9V battery getting drained by the 2 servos in minutes. The pictures are not up to date, because I added a second 7805 which is regulating the Voltage from a 9V Battery to 5V for the sensors and the microncontroller.

The guys from the german robot forum also suggested using NiMh batterys in AA size.

Thanks for your help!

Torrentula