How to calculate size of capacitor given mah requirement, volts and duration

Thread Starter

PeregrineSpur

Joined May 22, 2018
6
Hi,

I need help in calculating the size capacitor required for my project. I have a pcb which draws 120 mah at 5 v. I need to overcome a dip in power for approx 1 second while a motor powers up. How would I calculate the capacitor size required?

Thanks in advance.
 

Hymie

Joined Mar 30, 2018
1,277
Hi,

I need help in calculating the size capacitor required for my project. I have a pcb which draws 120 mah at 5 v. I need to overcome a dip in power for approx 1 second while a motor powers up. How would I calculate the capacitor size required?

Thanks in advance.
We need the motor current draw on power-up to answer this.
 

AnalogKid

Joined Aug 1, 2013
10,986
mah is a term for battery capacity, not power drawn by a load. Are you saying that your board draws 120 mA at 5 V?

If the voltage dips, that means there is a resistance between the power source and the motor, and that resistance is a significant fraction of the equivalent resistance of the motor when starting up, creating a voltage divider. As above, need the *peak* current drawn during the start up period.

Also, what is the power source for the board? The problem might be that the source is not adequate for the load.

ak
 

Thread Starter

PeregrineSpur

Joined May 22, 2018
6
Thank you for the reply,

Yes you are correct I did mean 120 mA at 5 V. The motor peaks at 2 amps and only starts, runs for a second and then stops. Before the motor is started the whole circuit draws 40 mA. The power supply is 3 c cell batteries in series. I further have a restriction on the power supply thus wanted to put a capacitor and diode in place to bridge the dip. I have tried 18 800 uf but no luck, I could continue increasing the value but would like to know how to at least get a ballpark calculation.

Regards
 

AnalogKid

Joined Aug 1, 2013
10,986
The dip is caused by the batteries' internal resistance.

The discharge curve of a capacitor into a resistor is a decaying exponential. However, it can be approximated over short portions by a linear equation:

ec=it

E x C = i x t

Voltage decrease times capacitor value (in farads) = discharge current (assumed to be constant) x time (discharge period)

For a capacitor charged up to 5 V, that you don't want to dip below 4 V, supplying 2 amps for 1 second:

1 x C = 2 x 1

C = 2 farads (!!!)

ak
 

crutschow

Joined Mar 14, 2008
34,280
Here's the LTspice simulation of the circuit with a 0.2F capacitor and a Schottky diode to block the reverse current (motor connected to V1).

upload_2018-5-22_14-32-30.png
 

Thread Starter

PeregrineSpur

Joined May 22, 2018
6
Hi crutschow,

Thanks for this, your simulation shows 10% of the value of AnalogKid's calculation.
May sound like a dumb question but have you found the simulations to be accurate when implementing solutions.

I read another article which made sense to me and comes in closer to your values.
"A 1-farad (1,000 mF or 1,000,000uF) capacitor can store one coulomb (coo-lomb) of charge at 1 volt. A coulomb is 6.25e18 (6.25 * 10^18, or 6.25 billion billion) electrons. One amp (1,000 mA) represents a rate of electron flow of 1 coulomb of electrons per second, so a 1-farad capacitor can hold 1 amp-second of electrons at 1 volt."

My understanding of the above is that 1-farad holds 200 mA at 5 V for 1 second. So from this I would have calculated 0.6 Farad for 120 mA but would have bumped it up so that it would not drop past 4v in the second.

What would you recommend the course of action should be?

Thanks and regards
 

Hymie

Joined Mar 30, 2018
1,277
Here's the LTspice simulation of the circuit with a 0.2F capacitor and a Schottky diode to block the reverse current (motor connected to V1).

View attachment 152932
Although it has been shown that you need a capacitor of around 0.2F to overcome the voltage dips due to the motor current draw – in reality you need protection for your circuit that is drawing 120mA.
The fact that the voltage supplied to the motor might drop significantly due to the starting current is immaterial.

If the 5V supply to your circuit has a diode preventing the motor current draw affecting the voltage, then you would need a capacitor of around 10,000uF to withstand a 1 second loss of power (based on a current draw of 120mA).
 

crutschow

Joined Mar 14, 2008
34,280
Thanks for this, your simulation shows 10% of the value of AnalogKid's calculation.
Yes, because he calculated for the motor current, but my circuit has a diode to isolate the motor voltage drop from the rest of the circuit.
May sound like a dumb question but have you found the simulations to be accurate when implementing solutions.
Yes, for the most part, particularly with simple circuits, such as this.

I never build a circuit without simulating it first. It also allows me to easily modify the circuit to optimize it's operation and test variations of the circuit to see which works best.

But the simulation is only as good as the part models, so if the models are not accurate, then neither will the simulation be.
What would you recommend the course of action should be?
If you don't want to use such a large capacitor, then you either need a battery large enough to not exhibit that drop from the motor starting (assuming it's not due to wire resistance), or add a battery to power the circuit during the voltage dip.

Have you checked the voltage drop directly across the battery terminals during the motor start?
 

WBahn

Joined Mar 31, 2012
29,976
Hi crutschow,

Thanks for this, your simulation shows 10% of the value of AnalogKid's calculation.
May sound like a dumb question but have you found the simulations to be accurate when implementing solutions.

I read another article which made sense to me and comes in closer to your values.
"A 1-farad (1,000 mF or 1,000,000uF) capacitor can store one coulomb (coo-lomb) of charge at 1 volt. A coulomb is 6.25e18 (6.25 * 10^18, or 6.25 billion billion) electrons. One amp (1,000 mA) represents a rate of electron flow of 1 coulomb of electrons per second, so a 1-farad capacitor can hold 1 amp-second of electrons at 1 volt."

My understanding of the above is that 1-farad holds 200 mA at 5 V for 1 second. So from this I would have calculated 0.6 Farad for 120 mA but would have bumped it up so that it would not drop past 4v in the second.

What would you recommend the course of action should be?

Thanks and regards
A 1 F capacitor has a charge of 1 A·s at 1 V. but another way of saying that is that the voltage on a 1 F cap will change by 1 V for every 1 A·s of charge place onto it or drawn off of it.

There are some other numbers you've given that don't make a lot of sense. You first said that you have a PCB that draws 120 mA but then later said that your entire circuit only draws 40 mA when the motor is off. So what is that 120 mA for.

You also said that your circuit is 5 V but that it is powered by three C cells in series. That's only about 4.5 V when new. Is there a DC-DC converter involved here?

You need to determine as best you can what the total charge that your capacitor needs to furnish during the time that it needs to be supplementing the power and how much voltage you are willing to allow it to drop by during that time. That will get you a starting point. Next you want to be sure that the effective series resistance of the caps is low enough so that you don't suffer an unacceptable voltage drop during the peak draw period due to that. The good news here is that, up to a point, you can reduce the resistance by using multiple smaller capacitors in parallel.
 

BR-549

Joined Sep 22, 2013
4,928
Maybe a different strategy.....all though I don't know what your motor is doing.

Is it possible to slow start the motor?
 

Thread Starter

PeregrineSpur

Joined May 22, 2018
6
Ok some feedback.

I have a .47F cap in place between the power source and the pcb with a diode restricting power from the capacitor back to the motor. The issue I am having is the cap is not charging up to the 5 V through the diode, only gets to around 3.3 V. Any ideas?
 

ebp

Joined Feb 8, 2018
2,332
An important issue is the minimum voltage your circuit requires before it loses its brainz. If the nominal supply is 5 volts, you are already at a disadvantage with three C cells (carbon-zinc or "alkaline").

You can improve on the schottky diode in crutschow's circuit with an "ideal diode" controller such as those from Linear Tech, though they are rather expensive. If your circuit board is a microcontroller and you have the resources, a P-channel MOSFET under program control might be usable: turn it off just before the motor starts and back on after the required delay.

Beware of older designs of "low dropout" three terminal regulators. The types with PNP pass transistors will draw a lot of current from the input supply if there isn't sufficient voltage to allow regulation. This makes for a rather nasty situation for battery power, since it can cause the transition from low battery to stone cold dead battery really quickly. Most newer regulator designs don't have this problem, but it is worth having a look at what might be on your circuit board.

If the motor has its own controller of some sort that is in turn controlled by your board, also beware of a possible problem due to protection diodes built into ICs. They can create "sneak paths" that could cause current from your carefully diode-isolated and capacitor-backed board to the supply for the motor. This not only discharges your cap faster, the current may be high enough to damage the protection diode(s).
 

Thread Starter

PeregrineSpur

Joined May 22, 2018
6
Thanks to all of you for your comments. I have managed to come up with a solution that works by taking parts of all the info provided!

The whole circuit is supplied by 3 c cell batteries providing total of 4.5 V. The circuit controlling the motor runs directly off the batteries.
The micro controller monitoring the motor requires 3.3 V and uses 40 mA when idle and 120 mA when transmitting data.
Solution.
1.Programatically defer communication while the motor is running to avoid the 120 mA spike and there is insufficient current.
2.To provide the 40 mA while the motor is starting, I have put 2 x 0.47 F 5 V capacitors in parallel separated from the main circuit by a diode. The diode and capacitors provide enough voltage drop to bring the voltage in operating range for the micro controller eliminating the need for a regulator. (My reckoning is that I will always start with 4.5v and it will deplete from there onwards. There won't be any spikes above 4.5 V like you could get from power supplies.)

In testing all works fine.
Thanks again. comments welcome
 

danadak

Joined Mar 10, 2018
4,057
You also have to derate C due to Temp if using electrolytic.

Then you have the problem of charging rapidly to handle recurring
brownouts.

Regards, Dana.
 
Top