Powering ESP-01


I am experimenting with a circuit to send temperature & humidity readings every 15 mins to a web site. Its working really well, but I have an idea to simplify the circuit and need some advice please.

The circuit currently consists of ESP-01 module (8 pins), an SHT21 i2c temp/humidity sensor, a cp2102 usb to serial adaptor module and an ams1117 3.3V regulator module. Also 2 x pushbuttons, 2 x 4K7 pullups (for i2c lines) and 1 x 10K (for reset line) pullup resistors and 100uF and 0.1uF caps.

The regulator is fed 5V from the USB serial adaptor and provides enough current for the ESP. But I am wondering if I could use the 3V3 output from the USB serial adaptor instead of the ams1117.

According to the CP2102 data sheet, up to 100mA can be drawn from its built-in 3V3 regulator. This is, on the face of it, not enough to power the ESP, which can use ~200mA for short bursts. However, on average the ESP must use much less than that.

In my circuit, the ESP spends around 5s connecting to Wifi and sending its data. Then it spends 15 mins idling, when it uses only a few tens of mA. Even during the 5s of activity, the current only peaks to 150mA+ for very brief periods and averages perhaps half of that. I don't have a scope to measure it, just a DMM, which does not make taking peak and average readings easy!

With the 100uF cap connected to the 3V3 and ground pins, I am hoping that the short bursts of peak current demands will be smoothed out, resulting in an average current of less than 100mA. This would mean that the cp2102's 3V3 output would be sufficient and not stressed too much.

Can anyone suggest how I can calculate whether the 100uF is large enough, and whether the cp2102 would have a long life if I ditched the ams1117 regulator?



Look up the explanation of the RC time constant. That equation provides the voltage drop associated with drawing current from a capacitor. If your capacitor is supplying current for surges, I suppose you must determine how much current your supply is delivering, so that you know how much must be delivered from the capacitor. Then size the capacitor so that the current drawn, for the time necessary, won't drag the voltage down too much.

You can't just "size the capacitor for your needs". A large capacitor is a dead short for the regulator, untill it is charged. The internal regulator is specified for 100mA, and ~25mA goes to the IC itself. Not much left. I would stick to using a second regulator. That might also use up less (board) space than a big electolytic cap. Leo..

you have two problems with using a cap as reserve.

as Wawa said, you have to charge the cap.
so, once your device pulls down the cap, the VR has to charge it, that means two loads on the VR.

you could make a circuit that charged the cap through a resistor so as to prevent the discharged state from being an issue, then isolate the output so that the cap is only in circuit briefly, then is out of circuit while it charges.

But as Wawa said, you would use more board space and have a more complicated circuit.
and then it would only be useful for short periods. this has more down sides than up sides.

Thanks all, I will keep the ams1117 regulator module in the circuit.

Do you think the 100uF is adding much value to the circuit? Should i remove it or replace with 10uF?

PaulRB: Do you think the 100uF is adding much value to the circuit? Should i remove it or replace with 10uF?

I think this is one of those questions you can only answer after testing with one or the other. I don't really share Wawa's concern that a 100uF would be too big though; charging that one startup is some really small fraction of a milliamp for a fraction of a second and insignificant to the 25ma the IC uses.

Didn't say anything about 100uF being too big. 200mA for 5seconds would require a cap very much bigger than that, and that could be a problem. I think 100uF could be ok, but is not needed. Better use the manufacturer's recommendation. Slow starting supplies could also interfere with digital circuit startup. Leo..

To amplify on Wawa's point: the value of a capacitor that can supply 200 mA for 5 seconds can be calculated quite easily from the defining equation Q = CV

From that equation, the current I = dQ/dt = C dV/dt.

Setting dV/dt = 1 volt over 5 seconds and I = 0.2 A,

C = 0.2A/0.2(V/s) = 1 Farad, about 10,000 times larger than 100 uF.

So, the 100 uF cap doesn't do much to solve that problem.

Well, i have already said i will be keeping the 3V3 regulator as part of the circuit, so this discussion is now purely theoretical, but hopefully educational.

The circuit does not draw 200mA for 5 seconds, as i mentioned in the OP. I can't measure the peaks very accurately at all, but i would guess they last for less than 10% of the 5s in total. Also the cp2102 's regulator can supply perhaps 75mA of the current required during those peaks, leaving a cap to make up the shortfall.

I suppose i could rig up an Arduino (with independant power supply) as a crude oscilloscope to take a rapid series of voltage measurements of the esp's supply rail during the 5s. I could see if i can detect any voltage drops during peak current demands, with the ams1117 and 100uF cap. Then i can try removing the cap, removing the ams1117 and using the cp2102's 3V3 output but putting the cap back, try 470uF, 10uF etc...