Default settings

If doesn't fit into any other category ....
Post Reply
nedudgi
Posts: 17
Joined: Tue Feb 09, 2021 7:01 pm
Location: Budapest, Hungary
Has thanked: 61 times
Been thanked: 2 times

Default settings

Post by nedudgi »

There's a neat feature, setting the radiated power. IMHO it would be useful to know the default value of the WIFI.power.
User avatar
cicciocb
Site Admin
Posts: 1900
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1271 times
Contact:

Re: Default settings

Post by cicciocb »

HI,
this is an information that I didn't find but I strongly suppose that the value is the max power.
At the same time I discovered an error for the ESP32 only in the function WIFI.POWER (copied from the ESP8266) as the value is not correct and should be given following the table below; from a practical point of view, the value must just be multiplied by 4 i.e. WIFI.POWER(15 *4) for 15dBm.
The range is also from -1 to 19.5 and not from 0 to 20.5 as stated in the documentation
I'll fix in a next release.
  • typedef enum {
    WIFI_POWER_19_5dBm = 78,// 19.5dBm
    WIFI_POWER_19dBm = 76,// 19dBm
    WIFI_POWER_18_5dBm = 74,// 18.5dBm
    WIFI_POWER_17dBm = 68,// 17dBm
    WIFI_POWER_15dBm = 60,// 15dBm
    WIFI_POWER_13dBm = 52,// 13dBm
    WIFI_POWER_11dBm = 44,// 11dBm
    WIFI_POWER_8_5dBm = 34,// 8.5dBm
    WIFI_POWER_7dBm = 28,// 7dBm
    WIFI_POWER_5dBm = 20,// 5dBm
    WIFI_POWER_2dBm = 8,// 2dBm
    WIFI_POWER_MINUS_1dBm = -4// -1dBm
    } wifi_power_t;
BeanieBots
Posts: 325
Joined: Tue Jun 21, 2022 2:17 pm
Location: South coast UK
Has thanked: 173 times
Been thanked: 104 times

Re: Default settings

Post by BeanieBots »

In order to acheive maximum range on some sensors that are on the fringe of Wifi limits, I have been playing around with power settings and made some surprising yet obvious with hindsite observations.
Firstly, I can confirm that the default is maximum power.
My main objective was to maximise duration of battery powered sensors. So, I tried reducing power in the hope of reducing power consumption.
This approach was very dissapointing. Over the full power range, the current drawn did not change within measurable varation.
Reducing CPU clock to 80Mz had a noticeable effect (reduced by ~7mA) but increased the time on (from deep sleep) by around 22mS.
Doing the math on these figures it works about the same overall power consumption per transmission. (more testing needed).

Moving the sensor left or right by a few inches had a significant effect.
Turning the sensor through 5-10 degrees had a significant effect.
The same was true for the receiving end.
So much for omnidirectional antennas :?

Here's the interesting bit:-
Turning down the power on the sender had LITTLE TO NO EFFECT on transmission reliability.
Turning down the power (or even off) on all the other sensors local to the receiver had a SIGNIFICANT EFFECT on reliability.
This caught me surprise at first but is obvious when you think about it.
Imagine being in a town market and somebody in the distance is trying to talk to you.
It doesn't matter how loud they shout, you won't hear them over the local noise.
Wait for the market to close and all goes quiet. Now you can easily hear them. If it's very quiet around you, they don't even need to shout.
Conclusion, it's more about the strength and proximity of local noise than it is about sending power.
Post Reply