Getting a lot of noise, not sure if I'm blowing out the speaker or something else?

I'm working on building a portable self-playing "box" I can use to add sound effects or ambient noises to an area. I got everything working but I'm getting a ton of noise on the speaker and not really sure what the source is. Am I blowing out the speaker? The in-line potentiometer? Switching power supply?

Any feedback would be appreciated.
SpeakerBox Wiringv2.png
 

Attachments

Last edited:
@jan.didden , @rayma , I did some testing like you guys suggested. It looks like the noise is coming from the ESP32 itself. When I shorted the input to the audio amp, it was very silent/clear. I then tried driving the speaker straigh from the ESP32, while super quiet, you could hear the same noise as you could through the amp.

So I guess the question is, is there a way to clean up the noise on the audio coming out of the ESP32?
 
Guess I would first try heavily filtering the ESP32 audio output before it gets to the volume control.
That is an 8 bit DAC. The audio quality will be lousy.

Try just before the volume control a series 10k resistor, with a shunt 3.3nF capacitor.
If that does not help enough, you may need to use an I2S DAC instead.