Author Topic: Audio noise from ESP8266 WiFi controller  (Read 3199 times)

0 Members and 1 Guest are viewing this topic.

Offline hans23Topic starter

  • Newbie
  • Posts: 1
  • Country: de
Audio noise from ESP8266 WiFi controller
« on: February 27, 2019, 07:56:37 am »
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
 

Offline runaway

  • Contributor
  • Posts: 14
  • Country: ua
Re: Audio noise from ESP8266 WiFi controller
« Reply #1 on: February 27, 2019, 08:27:56 am »
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.
 
The following users thanked this post: hans23

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Audio noise from ESP8266 WiFi controller
« Reply #2 on: February 27, 2019, 08:34:56 am »
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.
 
The following users thanked this post: hans23

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2713
  • Country: fr
    • kripton2035 schematics repository
Re: Audio noise from ESP8266 WiFi controller
« Reply #3 on: February 27, 2019, 08:41:00 am »
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.
 
The following users thanked this post: hans23

Online iMo

  • Super Contributor
  • ***
  • Posts: 5570
  • Country: va
Re: Audio noise from ESP8266 WiFi controller
« Reply #4 on: February 27, 2019, 09:19:16 am »
The noise only goes away when I disconnect the ground line between the analog and digital parts.
Try to wire the grounds in a "star" configuration.
Readers discretion is advised..
 
The following users thanked this post: hans23

Offline runaway

  • Contributor
  • Posts: 14
  • Country: ua
Re: Audio noise from ESP8266 WiFi controller
« Reply #5 on: February 27, 2019, 09:30:20 am »
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.
 
The following users thanked this post: hans23


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf