Is there a way to mount a Microphone or a Sound Sensor?
esjd
Posts: 2
Is there a way to mount a microphone straight onto the basic stamp (by cutting the microphone wire or such, because I think the microphone produce an electric current) ? If not, is there any sound sensor available? I really don't want one of those pre-built, speech recognizing fancy modules, just a simple device that can recognize sound. Thanks!
Comments
Do you just want to detect sound above some specific level (like a hand clap detector)? There are all sorts of things like that on the internet.
Here's one example: www.reconnsworld.com/audio_electretamp.html
The output of this detector can be connected to a Stamp I/O pin and goes LOW when the sound is above the level set in the circuit. This can be powered by the Stamp's regulated 5V output if need be.
Basically a crude DMX "like" controller that would listen to a CD or MP3 and when certain frequencies are heard it would interpret the sounds and execute code based on the frequency. The sounds would be above the range of the human ear and only heard by the controller.
Could an analog to digital converter IC be used to accomplish this task?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/7/2009 7:01:55 AM GMT
propeller.wikispaces.com/FFT
The much simpler Goertzel algorithm would be more suitable if you know the frequencies in advance.
Leon
Post Edited By Moderator (Chris Savage (Parallax)) : 5/7/2009 9:33:56 PM GMT
http://www.mouser.com/Search/ProductDetail.aspx?qs=sGAEpiMZZMvkC18yXH9iIvlH%252b7DLPI6OQmf4uQji4o8%3d
I however need to be able to detect multiple frequency ranges to trigger different events.
If I find anything else helpful I will get back to this post. In the meantime if anyone else has any suggestions I'm definitely all ears.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/7/2009 2:56:21 PM GMT
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
As a last resort I could just use a·LM567 for each frequency. Unfortunately this approach robs the stamp of pins.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
You would set up the LM567 to detect anywhere from 20,000 to 500,000Hz ( Anything above human hearing ) and write a program to listen for the LM567 to saturate when a chosen frequency is detected.
Different events could be triggered because you would use the trigger frequency as a type of Morse code of sorts.
For example, if you wanted a red led to flash·five times during a specific place in a song or soundtrack·you could embed the trigger frequency into your song or sound track consecutively five times·with a small pause between bursts. The LM567 would saturate five times and the stamp would count·and act accordingly.
As for the reliability of the·LM567 being able to hear the trigger frequency accurately this will need to be field·tested.
The LM567 does have a high rejection to out of band signals and noise·also Immunity to false signals.
I will play around with this idea and post my findings here if anyone is interested.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
I know next to nothing about sound frequency detection and have never heard of the LM567 before you mentioned it but...
A glance at the datasheet shows that it can be set using an external resistor. Couldn't you use a digital pot to readjust the LM567 several times a second and
"sweep" a wide range of different freqs?
To test this you could use a CDS cell and an LED taped together. PWM the LED until the CDS gives the required resistance and see if it works. Make sure you
figure in the timing of the PWM to include checking the LM567.
If I'm wrong about any of this, please feel free to slap me upside the head and tell me to shut up about stuff I know nothing about.
Clearly you have mistaken me for something I am not! [noparse]:)[/noparse]
I am a novice and have never been to any kind of electronics school.
Everything I have learned has come from Parallax and it's community.
( PJ Allen, Chris Savage and Mike Green have been most helpful to me in the past )
I bought a tone decoder kit from NightFire [url=mhtml:{C8ED4378-0039-4945-8953-B91B359FDD2A}mid://00000002/!x-usc:http://www.vakits.com/product_info.php?products_id=804]http://www.vakits.com/product_info.php?products_id=804[/url] and expect it in the next few days.
The only thing that troubles me on this project is what Mike Green pointed out.
If I were only using the LM567 to listen for specific frequencies in an audio track with no other audio signals in the track I believe it would possibly work ok. But I had planned on placing the trigger signals into a mixed audio track and this may cause the trigger signals to be drowned out completely.
I see in the LM567 Datasheet that the LM567 does have a high rejection to out of band signals and noise also Immunity to false signals but am a bit concerned about how I am applying the LM567. I am sure it was never designed to listen to so much audio garbage at once.
I like your good idea but no matter what the trigger frequency is the LM567 will respond by saturating a transistor switch to ground thus giving the stamp a zero or a one so it would not matter if·I were using different frequencies the end result would be the same.
Maybe·I could write the program to check what the digital pot was set at during the sweep and if the LM567 grounds the transistor switch during a specific resistance then execute whatever code was associated with that specific frequency.
I believe·if the trigger frequencies are too close together the bs2's inability to do more than one thing at one time·would result in·the stamp essentially ignoring the second frequency. ( This might be better suited for a Propeller )
Anyhow, I will still attempt this project with the expectation that it will most likely fail though I am hopeful.
And if all fails I will have still learned something useful through the process.
Even Edison and Swan worked for years to develop the light bulb! ( That's probably going to light someone's fuse. )
Your input·was very appreciated and your suggestion is most certainly interesting!
Beazleybub
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 5/17/2009 6:49:49 AM GMT
I'm the same way, I don't even have a highschool education, completely self-taught with the assistance of the wonderful people here on the Parallax forums.
By using the digital pot to "sweep" I simply meant adjust the pot to X resistance, causing the LM567 to check for frequency Y. Wait a half-second, then adjust the
pot to Y resistance and check the LM567 for the next frenquency in the list.
There is, indeed, a chance of missing the desired frenquency if its duration is extremely short (less than a second) but otherwise, this should work.
Again, this is all just guesswork by a total newbie who has neither a digital pot nor a LM567.
Please keep us informed about your testing. I would love it if testing for tones is as easy (and cheap!) as a LM567 and a digital pot.
I have built two separate circuits that I found on the web and both gave me similar results.
[url=mhtml:{C8ED4378-0039-4945-8953-B91B359FDD2A}mid://00000003/!x-usc:http://www.scary-terry.com/more_stuff/tonedet/tonedet.htm]http://www.scary-terry.com/more_stuff/tonedet/tonedet.htm[/url]
http://www.io.com/~n5fc/zerobeat.htm
The lm567 will not work well for this particullar application because the amplitude of the input signal affects the bandwidth·and affects·reliability.
The LED in both of the circuits above·remained "on"·and varied in brightness when the volume was turned up or down.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
How can there be·nothing? Nothing is something!
Post Edited (beazleybub) : 6/7/2009 6:18:50 AM GMT
To detect a high frequency subcarrier, an active or passive filter could reduce the interference from the normal audio.
For the tone detector, I prefer the LMC567, the cmos version of the LM567. I've had good luck with it as an ultrasound detector, in a circuit with a piezo followed by lots of amplification and then the LMC567. It does take some experimentation. The lock indicator LED should stay on continuously when the input frequency matches the reference and is above threshold. If the sound is clean and well above threshold, the output frequency locks to the input.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com