I propose to investigate the accuracy of the sonar sensors we have been using in class; many groups received readings which did not make sense, given certain assumptions that were made about the operation of these sensors. To attain a more reliable sonar sensor would be both interesting and practical for future use of these sensors.
Objective: Determine the situations in which either sonar_closeup() and sonar_sample() are most useful and accurate, based on the following possible confounding variables:
Results: I determined, through extensive empirical study, that the sonar_sample() method is really very accurate under most circumstances (regarding timing specifically) for obstacles above 12 inches away. The sonar_closeup() method, on the other hand, in its default form is rather useless. I altered the default blanking period used in that method from 0.5ms to 0.7ms and saw immense improvements. I recommend using the altered sonar_closeup() especially for obstacles under 12 inches (but according to my results, above 4.75 inches); sonar_sample() now is not any more useful, but can be used to support or average values obtained with sonar_closeup().
.xls
files containing chart data
.c
files used to run experiments on HandyBoard
main.c
- in charge of setting up current experiment by calling
readings() with appropriate args and then dumps data to serial line
using dump()
readings.c
- takes SONAR_SAMPLES (defined in
main.c
) number of readings using both
sonar_closeup() and sonar_sample() methods based on
command line args (see code for details)
dump.c
- dumps arrays of readings to the serial line; one
reading per line, readings from close sampling method followed by
readings from far sampling method; a line with 3 asterisks marks
the data separation
Questions? Comments? Email me.