Need some help understanding Microphones
MarkCrCo
Posts: 89
I've gone through all the projects for the Boe-bot that come with it and started out playing around on my own. I thought I would give him an ear to listen with. I bought a radio shack condensor mic element (actually two diffeent ones http://www.radioshack.com/product/index.jsp?productId=2062215 and http://www.radioshack.com/product/index.jsp?productId=2062216). I searched the internet to try and understand these but I'm still confused. I hooked it up the way I think I should but I get nothing I can read. I've used COUNT, RCTIME, and just plain IN7 but get nothing. I can't get the schematic to paste so I'll try to describe it. 5V(vdd) -> 4.7K resistor -> + mic lead. - mic lead -> vss pin 7 -> .1 uf capacitor -> + mic lead I don't understand how this can do anything and it appears that it doesn't from my results. It seams to me the circuit is always going to be completed through the vdd & vss connections and never through the pin7 and so never detecting anything. I'm not try to get any sophisticated voice recognition or anything like that. I just want to detect a noise that is different from the background. Can anyone help explain what I am doing wrong and or what I can do to make this work? Thanks
Got it to paste after all.
Got it to paste after all.
Comments
The sound waves creates short pulses of Vdd being conected to ground,
the series-cap filters is a high-pass filter only allow short pulses through, like a flexible membrane between two water tanks kind off.
If you dc-balance the output trace so it's for example 1/2Vdd when there is no-sound, the Cap will now also change dc-level as it acts as a dc-to-dc buffer.
Use the schematic from the Propeller demo board, and if you do it exactly (including that Vdd should be 3.3v) It will work.
http://en.wikipedia.org/wiki/Electret_microphone
http://www.mouser.com/ProductDetail/Knowles/SPM1437HM4H-B/?qs=sGAEpiMZZMsZoypmI867EfrxjbMuIgyuL9HQkG4aFwriDnePK5eL8Q%3d%3d
Set one counter for output square wave at 2mhz, set the other counter to counting edges.
repeat: Use waitcnt (1024), check the second counters accumulated value= loudness.
Don't forget to add a pulldown resistor (or may it should be pullup) as the data line goes z to allow muxing of left/right
You really are just throwing a very small analog signal at a digital input. The voltage output may be too low to trigger the i/o, but could be picked up with an ADC measurement and digitized.
A 2 pin ADC is the way the Propeller Demo Board creates an interface, but that will never work on the BS2. ... too complex for the device. The Propeller will actually digitally record sound and play them back from an electret mic with just two more capacitors and a resistor or two..
You might be able to create a one-transistor amplifier of some sort. The schematics that you are referring to will work for a microphone input into an audio preamp. I suspect the audio information is there, but just not enough volts or amps to budge the i/o pin...
For many many years intercoms in apartment houses didn't have a mike, just used the speaker as one and switched back and forth.
Try Elliot Sound Products for a sensible explaintion of audio devices. You are just going to have to accept that analog and digital are two divisions of electronics. Preamps squeeze tiny microvolts out of a phonograph needle or a coil passed over magnetic tape and make beautiful sound. But it is a whole different topic.
sound.westhost.com
I suspect that if you want to trigger the BS2 with audio, an 8 ohm speaker would produce more electricity. Use a diode to protect against reverse voltages. And use a zener to be sure to prevent peaks over +5. Try clapping your hands in front of the speaker. A moving coil in a nice big magnetic field will create a jolt of electricty... but you have to be sure to figure out how to protect the i/o pin from reverse voltage and too high a peak voltage.
Even though the vibrations are amplified into an electrical signal, the voltages are still pretty low... just a few 10's of millivolts. The Capacitor in the circuit acts as a level shifter and a DC block, allowing only AC (<-- The audio) to pass.
This link may help:
http://forums.parallax.com/showthread.php/98348-Measuring-Ambient-sound-Levels