Landing : Athabascau University
  • Blogs
  • Sonar Object Detection Test

Sonar Object Detection Test

Sonar Object Detection Test

One goal for my AutoMove robotic arm is automatic object detection. Here are the inital tests to see if the sonar sensor can see a few objects. A 'COMP444 feature', an eraser, and a bottle of Wite-Out are put under the sensor and measurements are sent to serial. The sonar echo time measurements are filtered by the Arduino. I used Excel to plot the results so you could see how it worked for yourself.

Here are the results:

image

It worked really well! The 'feature' wasn't detected, but that's okay. (It was a long shot, anyway.)

I made a short video of the measurements being performed: [Sonar Object Detection Experiment #1 - YouTube.com]

image

Here's a link to the relevant code: [GitHub permalink to line 327 of AutoMove.cpp, git commit #5befc96]

 while (1)
{
Serial.print(F("Sonar sum: "));
delay(500);
int count = 0;
uint32_t sum = 0;
do {
sum += sonar.getMeasurement();
delay(25);
} while (count++ < 100);
Serial.println(sum);
}

Comments

  • Nice video Tyler.  Why did the graph peak for the whiteout object? And what software did you use to graph your chart?  Thanks very much.  

    Susanne Cardwell December 8, 2017 - 4:29pm

  • Each object is a different height and volume, so the echo time is different for each, which is what I was hoping. I used Excel to graph the data.

    Tyler Lucas December 8, 2017 - 5:12pm

These comments are moderated. Your comment will not be visible unless accepted by the content owner.

Only simple HTML formatting is allowed and any hyperlinks will be stripped away. If you need to include a URL then please simply type it so that users can copy and paste it if needed.

(Required)

(Required)