Skip to content
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

Support dynamic low power mode (IDFGH-14169) #14971

Open
xobs opened this issue Dec 3, 2024 · 6 comments
Open

Support dynamic low power mode (IDFGH-14169) #14971

xobs opened this issue Dec 3, 2024 · 6 comments
Assignees
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF

Comments

@xobs
Copy link
Contributor

xobs commented Dec 3, 2024

Is your feature request related to a problem?

I have a design that can run off a variable input power supply. It can take anywhere from 1.8 to 5V. When running at lower voltages, the current draw is higher. As a result, the system is more prone to browning out.

Describe the solution you'd like.

I would like to be able to measure the voltage prior to turning on the PA and to adjust the transmit power depending on whether there is enough headroom.

Describe alternatives you've considered.

Currently I run with a TX power of 10, because this is the worst case. This is not ideal because it means I can't have higher power when more voltage is available.

Additional context.

There is a function that dials down the PHY power if a brownout occurs, but I would like to dial back power before a brownout reset occurs.

I can manually adjust the PHY data prior to starting wifi, but it seems to be a poor idea to snoop internal data structures that way.

@xobs xobs added the Type: Feature Request Feature request for IDF label Dec 3, 2024
@github-actions github-actions bot changed the title Support dynamic low power mode Support dynamic low power mode (IDFGH-14169) Dec 3, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 3, 2024
@BitsForPeople
Copy link
Contributor

May esp_wifi_set_max_tx_power() be what you're looking for?

@xobs
Copy link
Contributor Author

xobs commented Dec 5, 2024

It's unclear what that function does, and it looks like it's in libnet80211.a so I haven't investigated what it actually does.

The documentation for ESP_PHY_MAX_WIFI_TX_POWER says the minimum power is 10 dBm, but that function looks like it'll allow as low as 2 dBm.

That function also indicates that it won't run without wifi having been started.

It could be that I could set my device to transmit on the "lowest" power (10 dBm) and then adjust it lower or higher using that function, but the fact that it requires wifi to already be running is a problem.

@BitsForPeople
Copy link
Contributor

The actual problem may be to find out if and by how much you can dynamically lower the WiFi TX power without losing connection.

@esp-lis
Copy link
Collaborator

esp-lis commented Dec 30, 2024

@xobs Refer to the following diagram for the power supply requirements of the ESP32-S3. An excessively low or high supply voltage may cause the chip to operate in an unexpected state.
image

@xobs
Copy link
Contributor Author

xobs commented Dec 30, 2024

@esp-lis that's correct. The issue I'm running into is the power draw is too high, particularly during PA initialization, and so I need to back it down.

My power supply generates 3.3V, but during initialization the current can spike which causes the voltage to dip, particularly if the upstream power supply can't keep up. One solution is to add a lot more capacitance, but I don't have space on the PCB to do that.

Another solution is to reduce the transmit power. There is esp_wifi_set_max_tx_power() but it only takes effect after calibration, which would already cause the brownout.

I can configure the overall maximum transmit power to be lower as a compile time option, but it's not clear if there is a way to increase the power after starting it up. Particularly since it operates by overwriting the table in a private function.

@xobs
Copy link
Contributor Author

xobs commented Dec 30, 2024

There may also be some confusion from the initial issue report.

When I say that it can run from 1.8V - 5V, I'm referring to the input of the whole project. There is a buck-boost that converts it to ~3.4V which is within the acceptable range of the target. The PA is beefy enough that when running at lower voltages the buck-boost can't keep up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

4 participants