Main Site Documentation

Help with microphone


#1

Hello everyone.
I bought this off ebay:
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=170604962752&ssPageName=STRK:MEWNX:IT

I want to detect spikes, someone knocking on the door.
I found it impossible to set the sensitivity.

I connected it to A2 and I read the values in a loop.
It jumps from almost zero to 1023 in a fraction of a turn.
And even when I manage to set it just right, I am missing some spikes.

Please advise, I’m new to this.
Is there a smarter way than polling the pin in a tight loop ?
Is this mic assembly faulty or just crappy, or am I missing something ?

Thanks,
SW


#2

Would a Piezo Vibration sensor have more steady result for a door knock?


#3

I dont know, would it ?
How do I setup a vibration sensor ?


#4

Can you measure voltage on mic out line? What is the highest?


#5

Have not tried one yet. But looks pretty easy with an AN pin and 1Mohm resistor.



http://www.arduino.cc/en/Tutorial/Knock
http://www.arduino.cc/en/Tutorial/KnockSensor
http://www.planetarduino.org/?cat=55


#6

Measuring a voltage on a mic doesn’t say nothing about the sound. You need to sample a window and do some fft analysis on it. I might try this in RLP one of these days.


#7

[quote]Measuring a voltage on a mic doesn’t say nothing about the sound.[/quote] ::slight_smile:

Baby steps.

@ SW I just wanted to make sure that your microphone output voltage is within acceptable range of the analog in pin. Couldn’t find that in the product description.


#8

There is something I dont understand about all these samples.
Usually the pin is read in a loop with a 100ms delay.
Isn’t that too long ?
The knock duration is probably shorter and you can miss it,
am I wrong ?


#9

Ok, after reading more about that product I see that it is not a microphone, but a sound detection module. It outputs square wave. Do you have an oscilloscope to check it?


#10

Unfortunately, no.


#11

@ Architect: did you find a datasheet?


#12

No, but I have asked the seller on the eBay.


#13

Seller doesn’t have any datasheet. He said that he might post some scope screenshots next week :o

I think you can use interrupt pin and measure the time between the edges. See what is typical time for the sound you are detecting (clap or knock). Use the pot to adjust sensitivity and you should be good.


#14

That is one reason I will not buy misc parts off ebay anymore unless people like SF or pololu dont have and want to take a flyer. Can’t count on datasheets or any other support from most of these ebay sellers.


#15

+1


#16

I agree, not to mention there are sooooo many counterfeit parts floating around that it is hard telling what you might actually get. A friend of mine uses a transistor on one of his commercial products that is only made by a single company. Last year every distributor ran out of them and had 2-3 month lead times. He bought a reel of (2000) from a broker in China.

When he got them and at them under a microscope and found that had been sanded down and remarked (the date code was bogus). Think about it, this is for a transistor which cost 25 cents in low quantities. They de-reeled some other transistor, sanded the markings off, and then stamped them all with a bogus part number and re-reeled them again. This is where a lot of the crap on Ebay comes from too.


#17

Selling something without knowing what it does or how to use it. Great!

I might start selling air someday.


#18

I dont know about air, but there are many that sold water, even city water in a bottle…


#19

What is an interrupt pin, and how do you use it ?


#20

Take a look here:

http://wiki.tinyclr.com/index.php?title=C-Sharp_Level1#Interrupt_Port