Ah OK got it.
The problem with a simple light detector and lens is that it gives you no positional information as to where to go to seek higher intensity. The linescan sensor you mentioned does due to its pixelated imager...but as you say expensive.
One thing I did similar to this was to mount the detector on a servo that can scan left to right and back. I issued position commands to the servo, then read in the ADC value of the sensor, moved the servo, recorded data, etc. The servo positions were mapped to the forward axis of the truck. A steering correction could then be calculated. Only a few positions are needed to determine if you need to turn to a higher intensity direction, but you need to oversample to filter out noise. Make your steering correction, then start a new scan. You may need a digital filter on the corrections so that you don't oscillate around the proper direction.
You can always buy a smart sensor, but why not make a simple (cheap) one and make it smart with your processor? Also more of a learning experience.
Just a thought.
John
Bookmarks