Audio noise from ESP8266 WiFi controller - Page 1
Forum section: electronics / beginners

author: hans23
author_rank: Newbie
timestamp: February 27, 2019, 07:56:37 am
content: Hi,I'm trying to use an ESP8266 microcontroller to generate sound and use WiFi at the same time. I'm using the NodeMcu firmwarehttps://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 signalhttps://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

author: runaway
author_rank: Contributor
timestamp: February 27, 2019, 08:27:56 am
content: 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.

author: ogden
author_rank: Super Contributor
timestamp: February 27, 2019, 08:34:56 am
content: 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.

author: kripton2035
author_rank: Super Contributor
timestamp: February 27, 2019, 08:41:00 am
content: 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.

author: iMo
author_rank: Super Contributor
timestamp: February 27, 2019, 09:19:16 am
content: Quote from: hans23 on February 27, 2019, 07:56:37 amTry to wire the grounds in a "star" configuration.

author: runaway
author_rank: Contributor
timestamp: February 27, 2019, 09:30:20 am
content: I mean if your 3V3 switching pwr supply has insufficient amperage peak-factor (low peak current ability), additional filtering capacitors may cause its malfunction. Try to change your 3V3 and follow the advises above.