Shop OBEX P1 Docs P2 Docs Learn Events
Infrared Line Following Issues — Parallax Forums

Infrared Line Following Issues

becgracenetbecgracenet Posts: 3
edited 2016-01-29 17:28 in BASIC Stamp
Hello! I am curious as to how to make a line following program using an infrared sensor could work more efficiently? The infrared sensor covers the entire bottom and uses 8 (S0-S7) sensors, nearly on the ground, to follow a black line. However, the program my peers and I have is fairly choppy and doesn't always work; it's also slow. Does anyone know of any way to improve this? We are also using a ColorPAL from Parallax to detect certain colors, pause, and light up an LED light when the color needed is detected. This part works perfectly fine. The only issue is the line following. Please help, if you can; this is very frustrating.

Comments

  • ercoerco Posts: 20,257
    edited 2016-01-29 19:45
    IMO your chassis mechanicals are just as important as your sensors and code for line following. Depending on whether you want to follow gentle curves or maze-y straight line grids, there are better & worse locations for your line sensor array WRT wheels. Other critical factors are sensor spacing (distance between sensors), line width, distance above ground, IR illumination, and the line itself. The reflectivity of the black & white surfaces is critical. A shiny black line like electrical tape is very hard to sense. Experiment with shiny black electrical tape, flat black paper tape, black magic marker, all this on the glossy side of a piece of posterboard (one side is usually glassy, the other flat).

    Which sensors are you using, analog or digital? If analog, manually test each one of your sensors analog outputs, along the lines of the video below, although your voltage won't vary left/right as mine does.

    We could help you more & faster if you post your code & a Youtube video. Obviously skip the ColorPal part for now and get basic line following down pat first.

    Edit: I attached another video of a 2-sensor Ardybot which follows a line at a decent speed. If you have 8 sensors you should be able to move much faster than that, the ColorPal speed will likely be your limiter.



  • Hey, thanks! I think we got it sorted out, but thank you for you help anyway!
Sign In or Register to comment.