Sound Sensor Recomendation

 
#1

Hey everyone.

Can somebody recommend a good quality sound sensor to work with the v4, preferably analog. I had a pair of cheepo's laying around that I tried (pictured below), didn't work on analog, and digital wasn't much better although a slight improvement. I'm wanting to get the whole "robot hears something on the left, head turns left" thing going, so any recommendations would be appreciated.

Thanks.

User-inserted image

#2

I did something similar I'll repost it for you.

#3

@mtiberia.

Funnily enough, I bookmarked your thread some time back and have been referring back to it recently Smile. I'm hoping to find something that ships from the UK for quick delivery and lower price shipping. Thanks for reposting your thread. Very useful and nice job.

#4

@mtiberia.

I just managed to find the sensors you used from the UK robotshop site.

Thanks again. Smile


Sound sensor

#5

DFRobot seems to make just about everything. Their stuff is inexpensive but seems to work well. Let us know how it works for you. Is this going into K9?

Dave Shulpius

#6

those sensors (analog or digital) will work fine - IF you add a capacitor to the signal line. This is because the audio is either ON or OFF real quick with no "hold". This means unless you're sampling at the exact moment of audio, you will miss it. As what you are experiencing...

So throwing a capacitor to keep the voltage higher longer will help.

#7

@Dave.

No, they are not for K-9 (but if they work well enough, I may add some to him), but for a new project I'm working on. I'll be sure to leave a post when I try these new sensors out.

@DJ.

Thanks for the advise, that's good to know. Any recomendations on what capacitor I should use?

#8

@mtiberia.

Code:

$Direction=0
$L=0
$R=0

:loop
Repeat($x,0,2,1)

# I multiplied the reading by100 for both sensors

$Left=GetADC(adc0)*100
$Left_T=$Left+$L
$L=$Left_T

$Right=GetADC(adc1)*100
$Right_T=$Right+$R
$R=$Right_T
Sleep(10)

EndRepeat

$Direction=$Left_T-$Right_T
If($Direction>300)
Sayezb("left")
Sleep(1800)
$Direction=0
$Left_T=0
$L=0

ElseIf($Direction<-300) # that's -300
sayezb("right")
Sleep(1800)
$Direction=0
$Right_T=0
$R=0

EndIf
$Left_T=0
$Right_T=0
$L=0
$R=0
Goto(loop)



I just received my sound sensors and they work great, so thanks for the recommendation. I just wanted to ask though, in your script you mention that you multiplied the readings by 50. What is that actually doing, and what is the max it can be set at?

And would increasing the voltage up to 5v make them more sensitive than running off 3.3v?

Thanks. Smile

User-inserted image

#9

@ Steve G

Basically by multiplying the sound values you are magnifying the difference between the two sound sensor values and you filter out random noise by using a conditional statement stating that the value has to be greater than X to trigger an event.

So small differences when magnified become very large depending on the value that is used as a multiplier.

You can also experiment by taking 50 sound values from both sensors alternating between the left and right, summing them and then taking the difference.

#10

@mtiberia.

Thanks for getting back to me and for explaining. So basically, the higher I set the multipucation values, the more sound the sensors pick up on, and setting these values at say 300 would start picking up more background noise. Gotcha. Winky

Just courious, have you ever tried these sensors at 5v? I just wonder what the difference would be. I'm waiting on a delivery for some 5v regulators so I've been unable to test it.