Page 1 of 1

LM393 Sound Sensor

Posted: Mon Apr 04, 2016 5:51 pm
by aggour
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,

Re: LM393 Sound Sensor

Posted: Thu Apr 21, 2016 5:12 pm
by shaopeng.zhang
Hi,

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