Generating AUDIO ECHO using Atmega32 microcontroller

echo generator

Introduction:
But now I can do this very easily by a simple digital signal processing using a microcontroller. It’s concept is very simple, ie we need to apply a proper delayed feedback in digital samples with in a circular buffer. I did this using an atmega32 microcontroller and it worked fine. This is simple but really an interesting project. Not only an echo, but we can do a lot of fun with this type of small DSP experiments if we have considerably large RAM in the mcu…

(video demo of echo generation using atmega32)
Working:
 I am using an Atmega32 microcontroller for the purpose. It is having RAM of 2KB and an ADC which is enough for demonstrating the concept of echo generation. An electert mic is used for capturing the voice. It is introduced to ADC with proper amplification and level shifting, which are more critical for the perfect operation.
echo generator
Now the ADC module inside the AVR will convert the analog signal to digital signal at a particular sampling rate(which we can decide).  Now a 1900byte circular buffer is introduced. Our first aim is to make a delay in input and output audio. So, we can do one thing, ie we can populate the buffer from one end and we can read the buffer from another point so that there will be a delay! So how to make this delay to it’s maximum? I think it will be better to explain it via a diagram.
Now, the next process is to make echo effect. For this,we need to provide a feedback from reading point to writing point. In simple words, we need to add a scaled version of reading signal along with the writing sample. The feedback gain should always be <1. So, now the digital signal in the buffer is processed by adding an echo effect. We can provide the reading samples to PWM of AVR to get the pulse width modulated signal. This could be demodulated by using a simple RC filter and can be provided to a power amplifier and we can notice an echo effect in the audio…

Leave a Comment

Your email address will not be published. Required fields are marked *