microphone + speaker + avr

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Having never worked with mic and speakers in the past, i am experimenting with these. I already made a simple circuit with a mic(electret condenser microphone http://www.digikey.com/product-d...) and speaker. I used the above mic with simple amplifier stage and then computer speaker. It works well.

Now, I am thinking of building a simple microphone, speaker and micro-controller circuit. The idea is basically to feed in the input from mic to micro-controller and then output audio signal to the speaker.

For that i think i need to first convert the analog signal from mic to digital values using avr's adc. And after that i need to output the analog values to the speaker. Since this is my first time i need advice on how to build a working circuit. What should be the sampling and playback rate? Do i have to worry about codecs(dont know how large raw audio data can be)? etc.

I am planning on using arduino first since its easy and quick for prototyping.

Any help is appreciated as always! :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try an AVR with builtin ADC and DAC, e. g. AT90PWM3B.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can get Pretty Good Speech out of an AVR. Rig up timer0 compare A for 8000Hz interrupt, rig up timer1 for 8 bit fast pwm as fast as it will go (62500 Hz). Every interrupt read the adc from the last conversion, start another conversion, save the old a/d value in an array (so you can send it out to another intercom or something later), and save the data in the OCR1A register for the pwm. You should get 4KHz freq resp, and 42 dB signal to noise ratio. Somewhat akin to AM radio. Might be able to use 10 bit a/d and 10 bit pwm to get54 dB sn. Better.

Imagecraft compiler user