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 )
If there are any suggestions as to a better or different technique to solve this problem, I would appreciate that too.