Electronics > Beginners
Audio noise from ESP8266 WiFi controller
(1/2) > >>
hans23:
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
runaway:
What is the amperage rate of your 3.3V power supply? Try to play with another 3.3V source (2..3 ADC), for I have had my esp8266' based thermostat crazy (from time to time) due to poor peak amperage ability of the 3.3V source.
ogden:
WiFi draws significant amount of power, likely it creates drop in the ESP8266 power rail. Unstable supply voltage of "DAC" obviously leaks into it's output.

You can solve this problem multiple ways: 1) add low-ESR (polymer) bulk capacitor 1000uF or so to power terminals of the board, check results. 2) If it does not help, then you shall introduce buffer for your "1-bit DAC" that is powered from separate filtered supply. 3) I would use I2S DAC with own LDO, but this is "advanced way" of solving noise problem. As a bonus you can get significant audio quality improvement.
kripton2035:
yes, I would test with a beefy capacitor at the power pins of the esp , and at the power pins of the amplifier and see if it's better.
iMo:

--- Quote from: hans23 on February 27, 2019, 07:56:37 am ---The noise only goes away when I disconnect the ground line between the analog and digital parts.

--- End quote ---
Try to wire the grounds in a "star" configuration.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod