Polaroid Sonar Questions I'm looking for help/advice with my sonar setup.  At present I've
got a single sonar connected to the new Expansion Board and have
been doing a calibration.  My goal is to use four transducers to
cover a 45Â° arc.  Here are my problems/questions:

1. How to deal with "jitter" of about Â±1 cm at all ranges.  My 
   tentative solution is to average 3 or 4 readings.

2. How to deal with the occasional (once out of 10 or 20 pings)
   large error.  My tentative solution is to discard ranges that
   have changed a "large" amount since the previous reading ...
   faster than the 'bots max velocity ... but what about a 
   rapidly approaching predator such as my cat?

3. How to determine when the minimum reliable range has been
   reached.  Tentative: just discard anything less than 20 cm.

4a.Are my time of flight calculations correct?  Polaroid implies
   that the speed of sound is about 1.1 feet/sec.  My reference
   says 331.6 m/sec at 0Â°C and approx. 354 m/sec at 20Â°C (68Â°F).
   If my grade school math is correct this works out to a sonar
   inch (out and back time) equal to 143.5 usec (287 counts) and
   a sonar centimeter of 56.5 usec (113 counts).
4b.Using Dr. Martin's sonar.c to test the 6500 the about figures
   give reasonably accurate readings, but it is necessary to
   subtract about 1000 counts (0.5 msec) from the returned result
   prior to converting to inches or centimeters.

5. How best to implement the software to take full advantage of
   the 6500's capabilities?  

I intend using Adam Cox's four transducer hookup at:
http://el.www.media.mit.edu/groups/el/projects/handy-board/software/contrib/adam/mxducr1.gif

The software examples that I've found are either very simple:
Fred Martin's test program at:
http://el.www.media.mit.edu/groups/el/projects/handy-board/software/sonar.html
or Kent Farnsworth's test program at:
http://el.www.media.mit.edu/groups/el/projects/handy-board/software/contrib/kent/hbsonar/

or extremely complex (and without code samples) such as 
Johann Borenstein's Micro-Controller Interface Board (MCIB)
and Error Eliminating Rapid Ultrasonic Firing (EERUF) at:
http://www-personal.engin.umich.edu/~johannb/

Any and all comments, suggestions, sample code, pointers to 
other links, etc. will be appreciated.
 - - - Nick - - -

