my line follower

I had successfully completed my 2nd line follower with arduino

its not that good though but for beginner i believe its ok... :wink:
but i face a problem... if u see the video closing you will see my robot sways and zigzags too much.... is there someway i can make it go straight and faster.... i used 4 sensors... i have currently reduced my speed becoz if i increase speed it zigzags even more violently. now i am completely overhauling this robot to make a new one any suggestions to avoid this problem in new robot?
thanx in advance :slight_smile:

It needs some kind of a look ahead so it knows how much it needs to turn to get to the target. The zigzag is caused by overshooting the target. Find a way to make it not overshoot, and you should remove most of the oscillation.

yeah wanted to knw how to reduce that overshoot...

Perhaps you can use the PID library to control overshoot and improve line following?

It's in the Playground: Arduino Playground - PIDLibrary

Sorry I can't be of more help, I haven't used it myself yet.

5kb is lots of space.... :o

Hello.

What are you using as your robot controller? You might find the PID line following section of the 3pi robot user's guide helpful. To really use PID well, you want to find a way to convert the sensor readings into a single "position" value that tells you where the line is. Ideally, the function you come up with will vary monotonically as the sensor array sweeps over the line. That is to say, as you sweep across the line, you want your position value to always increase as you move in one direction and always decrease as you move in the other. If the position value sometimes increases and sometimes decreases for the same sweep direction, the PID algorithm could result in instability problems.

i am using an old arduino atmega 8 board