Electrical – Interfacing Microphone amplifier with MATLAB A-weighting filter

arduinoMATLABmicrophone

I am working on a project that essentially would be used to measure the Noise produced by ceiling fans and regulate the speed if the noise interferes with speech levels.

For the first phase of this project I have to sense the noise levels. I have used an Electret Microphone Amplifier MAX4466 to detect the sound and have written a sketch in arduino to measure peak-to-peak amplitude and calculate the voltage. I am looking to provide this signal as in input an a-weighting filter (attached as example.m) on MATLAB. I have downloaded the MATLAB Arduino support package. I somehow can't figure out how to incorporate the analog output of the mic-amp into the matlab a-weighting code.

i'll attach the code (example.m) for reference. (it's an open source code for a generic A-weighting filter response with AWGN )

http://www.mathworks.com/matlabcentral/answers/uploaded_files/46634/example.m
http://www.mathworks.com/matlabcentral/answers/uploaded_files/46633/filterA.m

If there are any suggestions as to a better or different technique to solve this problem, I would appreciate that too.

Best Answer

You cannot perform the A-weighting on your peak-peak measurement.

You would need to feed the raw audio into Matlab to do that. Or more practically, design a filter to perform the A-weighting in the analog domain, between the Mic Amp and the Arduino.