I am using Esp32 to control a NRF24L01 with antenna

To power the solution I am using a HLK-PM03 which provides a 3.3V Output.

I was thinking of using 470uF capacitor (other suggestions are appreciated).

When writing the software, in the startup process I would like to know exactly how long I need to wait until the capacitor is fully charged, before sending any commands to the NRF24L01

The capacitor is connected to +Vo and -Vo to be able to give more stable power, because when sending commands from the Esp32 to the NRF24L01, the NRF24L01 will draw more power when sending.

The esp32 is getting commands via wireless lan so I am using the Wi-Fi which takes some power and I believe that needs to be taken in to account when choosing the size of the capacitor.

Is there a formula I can use? How do I decide on what size capacitor to use?

  • 4
    \$\begingroup\$ It is currently unclear what you plan to use the capacitor for and how you plan to charge it. These are important details to be able to answer your question. \$\endgroup\$
    – Matt
    Commented Sep 18, 2021 at 1:44
  • \$\begingroup\$ I added to the question "The capacitor is connected to +Vo and -Vo to be able to give more stable power, because when sending commands from the Esp32 to the NRF24L01, the NRF24L01 will draw more power when sending." does that answer your comment? \$\endgroup\$
    – guttih
    Commented Sep 18, 2021 at 2:09
  • \$\begingroup\$ how much excess current capacity does the oiwer supply have during the charging of the capacitor? \$\endgroup\$ Commented Sep 18, 2021 at 2:27
  • 3
    \$\begingroup\$ In order to help, we will also need to know how much current the supply voltage rails can provide. Capacitor is a component that stores charge (electrons) to it's voltage, so you need to figure out how fas you can put electrons in to charge the capacitor full. You can calculate the time constant $$\tau = RC$$. Time constant is the time it takes to charge a capacitor to 63%. \$\endgroup\$
    – user24368
    Commented Sep 18, 2021 at 2:27
  • \$\begingroup\$ To add to that: when using a resistor to charge a capacitor (and there is no other current discharging the capacitor), we consider a capacitor to be fully charged after 5 times the time constant: T = 5 * R * C. That's because at that point its voltage is within 1 % of the final value if you waited forever. \$\endgroup\$ Commented Sep 18, 2021 at 3:05

2 Answers 2


A couple of things, but the first one is: don't do this.

The question is: Why?

A) 470uF is a lot of capacitance and is more likely to hurt than help

  1. 470uF can take a while to charge up. Most chips have a supply voltage specification that the voltage MUST rise at a certain rate or the reset circuitry will malfunction. That much capacitance could slow you down far enough that you might not meet the specification.

  2. A 470uF capacitor will probably have quite a bit of series resistance and so won't supply current as quickly as you think it will.

  3. A 470uF capacitor is probably pretty big and expensive.

  4. The nrf24L01 only pulls 10mA MAX. There is no way you need a capacitor that big.

B) The inherent power on reset takes a non-deterministic amount of time. It can be up to 10.3ms for the nrf24L01 (see the datasheet)

C) A capacitor that large is rarely useful for RF circuits as the capacitor likely has a terrible high frequency response.

Given all this, the question becomes "What should you do?"

What you should do is read one of the nrf24L01 registers.

The nrf24L01 has several registers that come up with useful bit patterns so that they can be distinguished from a chip that hasn't powered up yet.

Register 0x0A defaults to 0xE7E7E7E7E7. Register 0x0B defaults to 0xC2C2C2C2C2.

Both of these bit patterns have transitions which means that you can distinguish them from a stuck bus. If you do a read and don't get the expected value, the chip hasn't come up yet and you should wait a bit and do a read a little later. If you do a read and do get the expected value, the chip is up and you're ready to go.

Hope this helps. Good luck.

  • \$\begingroup\$ So, you do not think I need a capacitor? That's OK, I don't know much about electronics, I thought that a capacitor could be thought of as as a helping battery, that is to have a little extra power on hand when needed. Thanks, for your answer :) \$\endgroup\$
    – guttih
    Commented Sep 18, 2021 at 11:14

How long does it take to charge up a capacitor

There is no formula you can use to tell you how long this capacitor will take to charge. The best you can do is provide an indication of how long it will take if the power supply does not go into shutdown.

Look at the datasheet for the HLK-PM03 power supply: enter image description here

From this data you can see that:

  1. The power supply can provide about 1.2A without shutting down.
  2. There is no indication of the power supply risetime.
  3. 200% rated current implies shutdown (and a time begore it restarts).

If you were to assume that the turn on current will be below 200% of rating, then you may be able to get between 1.2A and 2A during power up risetime.

Given that dV/dt = IC Then at 2A the risetime to 3.3V will be about 800us.

If this same supply is used for your WSP32, then when you come out of brownout and initialize, a 100ms wait would seem appropriate before you send commands.

You may also be limited by the risetime of the power supply itself, and the datasheet provides no information on this.

  • \$\begingroup\$ Erm, your formula is off: i=C*dV/dT. 2A = 470uF * 3.3V / dT dT = 775us \$\endgroup\$ Commented Sep 18, 2021 at 4:52
  • \$\begingroup\$ @AndrewLentvorski You are so right...... \$\endgroup\$ Commented Sep 18, 2021 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.