Robot searching for sound source

For Formula Flowcode Micromouse users to discuss projects, flowcharts, and any other issues related to the Formula Flowcode Micromouse.

Moderator: Benj

bhamini
Posts: 11
Joined: Thu Sep 29, 2011 4:41 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

Robot searching for sound source

Postby bhamini » Thu Sep 29, 2011 5:00 pm

I want to program my formula flowcode robot so that it moves towards a sound source and I have no idea how to do that.
I want the robot to know where exactly the sound is coming from and make its way towards it.
Please help.

User avatar
Benj
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times
Contact:

Re: Robot searching for sound source

Postby Benj » Thu Sep 29, 2011 5:07 pm

Hello,

When I did a similar task at University there was basically two approaches to solving the problem.

1) Use a single sensor, rotate the robot monitoring the sound level. If you have a input level that is greater then your last greatest input level then update the greatest input level with this new value. Continue with this process until you have made a complete revolution. Once you have the maximum signal level continue rotating until you are within a couple percent of that maximum level. Drive forwards for a bit, reset the maximum signal value and then repeat the process.

2) Use multiple sensors in an array. This way is similar to the method described above but instead of spinning around to find the maximum signal source you can use the sensor array to find the sensor giving the best output and then use this to point you roughly in the correct direction. Again use multiple passes so that you end up as close to the signal source as possible.

I seem to remember for my University task we had a very hard time getting it to work 100% reliably in the short amount of time we had available so in the end we gave up and submitted the program as is and it just happened that the time we demonstrated the system the robot went straight for the light source and stopped right in front of it like it should. 8)

The formula flowcode device does have a microphone but it is not very directional. It might be a good idea to detach the mic from the PCB and re-attach it so that it is facing forwards rather then up into the air. You might also have to provide extra sound damping around the sides and rear of the microphone so only sound from the front is taken into account. Please note that modifying the formula flowcode in this way will invalidate the warranty.

Another way might be to make a small cone to amplify the sound from the front of the formula flowcode similar to how an ear horn works.
These users thanked the author Benj for the post:
bhamini (Mon Oct 03, 2011 6:39 pm)
Rating: 5.26%
 

bhamini
Posts: 11
Joined: Thu Sep 29, 2011 4:41 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Robot searching for sound source

Postby bhamini » Thu Sep 29, 2011 5:26 pm

When the robot moves, it makes some noise. I think that this disrupts the sound that it wants to 'hear'.
How do you think I should account for that?

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: Robot searching for sound source

Postby Spanish_dude » Thu Sep 29, 2011 7:43 pm

You could make your robot stop for a bit and listen to the sound when it doesn't make noise ?
These users thanked the author Spanish_dude for the post:
bhamini (Mon Oct 03, 2011 6:39 pm)
Rating: 5.26%
 

bhamini
Posts: 11
Joined: Thu Sep 29, 2011 4:41 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Robot searching for sound source

Postby bhamini » Mon Oct 03, 2011 6:38 pm

Hi,

Thanks for the tips. I will try it and inform you about the happenings.

Bhamini.

bhamini
Posts: 11
Joined: Thu Sep 29, 2011 4:41 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Robot searching for sound source

Postby bhamini » Sat Oct 15, 2011 7:23 pm

Hi
I have succeeded in making the robot respond to sound. I made it rotate and stop for a few milliseconds and then move forwards when it 'hears' a sound. This was to ensure that the robot does not respond to the sound it makes when it moves. Since the microphone was an omnidirectional one, i tried to make it unidirectional by using a cone on it. I designed the latter by combining a periscope and megaphone design using light, but stiff cardboard paper. And it works!! The robot rotates and moves in the direction it receives the sound.
Now am trying to design a filter so that my robot responds to only some types of frequencies :)
These users thanked the author bhamini for the post:
Benj (Mon Oct 17, 2011 10:36 am)
Rating: 5.26%