# Backup power supply using capacitors to help esp8266 run for 3-4 seconds after power failure [closed]

I need to make a circuit with introduction of capacitors in parallel with input supply of esp8266(3.3Vdc) to run it extra 3-4 secs after power failure,

Is it possible to gain extra 3-4 secs just using capacitors or any more components in circuit would be needed?

I want to use just capacitors or some basic components because I don't want to buy any readymade circuit and also it will be cost effective.

Note: I am a programmer so it would be great that I get values of the required components also and circuit diagram if possible!

## closed as too broad by Marcus Müller, Elliot Alderson, RoyC, JYelton, Dave Tweed♦May 24 at 21:29

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• That "please give me a complete circuit diagram with values question": we don't do that here. Regarding your question "Is it possible?": yes it is, you need to know the current draw of the ESP8266, which we can't tell you, because we don't know what the ESP is going to do in that time. It makes a difference of orders of magnitudes if its only going to save values to nonvolatile memory, or receive or transmit data, if it's going to switch much GPIO pins, communicate with a different serially attached device… so with the info you're giving, we can't give you values. – Marcus Müller May 22 at 18:42
• Adding to @Marcus, do you think that 3-4 seconds only are safely enough to ESP8266 do whatever you need it to do? – mguima May 22 at 21:36
• @mguima 3-4 secs(max 5sec) would be enough as I just need to store collected data before power off to retain it when again powered on ! – saurabh kandalkar May 23 at 18:57

It is certainly possible.

The size of capacitor needed would likely be in the super-capacitor class, with a capacitance over 1 F. However, you would now need to adapt your power electronics to handle this new load. When the super-cap is discharged it almost looks like a short-circuit from the perspective of a low power linear regulator.

It would be much easier to diode-OR your input power source with a set of AA batteries for back-up power.

Is it possible to gain extra 3-4 secs just using capacitors or any more components in circuit would be needed?

Nope.

Batteries have a rather flat discharge curve, due to chemical potential, the voltage will stay rather constant during most of the discharge.

Capacitors don't discharge like that, the voltage on the cap will decrease according to $$\ \frac{dv}{dt} = \frac{i}{C} \$$ in other words, with constant current, the voltage will drop at a constant rate. So if you want to extract all the energy stored in your capacitor, you need a circuit which will take power from it over most of the voltage range. Your ESP8266 works on 3.3V, so it will stop working around 2.8V or something, which leaves most of the charge in the cap without using it. You'll have to compensate by using a huge capacitor, which will be more expensive than a small battery.