Hi,
I am using a piezoelectric sensor to monitor the sound of an industrial machine. However, I couldn't find a code that transforms the voltage reading from the piezoelectric sensor to DB can someone help me?
Do you know the sensitivity of your piezoelectric sensor in dB?
no, I tried looking in the website I purchased it from but couldn't find the sensitivity.
I purchased it from amazon and this is the link if you can help me find the sensitivity
It is meant for sensing vibrations, not sound.
Even the manufacturers don't quote any sensitivity.
https://wiki.keyestudio.com/Ks0272_keyestudio_Analog_Piezoelectric_Ceramic_Vibration_Sensor
Without knowing the sensitivity there is nothing you can do.
ooh so is the value I am getting from this code vibration? or is it the wrong code?
int sensoroutput = 3; // the analog pin connected to the sensor
int THRESHOLD = 100;
void setup()
{
Serial.begin(9600);
}
void loop()
{
int value = analogRead(sensoroutput); // function to read analog voltage from sensor
Serial.println(value);
delay(1000);
}
That collects sensor voltage readings, about once every second.
Does that make any sense for measuring "vibration"?
There is a diode to rectify the output of the piezoelectric ceramic element.
Thus it gives an output voltage that gives some indication of the amplitude of vibration.
can you please provide me with a link to a video that I could use as a reference?
To convert to dB:
float dB = 20.0 * log(reading);
You need to post a schematic of your wiring because unless the sensor is wired up correctly and biased to a mid point you will not get any meaningful results.
Once you have got meaningful results then you can worry about the dB conversion.
The dB is a relative scale so you have to have a reference point to say something is so many dBs higher or lower than the reference.
When some people talk of dB the mean dBm which implies a mill Watt of power.
The best way to get the dBm of a reading is to calibrate it with a known meter.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.