I am working on a project where I am required to design and make a sound pressure level meter using ATMEGA 164P microcontroller and it is programmed using Atmel Studio. How would I go about doing this as I cannot find any help online.
You can use a sound level meter and take its signal and enter it to an analog input of the microcontroller. Then you convert this signal after sampling to digital form and store it in the memory of the micrcontroller. Then you can read it and display it on the LCD display of microcontroller. You can also acquire the recorded values of the sound to a PC or a laptop through a UART port. I think there are sufficient software support that can be accessed from the software library of the Atmega microcontrollers.
This task is common task implemented by microcontrolers. If you do not have a sound level meter you can build and calibrate a sound meter using a standard microphone.
You can use a sound level meter and take its signal and enter it to an analog input of the microcontroller. Then you convert this signal after sampling to digital form and store it in the memory of the micrcontroller. Then you can read it and display it on the LCD display of microcontroller. You can also acquire the recorded values of the sound to a PC or a laptop through a UART port. I think there are sufficient software support that can be accessed from the software library of the Atmega microcontrollers.
This task is common task implemented by microcontrolers. If you do not have a sound level meter you can build and calibrate a sound meter using a standard microphone.
Abdelhalim Zekry thankyou for your answer. And I was instructed to build the sound meter myself which is what makes it harder. Any idea on how to build one and is there a specific schematic diagram I can follow? Thanks again
Basically you need a microphone, usually followed by some amplifier, then an ADC input of the microcontroller. The remainder is software:
data acquisition
data filtering according to the filter curve desired
some kind of display and/or output.
Might be the ATmega164 is a bit too "small" for this job:
1 kB of RAM is meager when it comes to storing some samples to apply filter functions.
I'm not sure whether you can realize a sample rate of 40 kSPS (or beyond) - even at the highest MIPS. (This would be necessary to cover the whole audio spectrum.) On the other hand, 40 kSPS with a 512 Bytes buffer would only cover about 1/80 s (1 byte/sample assumed) - setting the lower frequency limit for your measurements.
I've implemented comparable algorithms on ATxmega324/ATxmega328 and IIRC I got a reliable 10 kSPS @ 8 MIPS (which would translate to 25 kSPS @ 20 MIPS). Might be you can get more than that (my implementation had some other things to do as well), but it might serve as some sort of indication.
For a sound pressure level meter, you'll need some calibration once the software in itself is implemented. And be aware you won't be able to get a continuous measurement range from 0 to 160 dB: the resolution of an ADC is
Great responses! I will take everyone’s answers as a guideline. However I am not sure how to get a basic schematic diagram for the SPL meter. Can someone please help me make this. much appreciated