Go Down

### Topic: Capacitor Sizing (Read 3746 times)previous topic - next topic

#### tocpcs

##### Nov 24, 2011, 09:25 am
Tried to google, but can't make sense of Amps to Farads.

I want to have an arduino board remain powered on for around 10 minutes after power is lost. The function is in a car circuit where the power will only be available when the ignition is on, and once lost, the arduino should have around 5 - 10 minutes to switch off.

I thought of doing it with a relay driving it from the arduino to get it to turn itself off, but thought a capacitor would be a better idea.

The arduino board and it's regulator seem to suck down around 100mA with the 12V hooked up (the reason I'm not connecting the battery side to it!) - so the capacitor solution should give me a good few minutes power and stop any waste of battery power!

But - how do I pick a capacitor up to the task?

#### Grumpy_Mike

#1
##### Nov 24, 2011, 10:00 am
There is a formula for capacitors some what like Ohms law:-
Q = VC
Where Q is the charge in coulombs, V is the voltage in volts and C is the capacitance in Farads.

One amp is a charge of 1 coulomb flowing past a point in 1 second.

So to find C you need to rearrange it to say:-
C = Q/V
For 100mA over two minutes you get:-
0.1 * 60 * 2 = 12 and at 12 V you get 12 / 12 = 1
So the total energy stored in the capacitor is equal to a 1 Farad capacitor. In fact that is the total energy and you can't run anything once the voltage drops below 7V so that actually reduces the time.

Now you can get super caps at this sort of value but the current density of these are limited, that is you are limited to the charge / discharge currents you can actually get.

Conclusion:- I would forget about capacitors and have a small rechargeable battery in the circuit.

#### jackrae

#2
##### Nov 24, 2011, 10:56 am
Unfortunately the discharge characteristics of a capacitor are nonlinear so simple linear equations such as ohm's law do not apply.

See http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capdis.html for a reasonable explanation of the maths.

As Mike rightly says, the simplest solution would be to use a set of rechargeable cells to act as a back-up power source.  The car and cells are ORed through isolation diodes to power the arduino, such that whichever presents the higher voltage supplies the power.  When the ignition if ON, the car supplies the power, when the ignition is OFF the cells provide the power.

#### Grumpy_Mike

#3
##### Nov 24, 2011, 11:23 am
Quote
so simple linear equations such as ohm's law do not apply.

Well it depends on how you look at it.
In the example above I just did the simple calculation of how much energy is needed to be stored in a capacitor. But as I said you can't squeeze it all out. So to get a better idea you have a residual energy at say 7V when it stops working, and the actual energy you get from a fully charged capacitor at 12V. So the available energy is simply the difference between the two. You can use this to see how long you can keep supplying 100mA before the voltage drops to below working. There is no need in this case to evoke exponential decay of the voltage because that is not what you are interested in. The trick is remembering that coulombs are measured in amps per second:-
http://en.wikipedia.org/wiki/Coulomb

#### tocpcs

#4
##### Nov 24, 2011, 11:42 am
Ahhh - what if I have a 5V (3xAA) battery setup on the 5V side, and also have the 12V to the VIN pin ?
So when the car is on, 12V feeds in, the onboard voltage regulator reduces that to 5V for normal running.
Then, the battery on the 5V pin would backfeed power when VIN is lost causing the chip to keep running and remove the voltage regulator burning down the power ? Isn't that a No-NO as the 5V pin supplies curreny

If I left the car battery hooked up, it'd discharge at too high of a rate for my liking. But then, if I use batteries they'll eventually discharge (though using power off with an interrupt tied to ignition would help).
I'm also thinking: How do car manufacturers do it? They have heaps of crap running that probably utilises 5V..  Clocks, radios, etc.  - Voltage regulator to reduce to 5V - but then these continually waste power through the drop.

#### Grumpy_Mike

#5
##### Nov 24, 2011, 11:49 am
I said:-
Conclusion:- I would forget about capacitors and have a small rechargeable battery in the circuit.

Quote
Then, the battery on the 5V pin would backfeed power when VIN is lost

You use diodes to prevent reverse current flow. I am not sure what you are concerned about backfeeding. A linear voltage regulator is quite happy having power applied to it's output with nothing going in and the series diode in the power jack would prevent any further loss to the rest of the car circuit.

Quote
How do car manufacturers do it? ...... these continually waste power through the drop

Yes they do. They rely on having a huge capacity battery, in relationship to the current draw when off.

#### cmiyc

#6
##### Nov 25, 2011, 04:51 am

I'm also thinking: How do car manufacturers do it? They have heaps of crap running that probably utilises 5V..  Clocks, radios, etc.  - Voltage regulator to reduce to 5V - but then these continually waste power through the drop.

Heaps?  Look at the size of your car battery and then look at the size of a AA.  Notice a difference?

Leave a car sitting for 2 or 3 weeks, it probably won't start.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

#### tocpcs

#7
##### Nov 25, 2011, 08:01 am
Yeh, but won't the voltage converter on the arduino drain the car battery?
(I'd prefer to hook it to the car battery, but don't want a flat battery).

I've read other threads where they've just placed 5V on the 5V pin, saving the energy wasted by the voltage regulator - but I don't think I have a 5V source and the voltage regulator is taking 12 to 5 - 7V drop.

#### Grumpy_Mike

#8
##### Nov 25, 2011, 10:31 am
An arduino sitting doing nothing with nothing connected takes about 30mA, this is the same order of magnitude as the self discharge leakage of a battery.
Yes that 30mA is taken at 12V, some is dissipated by the regulator and some by the arduino. A more efficient way of regulating is by a switch mode regulator. These are typically 85% efficient, so a drain of 30mA at 5V becomes a drain of  5 / 12 = 0.416 / 0.85 = 0.489 * 30mA = 14.6mA.
So it is about half the drain but it is still a drain and it is still small.

Go Up