@ 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
@ 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,