Hi,
I'm trying to use an ESP8266 microcontroller to generate sound and use WiFi at the same time. I'm using the NodeMcu firmware
https://nodemcu.readthedocs.io/en/master/. NodeMcu has a pcm library for playing 8 bit samples and the documentation also describes the filtering circuitry that I'm using to convert the sigma-delta-DAC output to an analog signal
https://nodemcu.readthedocs.io/en/master/en/modules/pcm/. As an amplifier, I use a generic LM386 breakout board.
Things work in general, however the WiFi transmitter in the ESP8266 creates loud, periodic clicking noise in the audio output. I'm pretty sure that the noise is directly related to the WiFi because they are not there if the WiFi is off, and they also relate to network traffic on the Microcontroller. The volume of the noise changes when I change the orientation between the amplifier and the microcontroller board and also when I touch the circuitry, but I have not been able to eliminate it permanently by relocating the boards. I've also tried to use a different power supply for the amplifier and the digital part just to see whether the noise is fed back through the supply line, but that does not happen to be the case. The noise only goes away when I disconnect the ground line between the analog and digital parts.
My hope is that I can run this circuit from a single supply in a box that also contains the speaker, but I need the noise interference to be eliminated. Is that feasible with small form factor components? Any advice would be greatly appreciated!
Thanks,
Hans