Go Down

Topic: 4 pin sound sensor (Read 1 time) previous topic - next topic

Hi. I bought sound sensor such as on photo. I try to use it, but it looks like it's broken. I connect VCC to VCC, GND to GND and AO to ANALOG IN 0. My code is simple:
Code: [Select]

void setup() {               
  Serial.begin(9600);
}

void loop() {
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
    delay(1000);
}


And I always has almost the same value (~155).
When I try digital output I always has LOW value. Any help to programming this sensor?


marco_c

There is not much to program and what you have seems like it would work.

Does the power LED light up when you connect Vcc? Does the sensor LED light up at all when you have a loud noise? As far as I know the AO should provide a voltage level that fluctuates with the sound level and the DO goes to HIGH briefly when the sound exceeds a certain threshold (set by the pot?).
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

Yes, power LED light up. I spin built-in potentiometr, when value from ANALOG IN is above 90 Sensor LED always light up and digital signal is always LOW, when value is under 90 Sensor LED don't light up and digital signal is HIGH.

marco_c

Some of this new information contradicts what you said before:
Quote
And I always has almost the same value (~155).

and
Quote
When I try digital output I always has LOW value


You are clearly getting a value of 90. Is that done by setting the pot of because the sound level changes? There is not much that can go wrong with this device, so if it still does not work it may be the IC on the board. What type is it?
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

I said:
Quote
And I always has almost the same value (~155).
When I try digital output I always has LOW value.

because I didn't change pot. When I change the pot, value of analog output is changing. But it doesn't respond to change loudness of sound. It's still ~50 or still ~150.
Is this sensor should work like this: If it's quiet in room, analog will show eg.50, when I start playing the music loud, analog should show higher value eg.200?
Board: Arduino Duemilanove

marco_c

I meant what is the chip on you sensor board. Looks like there is something there in the photo behind the pot.
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com


Go Up