Electronic – arduino – How to read an audio signal using ATMega328

adcarduinoaudio

I was trying to use the ATMega328 ADC port A0 to read a signal. The hardware I used was:

The signal I got seems to be only the positive part of a sine wave. Is it possible that this setup isn't suited for audio recording? What I have to change?

Best Answer

Without having ever used any of those parts, let me see if I can take a stab. Do you happen to have access to an oscope? If so you might want to check your signal before you start building anything.

Most likely your microphone/amp is outputting a wave that is centered around 0v, meaning you have + and - voltages. Think of a sin wave that fluctuates between -1v and 1v. In order for your micro to use this, you will need to add a DC offset such that you most negative voltage becomes slightly above 0v and your most positive voltage is slightly below the max that your micro can read (probably around 5v).

With out looking into your components in more, it is hard to tell you specifically what you need to do in order to get your DC offset, but maybe this will put you in the right direction.