Debugging sonars

After the latest tests with the sonars, I found out that actually there is a way, with the MaxBotix sonars, to avoid cross talk: unlike cheaper sensors, the MaxBotix ones have a way to command the reading of a the distance. This way multiple sonars can be used at the same time because there will be only one sonar ranging at any given time. On their site they have an extensive explanation of how to do that in their FAQ: how can I use more than one sensor?

In order to understand the distance they were reading, instead of staring at the serial monitor of Arduino, built a visual debugging tool that would show the distance the sonars are reading, allow positioning them in a room, and also log where they think there is someone.

Here below is a screenshot of this tool. And as soon as it’s more general purpose I’ll share the code on GitHub.

This is the screenshot of an empty room (well, with some furniture) and all the red arcs are the maximum distance (ie the distance of some table or cupboard). As you can see S2 and S3 are stable (the green line with the current reading is exactly over the red one) while for the two facing sonars (S0 and S1) the reading is pretty unstable, especially S1 which kept on bumping from the red line to the middle of the room.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s