LM393 Sound Sensor

Arduino, Seeeduino Serials and mutants. Share your problems and experence on arduino compatible board such as seeeduino/stalker, etc.

Moderators: lily.li, violet, salmanfarisvp

Post Reply
aggour
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Mon Apr 04, 2016 4:58 pm

LM393 Sound Sensor

Post by aggour » Mon Apr 04, 2016 5:51 pm

Hello Everybody,

I'm using a Sound Sensor based on the LM393 amplifier and CZN-15E with Arduino Uno. I compiled the code and I got always values from 59 to 61.
If anyone can help, I want to know please if this value is decibel? If not, how can I get the decibel value?
Thank you in advance for your support.

Code: Select all

const int analogInPin = A0;

int sensorValue = 0;

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

void loop() {
  sensorValue = analogRead(analogInPin);            

  Serial.print("sensor = " );                       
  Serial.println(sensorValue);      
  // double db = (20. * log(10)) * (sensorValue / 5.);
  
  Serial.print("db = ");
  Serial.println(db);
    
  delay(3000);                     
}
Best regards,

shaopeng.zhang
Staff
Staff
Posts: 50
Joined: Sun Apr 27, 2014 7:49 pm

Re: LM393 Sound Sensor

Post by shaopeng.zhang » Thu Apr 21, 2016 5:12 pm

Hi,

It is not decibel, but analog voltage value indicating the loudness of sound.

Post Reply