Instructables

Audio frequency and signal strength sensor: is there such thing?


Hi, I'd like to know if there's a sensor easily used with an Arduino that detects the signal strength of a sound of frequency determined by me.

I want this to make a sensor that can be used to measure its distance to the emitting object omni-directionally, ie, not like ultrasonic or IR distance sensors, which only sense what's in front of them. I want the sensor to sense the SPACE AROUND it, like... spherically.

If you know of a sensor that does that in another way, I'd LOVE to hear about it. I've been searching for something like that for a long time...


Anyway, I just need a sensor - cheap, preferably :) - that senses the signal strength of a wave of frequency x.


By the way, the distance range to be measured is about 10 - 150cm...
Thanks!

jeff-o3 years ago
I'm not aware of any omni-directional sensor. What you could do is take an existing ultrasonic rangefinder (you can get them at Sparkfun, for example) and affix it to a rotating base. The base would have a rotary encoder attached so that its position could be known. To sense the world around, the Arduino would monitor the output from the sensor as it rotates, and combined with the position data from the rotating base, create a "3D" space from it. That's a big generalization, but that's what I'd suggest.
seandogue3 years ago
microphone. or "audio transducer" if you want it to sound more technical.

The signal is fed through a preamplifier and into the storage system. To use it as a qualified audio level meter, one would need to calibrate it against a known standard.

fwiw, iphones and androids, to name a couple of cell phones, have access to programs that perform that function, although most credible coders always post a disclaimer that the code is only for qualitative use.
Its not going to be terribly reliable, but build a notch filter, tuned to your transmitter frequency, and then rectify the output of that to give you a level you measure with the arduino: to a first approximation, the amplitude of the output is proportional to the inverse square of distance.
pedrotome (author)  steveastrouk3 years ago
That made no sense to me - at all. I'm sorry, could you please explain that in a simplified manner? :p
A notch filter is a circuit that admits only a very narrow band of signals. You measure how loud the output is. The loudness is NOT proportional to distance. Its proportional to the SQUARE of distance.
pedrotome (author)  steveastrouk3 years ago
So the only thing I have to do is create a 555 astable circuit that generates pulses at, for example, 50kHz and connect it to an 8-ohm speaker and then create this circuit (adjusted to the 50kHz) and connect it's output wire to one of Arduino's Analog pins?

Is that it?
The first stage anyway. Then add another amplifier after it, connected to a diode then a capacitor. in parallel with a resistor. The output of THAT is your signal. Adjust the output of the amplifier, so that when the object is closest to the detector, the signal isn't saturated - you need an oscilloscope to look really.
pedrotome (author)  steveastrouk3 years ago
Oooh... Sorry if this seams TOO noobish, but, about the amplifier.. Is it supposed to be a specific part (like a transistor or an IC) or a circuit? I've never really made or seen one... On the schematic that I linked on my last message, there's a big triangle-shaped component. What is that supposed to be? Is THAT an amplifier? If so.. Can you give me an idea of what to buy? I'm really clueless about that... :/
That's right. Try an "LM741" as an amplifier for this - you'll need two. You may want to add a "perfect rectifier" for the last stage - the Diode/resistor/capacitor stage - in which case you need another amp. They cost less than a USD. If I can, I'll sketch the thing up for you tonight. Steve
pedrotome (author)  steveastrouk3 years ago
So.. I need a non-inverting amplifier (see pic. Is this right or is there something wrong with it?) connected to the output of the circuit posted above, which ALREADY HAS an amplifier? And then, after the second amplifier (pic), I add the diode+capacitor+resistor.

I didn't get how those three components should be.. :/


A sketch of yours would be awesome! :)


(I'm sorry if I'm being a bit thick, but I've never done anything like this..)
amp.png
Here you are: I pinched the front end design from here http://www.bowdenshobbycircuits.info/opamp.htm#bandpass.gif

where you'll find the math you need to sort out the resistor values.

I've added a "perfect rectifier" at the output, this is where your signal strength can be measured. The final RC at the right hand end, you'll have to experiment with for good results.
filter and strength.jpg
pedrotome (author)  steveastrouk3 years ago
Instead of connecting the 741s' pins 4 to -12V (how would I even do this? :/) and pins 7 to +12V, can I connect pins 7 to +5V and pins 4 to Gnd? Ie, can I power the LM741 with 5V instead of 24V?
Cause that's all I can do with the Arduino...


Why do I even have to amplify the signal from the sensor?
Can't the Arduino analogRead() it?
How much should I amplify the output from the sensor?
How much/less can the Arduino read?
How do I know when I have to amplify something for the Arduino to read?

These are questions that really bother me... :/
Try this thing with a twin rail power supply, designing for single supply operation (ie no negative) is tricky, and would complicate the diagram above.

The microphone is only going to give a very low, AC output, at very high frequency - beyond what you can read with an arduino

How much amplification ? Try it and find out, it depends on your mic, it depends on your emitter.

Read it when you need to know how "close" the emitter is - its not terribly accurate anyway.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!