Formula for Capacitor Value

I've been googling for a while now, and I can't seem to find the answer I'm looking for...

I have a circuit with a 14v supply (car battery) which is fed into a 5v regulator, and then into an Arduino, which is driving a MAX7219 and some LEDs. Current draw on the 5v supply is approximately 120ma, so on the 14v it's probably about 150ma (I haven't measured it yet, but I will). I want to put a capacitor on the 14v supply (or the 5v?) that will keep the Arduino running for 1 extra second when the 14v supply cuts off. Timing does not have to be perfectly exact, but I'd like it to be fairly close to one second +- 100ms.

I can experiment with different capacitor values on a breadboard, but I'm trying to calculate about what value I should start with. And I'd like to know how to calculate it as my design parameters are subject to change.

The formula I found is: t=RC - where t= time in seconds, and R and C being resistance and capacitance. Using this formula and Ohms law, I first figure 14v / 150ma = 93?. Next I figure 1 second / 93? and I get .01 or 10,000uf. That seems really high! Am I doing something wrong?

(Yes, I realize that as the capacitor discharges, the voltage will drop, which is why I think the cap needs to be on the 14v side before the regulator. The t=RC formula is for an approx 63% discharge of the cap (based on Euler's constant, which is approximately 2.718))

I'm planning to use a regular aluminum electrolytic capacitor. Should I use something else?

This may help get you started. I just did a quick Google search.

I used the charge relation.

1A = 1 Coulomb/sec, so your 150 mA will mean that .15 Coulomb will flow to discharge the capacitor. Assuming you need a minimum of 7 V for the regulator, the cap voltage will drop (14-7) = 7 volts.

Capacitance = Charge/Voltage, so we have .15 C/7 V or about .02 Farad, or 20,000 uF, so your calculations seem pretty good.

How about using a buck converter to change the 14v to 5v instead of a simple regulator? I don't have much experience with them, but I did buy a couple of cheap chinese ones for experimenting. They're supposed to be pretty efficient, so to supply 120ma at 5v, it should only draw about 50ma (?) at 14v. That would greatly reduce the size of the capacitor I would need. How about the new "super" capacitors. I don't have any experience with them either, but perhaps that might be a better choice?

The formula I found is: t=RC - where t= time in seconds, and R and C being resistance and capacitance. Using this formula and Ohms law, I first figure 14v / 150ma = 93?. Next I figure 1 second / 93? and I get .01 or 10,000uf. That seems really high! Am I doing something wrong?

The t=RC is the "time constant" and its phisical significance is not exactly what you calculate (although the calculation gives an idea).

For your purpose is much better to place the cap in the 14V side, as long as the regulator will give 5 V on the other side while the cap holds the voltage in the 14 V side above, say, 7 -8 Volts.

It is true that you have to measure the current in the 14 V side. The calculation that KeithRB has made is correct.

Regards

(Yes, I realize that as the capacitor discharges, the voltage will drop, which is why I think the cap needs to be on the 14v side before the regulator.

That's right. You'll also need a diode so the capacitor doesn't "try" to power everything else in the car (if this is actually in a car).

Or, just change your concept so that the Arduino actually remains connected to the battery for 1 second after the main power is shut-off. :wink:

Perhaps I can get better suggestions by explaining more of my project...

I'm making a fun/novelty/cool/cute/whatever blinker thingy to go onto the trailer hitch when a trailer is not actively connected.
(It is not intended to replace the main turn signals) My source of power includes the right and left turn/brake signals, and the tail-light. The tail light may not be on (during the day), the brake may not be pressed, and the turn signals have a 50% duty cycle, 1 second on, 1 second off. I wish to power the blinky thingy during/through the off cycle of the turn signal, but not much beyond that in case the blinker is then turned off. There is no readily available source of constant power, unless perhaps the tail lights are on, or the brake is pressed, but that is not guaranteed -- and I still need power if only the turn signal is blinking. A 20,000uf capacitor is, well, not very practical.

How about 1F at 2.7V at 0.2 Ohms for $1.30?

http://nl.mouser.com/ProductDetail/Bussmann-Eaton/HV0810-2R7105-R/?qs=sGAEpiMZZMuDCPMZUZ%2bYl5pHcBUbMqmZfi5wwvU44W4%3D

1F at 5V at 0.2 Ohms for $7.50?

http://nl.mouser.com/ProductDetail/PowerStor-Eaton/PM-5R0H105-1/?qs=sGAEpiMZZMuDCPMZUZ%2bYl4t552EgXXo2jgEY6VTgibk%3D

These polyacene capacitors (not actually batteries, as some websites call them) are 0.6F at 3V at 20 Ohms. $15 for 100, you could parallel a lot of them to get lower ESR and higher capacity.

Is there any value in operating this gizmo while the tail lights are off? Can you tell whether the LEDs are illuminated in daylight?

Hmmm....

At this point I am leaning towards using "SuperCapacitors" and a buck converter. But I am still open to suggestions!!
And I certainly would be interested in hearing from anyone with some experience with these things.

Most supercapacitors are only good for 2-3v, but I found a batch of five - 5.5v .022F supercaps on eBay for $7. If I put 4 of them in series I should be good up to 22v. The cheap chinese LM2596 buck converters for $2 are supposed to be 92% efficient, so if I convert 13-14v down to 5v, and it draws 150ma on the 5v side, the 14v side should only draw, by my calculations, about 63ma. With 22,000uf I calculate I should get about 2.4 seconds of standby. That's more time than the 1.0 seconds I wanted, but I can compensate for that in code. I don't see any suitable supercaps with less than .022F. Now comes the problem of cramming all this into limited space. I'm using an Arduino nano, and this all has to fit into a space 1.75" x 1.75" x 1.75". After I'm really really really sure it's working the way I want, it will all be encased in silicon potting compound except for the FTDI interface pins, so I will still be able to update the software at least.

Oh, and yes, the LEDs are behind a red-tinted lens, and they are visible in the daylight. In fact, brighter than I had expected, even with the vehicle facing east and the sun in the west.

Keep in mind that those 0.022F capacitors are most likely battery backup caps, and have very high internal resistance.

Yes, those .022F supercapacitors are indeed meant to be battery backups, or to power lower-power things like real-time-clocks.
So how would that high internal resistance affect my design? I have no experience with them, I only know bits and pieces I've read about them. Would they be slow to charge?- because it's my understanding they charge rather quickly, making them superior to ni-mh batteries in many cases. Slow to discharge?- Perhaps they will not release current quickly enough to power my circuit?- again its my understanding they discharge quickly, because I think they are also used in some modern strobes.

I've already ordered them, so when they arrive I can try them and just see how it works. But as an Engineer, I like to have a pretty good idea of what is gonna happen before I build it.

UPDATE: Did some research on supercapacitors. They have a very LOW internal resistance. Here's an excerpt from http://www.instructables.com/id/Lets-learn-about-Super-Capacitors-A-Practical-G/

Aside from the fact that the super capacitor can be charged very quickly due to their low internal resistance, which is known as ESR, but they can just as quickly be discharged.

No, -those- supercapacitors have very low internal resistance. Did you look at any of what I linked to or wrote?

Memory/clock backup capacitors have high internal resistance and charge slowly. Like this 0.22uF 5.5V memory backup capacitor with 75 ohms of ESR:

I would not rely solely on Instructables for information about anything. Anyone can post any project and say anything about it, pretty much. That one only addresses low ESR supercapacitors.

In fact, at the end there is a disclaimer:

DISCLAIMER:
Again, I want to add that this instructable was meant to be simple and fun. There is a TON of theory that relates to both capacitors and super capacitors that have been left out for the sake of being practical. For all of those engineering types out there, please do NOT break my balls. I have a TON of experience with super capacitors, and I've designed many, many circuits that include them.