Sound detection sensor?

Dear Experts Heroes,

I am seeking your wisdom.

I am looking for a sound sensor that is compatible with .NET gadgeteer, but I couldn’t find any with GHI, and I’ve found this sensor from Grove.
http://www.seeedstudio.com/depot/grove-sound-sensor-p-752.html

My questions are:

1- Do I have to use their expansion board http://www.seeedstudio.com/depot/grove-expansion-net-gadgeteer-compatible-p-1084.html , or can I use Gadgeteer Extender instead of that?
2- Do you have any other suggestions for sensors that detect general sounds in ambient environment in which they are compatible with FEZ Spider mainboard?

Thank you,

The extender will work fine

Thanks a lot,
I am so new to this, but do you have any advice on how I connect this sensor with the Extender module? Any resources for reading will be great in order to have a good start on attaching this sensor.

This is an analog sensor. So, you will need to connect your Extender module to any “A” socket as follows:

Grove → Extender

GND → GND
VCC → +5V
SIG → Analog In

I’m not going to do all the work for you, though :wink: The next test is for you to figure out which pins on the Extender to use for the above. This is a good time to get familiar with this page:

https://www.ghielectronics.com/docs/120/gadgeteer-sockets

I look forward to hearing your review of this module. I have some that are similiar that I bought from Amazon.com. I’m not very happy with them. They aren’t nearly as sensitive as I had hoped.

Thanks a lot @ ianlee74, definitely I will inform you soon! I just received my sensors set! I think Sound sensors should be important just like other modules that are provided by GHI.

Cheers,

@ ianlee74 I would like to know what kind of sound sensors you have? (are they from Grove?) I didn’t like Grove sound sensor, they are not accurate AT ALL! the sensor doesn’t detect any sounds even when I screamed!!! and there is no obvious change in the voltage reading!

For example, this is part from the output:


Sensor Value: 2.8489073881373566
Sensor Value: 2.9232466181061389
Sensor Value: 2.9122164412070757
Sensor Value: 2.8280957336108217
Sensor Value: 2.8166493236212271
Sensor Value: 2.8219042663891778
Sensor Value: 2.827492195629552
Sensor Value: 2.8339229968782513
Sensor Value: 2.8330801248699271
Sensor Value: 2.8283662851196665
Sensor Value: 2.7910926118626427
Sensor Value: 2.88624349635796
Sensor Value: 2.885837669094693
Sensor Value: 2.8756711758584803
Sensor Value: 2.8594588969823098
Sensor Value: 2.8797086368366283
Sensor Value: 2.8752861602497397
Sensor Value: 2.8647346514047864
Sensor Value: 2.8122372528616024
Sensor Value: 2.885837669094693
Sensor Value: 2.806701352757544
Sensor Value: 2.6272216441207075
Sensor Value: 2.9174921956295523
Sensor Value: 2.860145681581685
Sensor Value: 2.88624349635796
Sensor Value: 2.8700104058272631

I don’t know if I am doing something wrong! (attached a picture of how I did it) and this is part of my code!


void ProgramStarted()
        {
            Socket socket = Gadgeteer.Socket.GetSocket(10, true, null, null);
            analogInput = new AnalogInput(socket, Socket.Pin.Three, null);
            
            Debug.Print("Program Started");
            startTime = DateTime.Now;
            Timer = new GT.Timer(5000);
            Timer.Tick += new GT.Timer.TickEventHandler(Timer_Tick);
            Timer.Start();
            motion_Sensor.Motion_Sensed += new GTM.GHIElectronics.Motion_Sensor.Motion_SensorEventHandler(motion_Sensor_Motion_Sensed);

        }

        void motion_Sensor_Motion_Sensed(GTM.GHIElectronics.Motion_Sensor sender, GTM.GHIElectronics.Motion_Sensor.Motion_SensorState state)
        {
            Debug.Print("Time span = " + (DateTime.UtcNow-startTime).ToString());
            startTime = DateTime.UtcNow;
            Debug.Print("TRIGGER");
        }

        void Timer_Tick(GT.Timer timer)
        {
           
            currentV = potentiometer.ReadPotentiometerVoltage();
            new_value = analogInput.ReadVoltage()* currentV;
            Debug.Print("Sensor Value: " + new_value.ToString());
            /*
            if (motion_Sensor.SensorStillActive != valueM)
            {
                Debug.Print("State changed to: " + motion_Sensor.SensorStillActive + " @ "+ (DateTime.UtcNow-startTime).ToString());
                valueM = motion_Sensor.SensorStillActive;
            }
            */
        }
    }

Hard to see, but looks like your sensor is connected to pin 4 not pin 3.

@ Architect - Thanks … I’ve changed between pin 4 & 3, and the results are nearly the same as before!

Do you think this is happening because I didn’t “solder” the wires to the extender?? I cannot believe this sensor is so useless!

@ waadimsi - I would definitely solder wires. Why are you multiplying value from the sensor by a value you are reading from a potentiometer?

http://www.amazon.com/gp/product/B00BOM93VK/ref=wms_ohs_product?ie=UTF8&psc=1

Same questions I had… If you don’t know for sure that you have perfect connections then its hard to evaluate anything else with analog sensors.

Also, have you played with the gain adjustment and see if anything changes?

Could you take a picture of the sound device so that it shows the wiring color and the board identifiers. It looks like maybe you might be using the wrong wires.

@ andre.m - [quote]i would recommend to measure the output with an oscilloscope and setup your lm386 with the potentiometer before you attach him to your board[/quote]

How can I setup the sensor before connecting it to the mainboard? I’m using Gadgeteer potentiometer.

Would you please be more specific? I bough these connectors but I didn’t use them yet! Any advices? http://www.ebay.co.uk/itm/STARCONN-CONNECTORS-PHW-40-RD-0-1-PIN-HEADER-RIGHT-ANGLE-40-PMS-/200841889283?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item2ec31c0603

@ Architect & @ ianlee74 -
[quoteWhy are you multiplying value from the sensor by a value you are reading from a potentiometer?][/quote]
Simply, I was rambling around just to get lucky! However, I recoded the program.cs file again, please see below: (and I got steady values just like before!!!)


void ProgramStarted()
        {
            Socket socket = Gadgeteer.Socket.GetSocket(10, true, null, null);
            analogInput = new AnalogInput(socket, Socket.Pin.Three, null);         
            Debug.Print("Program Started");
            startTime = DateTime.Now;
            Timer = new GT.Timer(3000);
            Timer.Tick += new GT.Timer.TickEventHandler(Timer_Tick);
            Timer.Start();
        }
       
        void Timer_Tick(GT.Timer timer)
        {
            Debug.Print("Voltage: " + analogInput.ReadVoltage().ToString() + "---- Proportion: "+analogInput.ReadProportion().ToString());
        }

part from the output (I was disturbing my neighbors with my screaming):


Voltage: 1.3064516129032258---- Proportion: 0.43010752688172038
Voltage: 1.564516129032258---- Proportion: 0.35874877810361683
Voltage: 1.5709677419354839---- Proportion: 0.34995112414467255
Voltage: 1.5548387096774194---- Proportion: 0.41055718475073311
Voltage: 1.5709677419354839---- Proportion: 0.43597262952101662
Voltage: 1.4483870967741934---- Proportion: 0.3782991202346041
Voltage: 1.4838709677419353---- Proportion: 0.4525904203323558
Voltage: 1.2483870967741935---- Proportion: 0.3919843597262952
Voltage: 1.4806451612903224---- Proportion: 0.38025415444770277

[quote][/quote]
@ ianlee74 - Good to know, I was about to get this sensor, I just put it in the wishing list :slight_smile:

@ Cowboy [quote]Could you take a picture of the sound device so that it shows the wiring color and the board identifiers. It looks like maybe you might be using the wrong wires.[/quote]

Please find in the attachment 2 pictures from the 4-pins sensor connected to the extender and the mainboard, basically what I have done is:
connect (Sig-yellow) → P3
connect (VCC-red)–> 5V
connect (GND-black)–>GND
NC is not connected (white wire)
this is a wiki page that I have referred to http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor

Thank you in advance,

If you haven’t already done so, you really need to solder those wires !

Actually, before soldering wires, I’d recommend you get some breadboard male-male and male-female wires from ebay, and use them with your 0.1" headers. Solder the headers into the extender module, and use the female socket to connect onto the header. Much easier to alter things as you need.

One of the points about this sensor is that it’s pretty simplistic. It has an electret microphone, that produces a tiny current when it gets sound. Then, that signal is amplified by the LM386 to produce a voltage that you can read. Andre’s comment is that you need to appropriately adjust the potentiometer to adjust the gain, to get a signal that you can read. You need to adjust that at “full noise” so that you read no more than 3.3v on the output, and then see what you get at “no noise”. Have you done any adjustment with the potentiometer so far, to see what difference it has made?

@ waadimsi - the wireing looks good. The board I was looking at had a different pin layout. Solder is a good thing and it can be redone.

I tried building a sound monitor with this Grove component and an extender like a year ago and if my memory is correct the end result was best summed up as pure ‘suckage’, as the sensor sucked.

Duke, did you end up finding one that you would recommend? The project we were working on needed to be able to detect the sound of ping pong balls being hit. Unless you were playing the “red dot” version, it wouldn’t even register the slightest detection from a normal hit.

Ideally with but for our experiment we tried to eliminate background noise. The first 100 readings after startup were used to build an ambient noise threadhold.