I currently have an ESP32 dev board running on a PCB which includes an audio circuit read in via I2S using an external ADC. Without wifi enabled, the circuit works flawlessly, albeit with a bit of negligible power supply noise. However, as soon as the wifi is turned on, there is significant noise introduced into the audio circuit to the point that it becomes essentially unusable. It sounds like a "click click click" at about 10Hz. I have tried isolating the wifi by physically moving the dev board away via longer wires and shielding the audio circuit with aluminum foil, but I observed no change in the noise pattern. I also know that the ESP32 draws significant current in spikes as its transmitting wifi. These findings led me to believe that the noise is being caused by a power rail/grounding issue.
I tried putting in some bypass caps both in my audio circuit and directly on the rails of the ESP32 dev board but I had only a small decline in noise, if any. Are there any good strategies to reduce this noise from the current spikes? Do I just need more bypass caps at the ESP32? Or do I need to isolate my audio circuit in some way? Feel free to let me know if you need anymore info.
WiFi current spikes mediation
Re: WiFi current spikes mediation
I see exactly the same thing. I not only see it when WiFi is turned on, but also when Bluetooth (classic) is turned on.
I have a ESP32 Pico Kit mounted on a self made PCB that uses the VS1053b break out board to decode MP3 and other audio formats. My PCB also contains a stereo amplifier to drive the speakers. I am using it as an internet radio receiving the audio stream via WiFi, or receive it via Bluetooth as Audio Sink via A2DP. In general this works great, but I also have this significant noise introduced into the audio circuit whenever WiFi an/or BT is enabled. BT noise sounds different than WiFi....
I have already temporarily separated the power supplies for the audio and the digital part. Both now have totally separate power supplies, each with its own transformer, rectifier, caps, voltage regulator, etc. They only share the ground. Still the same noise. Moving the ESP32 Pico Kit and thus the antenna more away from the audio parts also did not help.
For me it looks like as if the WiFi and/or BT radio causes some very strong current in the power supply, which then somehow introduces the noise into the audio part. Note that the ESP32 Pico Kit has its own 5V to 3.3V voltage regulator (AMS1117) on the board, so I have not much influence on that part. The radio power seems to be using the 3.3V power supply if the ESP32 chip, but I still see strong spikes on the 5V supply of the ESP32 Pico Kit board.
The noise does also not come from the VS1053b part, since removing it did not change anything. Looks like the noise is directly introduced into the amplifiers somehow.
I tried with some more caps on the 5V and 3.3V power supply pins of the ESP32 Pico Kit, but this did not help. I assume that the current spikes are so strong that the caps simply cant help much here.
What has helped the most so far is reducing the radio TX power via software:
For WiFi you can use (see https://docs.espressif.com/projects/esp ... wer6int8_t) to -14 dBm. This reduced the noise significantly. However this of course has other consequences, such as less reach of the signal.
For Bluetooth you can use (see https://docs.espressif.com/projects/esp ... er_level_t). Setting the power levels to -12dBm did not seem to help a lot though... Still a lot of noise when BT is connected.
Any suggestions?
I have a ESP32 Pico Kit mounted on a self made PCB that uses the VS1053b break out board to decode MP3 and other audio formats. My PCB also contains a stereo amplifier to drive the speakers. I am using it as an internet radio receiving the audio stream via WiFi, or receive it via Bluetooth as Audio Sink via A2DP. In general this works great, but I also have this significant noise introduced into the audio circuit whenever WiFi an/or BT is enabled. BT noise sounds different than WiFi....
I have already temporarily separated the power supplies for the audio and the digital part. Both now have totally separate power supplies, each with its own transformer, rectifier, caps, voltage regulator, etc. They only share the ground. Still the same noise. Moving the ESP32 Pico Kit and thus the antenna more away from the audio parts also did not help.
For me it looks like as if the WiFi and/or BT radio causes some very strong current in the power supply, which then somehow introduces the noise into the audio part. Note that the ESP32 Pico Kit has its own 5V to 3.3V voltage regulator (AMS1117) on the board, so I have not much influence on that part. The radio power seems to be using the 3.3V power supply if the ESP32 chip, but I still see strong spikes on the 5V supply of the ESP32 Pico Kit board.
The noise does also not come from the VS1053b part, since removing it did not change anything. Looks like the noise is directly introduced into the amplifiers somehow.
I tried with some more caps on the 5V and 3.3V power supply pins of the ESP32 Pico Kit, but this did not help. I assume that the current spikes are so strong that the caps simply cant help much here.
What has helped the most so far is reducing the radio TX power via software:
For WiFi you can use
Code: Select all
esp_wifi_set_max_tx_power(int8_t power)
For Bluetooth you can use
Code: Select all
esp_bredr_tx_power_set(esp_power_level_t min_power_level, esp_power_level_t max_power_level)
Any suggestions?
-
- Posts: 6
- Joined: Tue Feb 26, 2019 6:36 am
Re: WiFi current spikes mediation
At the very least its nice to hear others are having the same problem! I also observed it in bluetooth operation, though it was more intermittent. This might be more due to the nature of bluetooth vs WiFi, though I don't know the exact architectures/implementations of either so I can't comment. I didn't think about actually reducing the power to the WiFi, that could be a good temporary workaround.
I also used a dev board (HiLetGo board from amazon) so I was able to used separate supplies and I observed the same, the noise was still present regardless. By chance does your dev board follow good PCB antenna design? I read in the [ ESP32 pcb design and placement guide][https://www.espressif.com/sites/default ... uide_0.pdf] that poor board design, ie having the ground plane below the antenna makes the WiFi less effective. My dev board does not follow the recommended design and has the antenna directly over the board, so perhaps it is this poor design that is causing extreme current spiking?
I also made a reddit post [here][https://www.reddit.com/r/AskElectronics ... gnificant/] where I found adding some more caps directly on the audio circuit (specifically the opamp power rails amplifying input audio) and it seemed to change the noise pattern somewhat though it was not extremely noticeable or consistently reproducible. It also seemed to only reduce around 10% of the peaks or so. Following this, I made a rough LTSpice simulation of brief current spikes based on [another post I found][http://bbs.esp32.com/viewtopic.php?t=2777] which seemed to match what I had seen, ie 10Hz current spikes brought on by wifi TX. I found the spikes effects were mediated in the opamp circuit after adding around 10mF of capacitance. I tried my best to estimate ESR and ESL.
With this I made another revision of my board, this time using the bare ESP-WROOM-32 board following the antenna design guidelines by having the antenna hanging off the side. I also quadrupled the capacitance and specifically focused on the ESP32 module's power rails and the opamps power rails. When I get some more results from the revision I can update if nothing else comes to fruition. Hopefully those two big changes should be enough.
I also used a dev board (HiLetGo board from amazon) so I was able to used separate supplies and I observed the same, the noise was still present regardless. By chance does your dev board follow good PCB antenna design? I read in the [ ESP32 pcb design and placement guide][https://www.espressif.com/sites/default ... uide_0.pdf] that poor board design, ie having the ground plane below the antenna makes the WiFi less effective. My dev board does not follow the recommended design and has the antenna directly over the board, so perhaps it is this poor design that is causing extreme current spiking?
I also made a reddit post [here][https://www.reddit.com/r/AskElectronics ... gnificant/] where I found adding some more caps directly on the audio circuit (specifically the opamp power rails amplifying input audio) and it seemed to change the noise pattern somewhat though it was not extremely noticeable or consistently reproducible. It also seemed to only reduce around 10% of the peaks or so. Following this, I made a rough LTSpice simulation of brief current spikes based on [another post I found][http://bbs.esp32.com/viewtopic.php?t=2777] which seemed to match what I had seen, ie 10Hz current spikes brought on by wifi TX. I found the spikes effects were mediated in the opamp circuit after adding around 10mF of capacitance. I tried my best to estimate ESR and ESL.
With this I made another revision of my board, this time using the bare ESP-WROOM-32 board following the antenna design guidelines by having the antenna hanging off the side. I also quadrupled the capacitance and specifically focused on the ESP32 module's power rails and the opamps power rails. When I get some more results from the revision I can update if nothing else comes to fruition. Hopefully those two big changes should be enough.
-
- Posts: 6
- Joined: Tue Feb 26, 2019 6:36 am
Re: WiFi current spikes mediation
I think I fixed the problem!
I received the new design which had proper board design(the esp-wroom32 module attenna was hanging off the side of the board and NOT on top of the ground plane, see the esp32 pcb design tips for further info), and greatly increased capacitance, namely a 1000uF capacitor for each power rail in addition to a 100nF, 1uF, (both ceramic) and a 100uF electrolytic on each power pin of the ic(the input amplifier, adc, and the esp32). I also had the problem of power supply buzz but I added a 10Ohm resistor with the 1000uF capacitor on the 5v rail which acted as a low pass filter and had negligible power drop since the audio circuit only used a few mA of current. I considered using a capacitor multiplier but since the current is so low and my design tends the 5v rail a little high it was manageable. I am not sure if all of them are necessary but the main problem seemed to be insufficient capacitance!
I also had separated ground planes which were connected via a 0Ohm resistor, I considered adding a ferrite bead but that does not seem to be necessary.
If you have any more questions I can clarify, hopefully this helps anyone looking for a solution to this in the future.
I received the new design which had proper board design(the esp-wroom32 module attenna was hanging off the side of the board and NOT on top of the ground plane, see the esp32 pcb design tips for further info), and greatly increased capacitance, namely a 1000uF capacitor for each power rail in addition to a 100nF, 1uF, (both ceramic) and a 100uF electrolytic on each power pin of the ic(the input amplifier, adc, and the esp32). I also had the problem of power supply buzz but I added a 10Ohm resistor with the 1000uF capacitor on the 5v rail which acted as a low pass filter and had negligible power drop since the audio circuit only used a few mA of current. I considered using a capacitor multiplier but since the current is so low and my design tends the 5v rail a little high it was manageable. I am not sure if all of them are necessary but the main problem seemed to be insufficient capacitance!
I also had separated ground planes which were connected via a 0Ohm resistor, I considered adding a ferrite bead but that does not seem to be necessary.
If you have any more questions I can clarify, hopefully this helps anyone looking for a solution to this in the future.
Re: WiFi current spikes mediation
I have also made a new PCB in the meantime. This time actually 2 totally separate PCBs, one for the digital part, and one for the audio part. The digital part also now has much more capacitors for both, the 5V and the 3.3V line very close to the Pico Kit pins. Both PCBs only share the ground at one single point. Other than that, the power supply is totally separated, too. With this I don't hear any noise anymore. Super clear sound, no noise at all ! I guess I had a ground loop somehow that cause the noise.
Re: WiFi current spikes mediation
I apologize for reviving an old post from almost a year ago, but I am experiencing very similar issues and still have no idea how to solve them. I am using an external ADC (ADS1115) and get these common "voltage" spikes when the WiFi is being used. kugelblitz and ifranzki seem to have discovered a very good solution, but I believe my lack of knowledge on the topic of circuitry leaves me unable to interpret it. I currently have an ESP-WROOM-32 that I got from Amazon, is there a better board I should have or how should I go about fixing this? I tried using a different power supply for the ADS1115 and the MSGEQ7 that I am using, but the same spikes still appeared. I also attached a 1000uf electrolytic capacitor connecting the 3.3v and ground pin, but it doesn't seem like that made much of a difference.
-
- Posts: 9723
- Joined: Thu Nov 26, 2015 4:08 am
Re: WiFi current spikes mediation
Kinda hard to say... especially if you hook modules together, the impedance of the wiring can play a big role in things like this. Do you have schematics plus pictures of your setup?
Who is online
Users browsing this forum: Majestic-12 [Bot] and 45 guests