Pages: [1]   Go Down
Author Topic: 4 pin sound sensor  (Read 1243 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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?

Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1273
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?).
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1273
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1273
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I meant what is the chip on you sensor board. Looks like there is something there in the photo behind the pot.
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

393BF 7H3
Logged

Pages: [1]   Go Up
Jump to: