Microphone Input

Hi everyone, I am trying to build a simple sound meter that takes a microphone input and based on the ambient sound level turns on some LEDs (when its louder, more lights come on…). I am using a CUI CMA-6542PF omnidirectional microphone (cut sheet attached) and set up the measurement circuit included on the cut sheet, but when I monitor the serial input in Arduino I am getting confusing results. The serial data seems to be slightly different every time I upload the project, and it does not change in response to sound (I have been playing music out of my phone directly over the mic to test this). Has anyone worked with this microphone before and know how to get some useful reading from it?

Thanks!

cma-6542pf.pdf (289 KB)

set up the measurement circuit included on the cut sheet

Post a wiring diagram of your setup. The circuit in the datasheet doesn’t show an Arduino.

And post your code! (don’t forget the code tags, that’s the </> button in the editor).

What voltages are you getting from the circuit? Are they DC or AC?

Paul

Thanks for your replys!

Attached is my code and a photo of my circuit. I basically just have the test circuit set up with the output going into an analog in on the arduino, powered at 5V DC

As for the voltage I’m getting, i read nothing on AC voltage and my DC starts with an inital value around 0.5V and slowly drops towards 0.

microphoneTest.ino (310 Bytes)

wutangclams:
Thanks for your replys!

Attached is my code and a photo of my circuit. I basically just have the test circuit set up with the output going into an analog in on the arduino, powered at 5V DC

As for the voltage I'm getting, i read nothing on AC voltage and my DC starts with an inital value around 0.5V and slowly drops towards 0.

I don't see your amplifier.

Paul

Paul,

I tried a setup with a simple transistor amplifier but my data into Arduino was still wonky and didn't respond to sound. Any other possible issues? I can try using a different amplifier set up.

If you are going to be messing with extremely low level audio, electret microphones, you need equipment to actually see and measure the signal. That microphone is a capacitor with a metalized flexible plate that has a small bias voltage that outputs a tiny change in voltage as the audio vibrated the diaphragm.

Do you have an oscilloscope to actually measure the voltage and the output of your transistor amplifier so you know if the amp is working and how much gain you have? If not, just buy a board with a microphone and amplifier on it. It will give you a digital signal when the audio is above the limit you manually set on the board.

Paul