Forum >Sound sensor DFR0034 V2.2
ArduinoGeneral

Sound sensor DFR0034 V2.2

userHead alexandre.riasat 2018-01-18 05:51:58 4330 Views3 Replies
Hi all,

I have purchased a sound sensor (DFR0034 V2.2, Analog sensor) and i would like to convert the values that the serial monitor show us into DB. Now i m just reading the values of the sensor nothing more.

Information:

Board: Arduino Uno
Sensor : Analog( Output, GND, VCC)

this is my code:
Code: Select all
int led = 13;
int threshold = 100; //Change This
int sensor = A0;
int valeur ;
void setup() {
Serial.begin(9600); // For debugging
pinMode(led, OUTPUT);
//pinMode (sensor, INPUT);
}
void loop() {
valeur = analogRead(sensor); // Reads the value from the Analog PIN A0
Serial.print("Sound Level: ");
Serial.println(valeur);//print the value
if(valeur>=threshold)
{
digitalWrite(led, HIGH); //Turn ON Led
delay(200);
}
else
{
digitalWrite(led, LOW); // Turn OFF Led
}
delay(100);
}

And i would like to convert these values that the sensor measure into decibels :


Image

This what the graph shows me :

Image

this is the link for the datasheet of the sound sensor https://github.com/Arduinolibrary/DFRob ... f?raw=true
2018-01-20 00:06:12 https://circuitdigest.com/microcontroll ... easurement
I found this project, hope this will helpful
userHeadPic robert.chen
2018-01-19 02:23:13 I have the datasheet of the mic and the datasheet of the sound sensor, i m powering my sound sensor at 5V so I think that should not be complicated to convert it into DB. userHeadPic alexandre.riasat
2018-01-19 00:19:34 This sensor can only output analog voltage of the sound, the algorithm covert to dB is sophisticated. This sound level meter can output dB directly https://www.dfrobot.com/product-1663.html userHeadPic robert.chen