Hi everyone,
I'm working on project with esp32 and I use IDF v3.3.4.
On my custom board, I have a technical limitation about 300 mA on esp32 power supply.
I need to keep two cores active at 240 MHz.
So to be sure to have the same working pattern between each card in production, I decide to disable "reduce PHY TX power when brownout reset" option on menuconfig and put 0 dBm on TX WIFI power.
With this configuration, the peak current is around 240 mA on peak when WIFI is used.
But on boot, I have tree peak around 300 mA and I would know what happen during this state and how can I reduce this peak to keep safe range to my maximum current?
I can produce some curve if need it.
Thanks you,
Best regard,
Samy
high current peak at boot
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: high current peak at boot
Possibly calibration of the RF subsystem... do note that from what I know we do not really support or test for ESP32s running on anything else than an adequate power supply; whatever solution you have to make the thing run at 300mA is not guaranteed to keep working in all circumstances.
Re: high current peak at boot
If the high current is only for a short duration, you could ride it out with a lot of capacitance, 100's uF. But it's probably easier to just upgrade the power supply to properly match the ESP32. If you really can't provide the power required, maybe you could look for a different micro with lower power requirement.
Re: high current peak at boot
Thanks you for your reply.
I note that you don't guaranteed perfect working with 300 mA power supply.
I make some tests in different condition with two cores active at 240 MHz and wifi at 0 dBm: With this setting in stress test (high rate of http request) or in wifi scan mode, I never see a current peak beyond 250 mA except at boot time during RF calibration ( short peak between 300 mA and 320 mA).
So I put a big capacitance about 1000 uF to be sure to keep "constant" voltage on esp32.
This solution works well.
But when I make some micro power cut, the brownout detector works and a short time after the bootloader start but voltage is below the brownout voltage. In this situation, esp32 stay in unknown state until RTC watchdog up and rarely nothing happens until next power cut.
So to solve this, i'm looking to add an external low voltage detector. But before to do this, I would know if this normal behaviour and if software solution exist?
Best regard,
Samy
I note that you don't guaranteed perfect working with 300 mA power supply.
I make some tests in different condition with two cores active at 240 MHz and wifi at 0 dBm: With this setting in stress test (high rate of http request) or in wifi scan mode, I never see a current peak beyond 250 mA except at boot time during RF calibration ( short peak between 300 mA and 320 mA).
So I put a big capacitance about 1000 uF to be sure to keep "constant" voltage on esp32.
This solution works well.
But when I make some micro power cut, the brownout detector works and a short time after the bootloader start but voltage is below the brownout voltage. In this situation, esp32 stay in unknown state until RTC watchdog up and rarely nothing happens until next power cut.
So to solve this, i'm looking to add an external low voltage detector. But before to do this, I would know if this normal behaviour and if software solution exist?
Best regard,
Samy
Re: high current peak at boot
What do you mean by "when I make some micro power cut" ? Before that you said it works well.
You've added 1000uF, now you want to add a low voltage detector. Why not just provide a ~500mA power supply in the first place instead of all these workarounds? It's not like it's consuming 500mA all the time, it just has the ability to do so when needed, and the esp32 needs it. Are you limited by cost, pcb area, or energy consumption, that you think you're limited to a 300mA supply?
I don't expect there will be a software solution because your micro is not properly powered in the first place to execute software.
You've added 1000uF, now you want to add a low voltage detector. Why not just provide a ~500mA power supply in the first place instead of all these workarounds? It's not like it's consuming 500mA all the time, it just has the ability to do so when needed, and the esp32 needs it. Are you limited by cost, pcb area, or energy consumption, that you think you're limited to a 300mA supply?
I don't expect there will be a software solution because your micro is not properly powered in the first place to execute software.
Re: high current peak at boot
I mean by micro power cut to stop power about( for example) 100 ms before to recover power.
With this test, I want to be sure that the esp32 will always start properly after perturbation on power delivery.
We need to stay on 300mA power supply because (not limited) we test it on our application with specific signal processing and we are sure that the power supply doesn't make perturbation. Also, this configuration passes the EMC qualification.
Is more easy and need less time to add capacitance between power supply and esp32 for only 3 short peak at the start of 320 mA max that to redesign with new power supply, improve it in the application, make sure that we don't have pertubations in different condition, ... .
This solution works well. Voltage level stays very stable and never drop during peak current consumption.
And the problem of esp32 starting after micro cut is not a problem of limited power supply. If I put 1A power supply, I will have the same result. Sometime the esp32 don't start properly after brownout detector goes up.
This is the sequence:
- ESP32 work properly
- Power supply cut (t = 0 ms)
- Voltage goes below 2.8V (t= 40 ms)
- Brownout detector flag up (t = 41 ms)
- Esp32 reset thanks to brownout detector (t=43 ms)
- Esp32 bootloader starts but can not complete here process
- At this time, power is recovered
- And now, I need to wait 9 seconds before to have the RTC watchdog go up to have a proper reset that will start main program.
And sometime RTC watchdog doesn't go up and main program don't start (unknown state)
This thing is more observable with large capacitor but is exist also without it and time (t=) more short.
Is for that, I want to put low voltage detector but normaly this need be manage by esp32.
I think Expressif can correct this behaviour to have something more stable and be sure that to start the main program in all situations like other chip on market.
On technical reference manual, I find RTC_CNTL_BROWN_OUT_REG register and on this register we have RTC_CNTL_BROWN_OUT_RST_WAIT field. Maybe, we can adjust this to have better result but decription is too poor to understand.
Best regard,
Samy
With this test, I want to be sure that the esp32 will always start properly after perturbation on power delivery.
We need to stay on 300mA power supply because (not limited) we test it on our application with specific signal processing and we are sure that the power supply doesn't make perturbation. Also, this configuration passes the EMC qualification.
Is more easy and need less time to add capacitance between power supply and esp32 for only 3 short peak at the start of 320 mA max that to redesign with new power supply, improve it in the application, make sure that we don't have pertubations in different condition, ... .
This solution works well. Voltage level stays very stable and never drop during peak current consumption.
And the problem of esp32 starting after micro cut is not a problem of limited power supply. If I put 1A power supply, I will have the same result. Sometime the esp32 don't start properly after brownout detector goes up.
This is the sequence:
- ESP32 work properly
- Power supply cut (t = 0 ms)
- Voltage goes below 2.8V (t= 40 ms)
- Brownout detector flag up (t = 41 ms)
- Esp32 reset thanks to brownout detector (t=43 ms)
- Esp32 bootloader starts but can not complete here process
- At this time, power is recovered
- And now, I need to wait 9 seconds before to have the RTC watchdog go up to have a proper reset that will start main program.
And sometime RTC watchdog doesn't go up and main program don't start (unknown state)
This thing is more observable with large capacitor but is exist also without it and time (t=) more short.
Is for that, I want to put low voltage detector but normaly this need be manage by esp32.
I think Expressif can correct this behaviour to have something more stable and be sure that to start the main program in all situations like other chip on market.
On technical reference manual, I find RTC_CNTL_BROWN_OUT_REG register and on this register we have RTC_CNTL_BROWN_OUT_RST_WAIT field. Maybe, we can adjust this to have better result but decription is too poor to understand.
Best regard,
Samy
Re: high current peak at boot
Ok I see. The other active topic now about the Discharge Circuit might be relevant to your case
viewtopic.php?f=12&t=15641&sid=50c91c28 ... 72ce0df5c6
Follow the link, go to the section about the Discharge Circuit.
And below that, they show using a power supervisor which would hold CHIP_PU (enable) low when the supply voltage is too low.
viewtopic.php?f=12&t=15641&sid=50c91c28 ... 72ce0df5c6
Follow the link, go to the section about the Discharge Circuit.
Here you're not switching repeatedly, but I think the single quick off-on, "micro power cut", is the same type of thing.Note:
The discharge circuit can be applied in scenarios where ESP32 is powered on and off repeatedly by switching the
power rails, and there is a large capacitor on the VDD33 rail. For details, please refer to Section Power Scheme in
ESP32 Datasheet.
And below that, they show using a power supervisor which would hold CHIP_PU (enable) low when the supply voltage is too low.
Who is online
Users browsing this forum: No registered users and 71 guests