Go Down

Topic: LM393 Sound Detection Sensor calibration (Read 938 times) previous topic - next topic

Kostantinos

Hello everyone, has anyone used a LM393 Sound Detection Sensor, does it actually deliver a continuous signal reporting the sound amplitude. The reason I am asking is because I just got one, and although I am calibrating it carefully, the output signal of the sensor translates in the computer erratically. Is there any specific formula around to apply to it and calibrate it ?

Thanks
K.

Grumpy_Mike

Quote
has anyone used a LM393 Sound Detection Sensor,

I have used a LM393 but it is not a Sound Detection Sensor it is just two comparators.

Quote
the output signal of the sensor translates in the computer erratically.

How are you wiring it up?  They have open collector outputs you know, so unless you have a pull up resistor you will just get random noise when you try and read a pin.

Kostantinos

Right, thanks,  I guess it still works with sound though, what is the most obvious use of it, tracking amplitude ?

Kostantinos

Basically, I want to use use it a switch where it will activate some function, like if(sound==1){doThis} I guess I can define a certain threshold up to when it will generate the data.
I am looking here and there, and I am not really sure, either it is an analog or a digital sensor. In any case, is there any wiring scheme I can take a look in order to use it properly ?

Thanks

Grumpy_Mike

That chip will not track amplitude. It is a digital comparator.
That means it has two inputs, A and B. If voltage A is higher than B the the output is high, if voltage A is lower than B then the output is low.
Sound is a constantly changing voltage so this chip by itself will not track any changes in amplitude.
If you have a peak detector
http://www.allaboutcircuits.com/vol_3/chpt_3/5.html
Then you could use this chip to trigger when the peak of the sound is greater than a certain fixed level, but I am not sure if this is what you want.

Note that the peak level of a sound, is not very correlated to the perceived loudness of a sound.

Kostantinos

This sounds rather complicated for the use I want it, and I am pretty much sure there will be something other to have the job done.
Maybe I can use a microphone for that, I hear that you can attach a normal microphone with a fairly easy hack, any tips about that ?

Thanks

Grumpy_Mike

Quote
This sounds rather complicated for the use I want it,

It very well might be, but as you have not had the good grace to tell us what you want it to do it is impossible to be more helpful and we can only answer the questions asked.

Kostantinos

#7
Mar 09, 2014, 11:09 am Last Edit: Mar 09, 2014, 11:11 am by Kostantinos Reason: 1
I would like to use it as an amplitude detector, and to use it as a monitoring reference to suppress a signal that comes out of the computer, a sort of a feedback loop between a real world value and the signal output of the computer.  So let's say, if the amplitude goes high the compressor will turn down the sound output accordingly, aka machine listening.


Grumpy_Mike

Still not 100% on what you want to do.
The front end then should be how I described with just a peak detector feeding directly into the analogue input of the arduino.
You can then use the analogue read to see what it is and apply any threshold detection in software.
Then you need something like a digital pot
http://arduino.cc/en/Tutorial/SPIDigitalPot#.UxxIql6prdU
to control the "sound"? out of your computer into an amplifier.

Go Up