-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document high tx power can cause issues #6471
Comments
This sounds like more a question for the board maker than something on Arduino related. I think #6366 might just have gotten unlucky with either power supply, board builders, or a wonky lot of silicon. I've not seen it repro'd outside of his report. |
I think it was more of a design choice by the board builders - smaller board vs higher TX power. I think it's worth documenting as this won't be the last tiny board with an ESP chip on it - there are at least 3 variants/versions of this same sized board from the same manufacturer. Mind you given there are several issues on esp8266.com with weird behaviour similar to what I saw it probably should be raised there too. Might help a few people out. |
There is also the ESP-7. Old, but I've seen a few around. |
@devyte, it was my original idea. It is not floating around. I am not an expert on esp8266, but close to be one :-) I spent many hours reading the docs and playing with the esp8266. |
Even better, from a user's practical experience. |
I will try to reproduce it first. I think I encountered this problem in past more then once with different boards/modules but I didn't investigate it then. And the relation of this problem to calibration and the RF settings area initialization. |
Further info available... see my post Basically it appears to be a cheap flash chip issue and dropping the flash frequency to 26mhz is likely the preferred fix. |
Note that the default tx power is set to maximum (20.5 dbm), however, 802.11n on the 8266 is only spec'd to 17 dbm. |
@readmodifywrite interesting point, and unsurprisingly close to the figure my testing pointed to as being stable :-) |
@JAndrassy said:
ping? |
I didn't have time first, but now I go over problems I had with esp8266 in last two years and investigate them with RF TX power as one of potential causes. |
This seems to still need more testing by @JAndrassy, pushing back. |
still work in progress while parallel experimenting with RTOS IDF. my Robotdyn D1 R2 with external antenna option has a very bad performance with trace antenna. but it doesn't crash. only can't connect. but it has a good power regulator. my hypothesis right now is that problem of @ChocolateFrogsNuts was a not strong/fast enough power source combined with improper antenna. |
The crashes should be fixed since a while. |
@ChocolateFrogsNuts had crashes while trying to connect and reducing RF TX power helped my next test would be if reducing the TX power allows using a week power source on which the esp8266 crashes if connecting without limiting TX power |
My crashes were at some random point, generally within an hour of connecting, but often within a few minutes - so not caused by the actual connect, but presumably by TX in general. Worth testing with a deliberately weak power source though... I could have had a bad batch of regulators. |
@ChocolateFrogsNuts How much capacitance do you have on the ESP power pin? Do you have an oscilloscope to get a power trace? The transmission at full power is an extremely fast transient. The upstream power supply won't be able to respond in time. Capacitance is the only way to supply that burst of energy. |
@readmodifywrite a 470uF electrolytic right at the board didn't make any difference. |
You might need some ceramics as well, electrolytics have higher inductance. I'm running a 22 uF ceramic with a 17 dbm output power - works great. |
Looking back at this post I did have a 22uf ceramic on the 3.3v. By the time I got to here I had it worked out and tests showed up to 17.5dbm as being stable, and that switching to the external antenna connection let it run at 20.5dbm. You may have noticed from the size of that thread there was a heck of a lot of testing went into determining just what was going on :-) |
See also: - esphome/feature-requests#471 (comment) - esp8266/Arduino#6366 - esp8266/Arduino#6471 - https://github.com/xoseperez/espurna/blob/849f8cf920096fa4b804e70913dab0917ee18ad9/code/espurna/config/general.h#L593-L599 - https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/network/esp_wifi.html#_CPPv425esp_wifi_set_max_tx_power6int8_t
* Add wifi output_power setting See also: - esphome/feature-requests#471 (comment) - esp8266/Arduino#6366 - esp8266/Arduino#6471 - https://github.com/xoseperez/espurna/blob/849f8cf920096fa4b804e70913dab0917ee18ad9/code/espurna/config/general.h#L593-L599 - https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/network/esp_wifi.html#_CPPv425esp_wifi_set_max_tx_power6int8_t * Lint
Until we can update the Arduino core 2.6.0 (which is hopefully soon) with the newer xtensa toolchain, it seems the best bet is to reduce wifi sleeping. Also high transmit power can interfere with the flash reading which can cause instability. esp8266/Arduino#5998 (comment) esp8266/Arduino#6471
* Add wifi output_power setting See also: - esphome/feature-requests#471 (comment) - esp8266/Arduino#6366 - esp8266/Arduino#6471 - https://github.com/xoseperez/espurna/blob/849f8cf920096fa4b804e70913dab0917ee18ad9/code/espurna/config/general.h#L593-L599 - https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/network/esp_wifi.html#_CPPv425esp_wifi_set_max_tx_power6int8_t * Lint
Add command WifiPower 0 .. 20.5 to set Wifi Output Power which will be default set to 17dB
So I borrowed a workbench power supply and experimented with limited current. The power supply was not very fine, no mA precision, it displayed amperes with two decimal places. But I could set it to limit the current on edge. Some boots crashed with stack dump, some run, connected to AP and downloaded data. I used an esp-01S module. The result of many experiments with setOutputPower and setPhyMode ended with a sketch based on the EarlyDisableWiFi example. It always crashed at boot. I guess it crashed on RF calibration done by SDK at start. It needed more current to boot if the module was placed in a metallic box. I could not get it to crash on connection to AP. If the boot didn't crash, then it connected to AP and downloaded data. |
I had a problem in (September?) where max RF power caused two clone D1 Mini modules to run erratically (they were only ~3 cm apart). Dropping the power to 10dBm solved it. Both were run from a common 5V 3A PSU, so the noise was potentially transmitted through the 5V rail or GND as current spikes. The FCC cert for the AI Thinker modules was at 17dBm, if memory serves. @JAndrassy I have an improved version of igrr's WiFi disable here, if it helps in the future. It reduces the boot current as much as possible with the current git and SDK. |
* Add wifi output_power setting See also: - esphome/feature-requests#471 (comment) - esp8266/Arduino#6366 - esp8266/Arduino#6471 - https://github.com/xoseperez/espurna/blob/849f8cf920096fa4b804e70913dab0917ee18ad9/code/espurna/config/general.h#L593-L599 - https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/network/esp_wifi.html#_CPPv425esp_wifi_set_max_tx_power6int8_t * Lint
Basic Infos
Platform
Settings in IDE
Problem Description
Issue #6366 turned out to be high tx power causing weird behavior. Lowering tx power achieved stability.
This issue is meant to track documenting that.
The text was updated successfully, but these errors were encountered: