alternating current interpretation

Hi there,

I have put a headsets microphone into the arduino board. It is sending alternating current values, is there a way to interpretate it in a senseful way?

Thank You.

ciao christopher

To interpret the sound in a meaningful way is very hard for any microcontroller. It really depends on what you want to do.

the best it can do is to try to understand if there is sound or not and how strong it is.

if you are an hardcore C developer you might squeeze out some more from the processor.

any input on the microcontroller has diodes used to protect the pin from polarity inversions and over voltages therefore if you stick an AC signal it will be clipped and only the positive part of the wave will come in.

if you explain a little bit more what you would like to achieve we would be able to help


Thank you for the reply. I basically just need the amount of volume coming from the microphone.

A brief description of the project: The microphone will reside in a blanket. It recognizes the movement of someone going to bed, get oneself comfortable or sleep nervously. And then use the data to address another components.

Good you where asking. Now after thinking about it just the volume needs to be extracted... Is that possible?


hey this "sounds" interesting, :) did you succed in your essays?

what about pitch (frequency)? do you think that it is possible to exctract it from the mic input? I can imagine that calculating frequencies is computational intensive...but does anybody know a good and light version for the FFT (fast fourier transformation) on a microcontroller...

or any additional IC needed for the pourpose?



as a matter of fact there is an article on circuit cellar from a couple of months ago where one guy makes FFT on ATMEGA8 in real time and distinguishes a selected collection of tones.

However it is an article for experts, but you could for sure make something out of it.

If I could only find that CC's issue on my desk!!


Now after thinking about it just the volume needs to be extracted... Is that possible?

Take a look to LM3915. This circuit is used often in led VU-meters, but in this case you could use its outputs as digital inputs to Arduino. In the datasheet there is an example with a piezoelectric detector that involves mimimal electronics.

Here is an application with an audio signal. Good luck.

hey David, if you find it it'll be great... I'll be checking on the circuit cellar site to find the article you are talking about or the issue num to back order it.

In the meantime I've found some very interesting things..this site has open source fft C routines for the Atmega8 (look at the bottom)

I gotta study it a bit thoug

if any resource comes out for pitch detection, please let me know... thank you guys. b.

ps. searching on the circuit cellar site I've found this super :o project done with and Atmega8, AVRCam let's make this another shield for Arduino ;-)

The LM3915 looks very interesting. But is it able to handle alternating current? I may be wrong but piezos are sending analogue signals. They are great for the board, but the one I have is not working like a microphone. Like you can speak and it reacts. To make it work you have to push it directly. I put it on my guitar and my heart and it worked. These make room for other interesting projects, is someone interested in a heart rate monitor tutorial anyway :)

So i am still looking to catch sound with the board. And appreciate the fft research. Very interesting.

is someone interested in a heart rate monitor tutorial anyway

do you mean you have one? share it man! :) I'm interested. what components are you using and what's the circuitry

ciao b.