ESP32 DAC producing popping noise on the speaker
Posted: Thu Dec 08, 2022 12:14 pm
On ESP32's DAC, I am producing cosine waves of frequencies between 20KHz - 30KHz over a period of 1000ms. After 1000ms, the wave generation is stopped. Furthermore, after every 50ms, the wave frequency is randomly changed between the specified range of 20KHz - 30KHz using a timer callback function.
I am using a modified version of DAC Cosine Wave Generator example [https://github.com/espressif/esp-idf/bl ... ple_main.c]
After every 50ms, whenever the program switches to a different frequency, I hear 'popping' noise on the speaker. So in a period of 1000ms, frequency switches about 20 times and hence that means a lot of popping. I am using a 3W Audio Amplifier (PAM8403) and 150W speaker (also tried a 0.5W speaker). The popping noise is negligible at low frequencies (e.g. 1-3 KHz)
Following is a sample of the audio generated (range : 20-30KHz): (use headphones)
https://drive.google.com/file/d/1bJ9Bz_ ... sp=sharing
And following is a sample with low frequencies (range : 2-3KHz): (use headphones)
https://drive.google.com/file/d/1DPwqbH ... sp=sharing
I want to know about the cause of this popping noise on the speaker.
I am using a modified version of DAC Cosine Wave Generator example [https://github.com/espressif/esp-idf/bl ... ple_main.c]
After every 50ms, whenever the program switches to a different frequency, I hear 'popping' noise on the speaker. So in a period of 1000ms, frequency switches about 20 times and hence that means a lot of popping. I am using a 3W Audio Amplifier (PAM8403) and 150W speaker (also tried a 0.5W speaker). The popping noise is negligible at low frequencies (e.g. 1-3 KHz)
Following is a sample of the audio generated (range : 20-30KHz): (use headphones)
https://drive.google.com/file/d/1bJ9Bz_ ... sp=sharing
And following is a sample with low frequencies (range : 2-3KHz): (use headphones)
https://drive.google.com/file/d/1DPwqbH ... sp=sharing
I want to know about the cause of this popping noise on the speaker.