tag:blogger.com,1999:blog-6100511197805579796.post8682908581537140645..comments2024-02-14T18:43:36.096+01:00Comments on Davide Gironi blog: A simple Sound Pressure Level Meter (SPL) dB audio meter using AVR ATmegaDavide Gironihttp://www.blogger.com/profile/16366076989473118278noreply@blogger.comBlogger142125tag:blogger.com,1999:blog-6100511197805579796.post-46756317502238455422020-02-17T23:04:24.271+01:002020-02-17T23:04:24.271+01:00The only rectifier I've used is in the bridge ...The only rectifier I've used is in the bridge in the supply stage.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-75843139930690700232020-02-17T21:55:58.676+01:002020-02-17T21:55:58.676+01:00Thanks for the reply David, did you use a rectifie...Thanks for the reply David, did you use a rectifier in your circuit or in the software.Anonymoushttps://www.blogger.com/profile/14314408763712318271noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-9563042930900800962020-02-03T18:43:21.951+01:002020-02-03T18:43:21.951+01:00Hello, you can follow the guide here. Unluckly I&#...Hello, you can follow the guide here. Unluckly I've not time at present to follow you.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-6779242309297477462020-02-03T18:42:40.873+01:002020-02-03T18:42:40.873+01:00Dear person Unknown, this code is not for Arduino,...Dear person Unknown, this code is not for Arduino, you have to change this code to make it works with the Arduino framework.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-62293962718689576582020-02-03T17:24:30.339+01:002020-02-03T17:24:30.339+01:00Hi I want to build a sound pressure level meter us...Hi I want to build a sound pressure level meter using the atmega164p. I am unsure where to start. I know I need a sound sensor connected to an amplifier how would I decide on the right components for this? Please get back to me. Thanks.Anonymoushttps://www.blogger.com/profile/14314408763712318271noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-71937649673585457842019-07-26T17:49:11.952+02:002019-07-26T17:49:11.952+02:00Hello Davide,
I am mounting a decibel meter with ...Hello Davide,<br /><br />I am mounting a decibel meter with arduno using this Mic Electret Ci Max4466 Adjustable Gain Amplifier Module, I am having problems with the calculus part, I wonder if you could send your code to see what I did wrong, I can send mine .. .what I have doubts about alpha.<br /><br /><br /><br />my code:<br /><br />int arduino_analogico = A0;<br />int valor_A0 = 0;<br /><br />#define VREF 5.0 <br /><br />float getDb(){ <br /> valor_A0 = analogRead(arduino_analogico);<br /> float dB = 20.0*log10(valor_A0);<br /> Serial.print("A0: ");<br /> Serial.println(dB);<br /> delay(1000);<br /> return dB;<br />}<br /> <br />void setup() {<br /> Serial.begin(112500);<br /> pinMode(arduino_analogico, INPUT); <br /><br />}<br />void loop() {<br /> <br /><br /> getDb();<br /> <br /> <br /> <br /> <br /> <br /> <br /> /*float voltageValue,dbValue;<br /> voltageValue = analogRead(arduino_analogico) / 1024.0 * VREF;<br /> dbValue = voltageValue * 50.0; //convert voltage to decibel value<br /> Serial.print(dbValue,1);<br /> Serial.println(" dBA");<br /> delay(1000);*/<br />}Anonymoushttps://www.blogger.com/profile/14808272761172248852noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-15719010674195038142019-06-28T14:48:40.903+02:002019-06-28T14:48:40.903+02:00Hello, check the uart ouput by converting the valu...Hello, check the uart ouput by converting the values to ascii, use a simple terminal application.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-73176877150140683952019-06-13T00:29:29.458+02:002019-06-13T00:29:29.458+02:00Hello David.
Ok im recreate your config, step by...Hello David. <br /><br />Ok im recreate your config, step by step. Everything is same, but mic. <br />Im calculate, what with opamp G - 66 and mic sens -35db, i would have 800uV at 32db. <br />Also im change Vref to 1 (VRef = AVCC thru cap == 5V)<br /><br />Now UART receive two bytes 20 00. If im change ADC chanel or Vref to 0 (unconnected thru cap == 0V) , UART still receive 20 00. So i have 2 questions:<br /><br />Why 2 bytes, real Db values always between 0 and 120-140. So why 2 bytes, how i must interpret them?<br /><br />Why 20 00, why not zero or what? What zero point that system has?Twoornothttps://www.blogger.com/profile/03145325831478494577noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-85391382242364801402019-06-10T19:23:43.078+02:002019-06-10T19:23:43.078+02:00This comment has been removed by the author.Twoornothttps://www.blogger.com/profile/03145325831478494577noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-18328829932783233512018-03-25T17:23:51.676+02:002018-03-25T17:23:51.676+02:00Hello. That is because I'm using a digital wei...Hello. That is because I'm using a digital weighting fileter. So the weighting function is in the freq domain. You can use an analog filter before ADC of course.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-59928481538446203472018-03-25T00:01:59.165+01:002018-03-25T00:01:59.165+01:00Why would you need to compute the fft if the signa...Why would you need to compute the fft if the signal is A-weighted prior to be sent to the adc.An actual analog filter would "A weight" the signal being sampled by the adc.The rms value can then be calculated in the time domain rather than computing the fftAnonymoushttps://www.blogger.com/profile/16934577858293594282noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-14236640609557394362018-03-25T00:00:58.647+01:002018-03-25T00:00:58.647+01:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/16934577858293594282noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-24547891464848088462018-02-28T20:40:53.947+01:002018-02-28T20:40:53.947+01:00Hello. It depends on what's your needs. You st...Hello. It depends on what's your needs. You still have to compute the fft if you need to compute spl as example.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-15266708131377249512018-02-28T12:02:16.131+01:002018-02-28T12:02:16.131+01:00Greetings David,
If I were to implement an analog...Greetings David,<br /><br />If I were to implement an analog A-weighting filter before sending the signal to the ATmega,will I still have to compute the fourier transform?Anonymoushttps://www.blogger.com/profile/16934577858293594282noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-76017784499570081482018-02-21T20:02:02.245+01:002018-02-21T20:02:02.245+01:00Hello and thank you, look at the Crush September 1...Hello and thank you, look at the Crush September 15, 2017 at 7:37 AM comments and reply. Hope this helps.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-45527354510079674232018-02-21T14:20:50.104+01:002018-02-21T14:20:50.104+01:00Hi Davide,
Great project!, what is te maximum dB ...Hi Davide,<br /><br />Great project!, what is te maximum dB that your circuit could read, before saturation?. Thanks a lot for your postAnonymoushttps://www.blogger.com/profile/01065781300605582339noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-57312288460625999762018-01-24T20:12:21.703+01:002018-01-24T20:12:21.703+01:00Hello and thank you for your comment. Yes it shoul...Hello and thank you for your comment. Yes it should work with 12 bit. For more precision you have to build up a new Sinewave with let's say 512 NWAVE, and also of course taking more samples helps. Yes, you can just port it to other micro, but there will be a few change to do, most of the math part will work, ADC part must be changed. For your mic, If I've understand what you need you can measure your microphone level output using a multimeter and a calibrated spl meter. Hope this helps.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-8425076254939299832018-01-24T08:04:08.706+01:002018-01-24T08:04:08.706+01:00Hi Davide thanks for all the explanation. Everythi...Hi Davide thanks for all the explanation. Everything worked well on with analog mic.<br />Would it be possible to work with 12 bits ADC? <br />How do I get more bin precision? <br />Would I be able to work with a better microcontroler as Teensy3.6 and have better resolution and/or better results? <br /><br />After plotting the frequency spectrum. How do I get the SPL level a known microphone sensitivity let's say 32db. S/N?<br /><br />Thanks you one more time for the excellent project and how you keep helping everyone! Thumbs upDiego Cabralhttps://www.blogger.com/profile/09522420231722753201noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-60772642615344747412017-12-06T20:13:06.244+01:002017-12-06T20:13:06.244+01:00Hello, you can add this feature to the code provid...Hello, you can add this feature to the code provided in link. I have no time at now to implement that. If you do that please share the code, it could be helpfull for other people. Thank you!Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-36722580798833726832017-12-04T21:59:49.280+01:002017-12-04T21:59:49.280+01:00yes need a frequency of peaks.
can you add this fe...yes need a frequency of peaks.<br />can you add this feature?<br />https://hostingkartinok.com/show-image.php?id=b288355e22e18ab48a827e71673e34beAnonymoushttps://www.blogger.com/profile/16463129057660697465noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-52758248632226689922017-10-01T11:31:27.075+02:002017-10-01T11:31:27.075+02:00You can try faking the ADC raw output, just put a ...You can try faking the ADC raw output, just put a fake value and try with that, also try the formula using matlab or octave or any other math tool you are familiar with, it may help.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-11544400686793386012017-10-01T09:40:38.005+02:002017-10-01T09:40:38.005+02:00Yes i am getting 510 to 512 with no noise. that lo...Yes i am getting 510 to 512 with no noise. that looks good but what i mean is from 0 to 1023 resolution we cannot get a range of more than 50 db, how can we achieve 90 dB range?<br /><br />Thank youCrushhttps://www.blogger.com/profile/02855108243094814922noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-91586468749727849412017-09-30T13:13:40.390+02:002017-09-30T13:13:40.390+02:00If you do not have that, you could get a x10 (or x...If you do not have that, you could get a x10 (or x100) gain using an opamp, then divide.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-74752194860046330432017-09-30T12:48:33.653+02:002017-09-30T12:48:33.653+02:00How did you read 315uV on microphone, i dont have ...How did you read 315uV on microphone, i dont have a dmm that goes below 100 mv :(Crushhttps://www.blogger.com/profile/02855108243094814922noreply@blogger.comtag:blogger.com,1999:blog-6100511197805579796.post-17333117647872256762017-09-30T12:48:14.846+02:002017-09-30T12:48:14.846+02:00When no audio pass through the mic, you should get...When no audio pass through the mic, you should get almost 2.5V, so 512 on ADC. Check it with an oscilloscope if you get almost 2.5V, and look at the signal output of the mic preamp.Davide Gironihttps://www.blogger.com/profile/16366076989473118278noreply@blogger.com