Line follower bot

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

Following a line

  • Actuators / output devices: 2 servos
  • CPU: atMega8
  • Programming language: C
  • Sensors / input devices: CNY70

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/line-follower-bot

Very nice! Here’s a little
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:

Hey Krumlink!I had just the

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

Very cool! I like it.

Very cool! I like it.

Welcome to LMR, Torrentula!

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?

Cool project and thanks for

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

The CNY70 is a reflective

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.

I see. I am already thinking

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

schematic & code??

schematic & code??