# Reservoir Capacitor Sizing

Hello,

I'm designing a circuit using a 328p.
I've specified already the .01uF decoupling capacitors on the Vcc and GND pairs for the device.

I had someone knowledgeable in electronics recommend an added reservoir capacitor for the circuit.
I'm aware that the decoupling caps and the reservoir cap essentially provide voltage smoothing.

I'm operating at 5V, and the total current draw on the 5V line is going to be about 50 mA.

I've looked at the following website and tried their calculator, but I'm unsure about how long the charge time would be.

I'm looking for guidance on helping to size the reservoir capacitor I've mentioned.

Question: are you using a "bare" 328p or a board like the Pro mini?

If you are using a "bare" 328p and are asking such a question you might be in over your head, there are other factors and considerations when using a processor.

That being said, it depends what you expect from the "reservoir" capacitor.

If you're are only trying to bridge some "glitches" in the power then a 10 µF capacitor would be fine. However depending on you space limitations adding more capacitance can't hurt say up to 100 µF or anything in between.

This is not normally a value that is calculated but more from experience, however if you were to calculate the "minimum" value the equation you would use is:

I = C dv/dt

Where I = current draw in amps
dv is the acceptable drop in voltage (say for a 328P running a 5V, the voltage can drop to 1.8V by Atmel spec.)
dt is the duration of time of the loss in power (i.e. the time the capacitor has to take over).

caveat: If you have other devices on the same circuit their current must be taken into account as well.

Just FYI - Capacitors make lousy “batteries” because the [u]discharge curve[/u] drops rapidly at first and then levels-off after it’s already lost most of it’s charge. That’s the OPPOSITE of an “ideal battery”. An ideal battery would be like a gas tank where you get full-power until the power runs-out. Real batteries aren’t perfect but they have better discharge curves than capacitors.

I’m not saying you shouldn’t us a capacitor for this but be aware of the characteristics/limitations and you might need to use a bigger (higher uF value) than you think.

I've specified already the .01uF decoupling capacitors on the Vcc and GND pairs for the device.

It is normal to use a 0.1uF ceramic capacitor.

http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

As a rough guide for smoothing , etc, the time ( Sec) for the voltage across a capacitor to drop to 1/3 of its value =RC.
R in ohm

The equivalent “R” of your circuit being the supply voltage/current taken.

masonp:
I'm operating at 5V, and the total current draw on the 5V line is going to be about 50 mA.

1. Where is that 5V coming from?

2. What surges or peaks are you expecting for your circuit's power consumption?

masonp:
I'm operating at 5V, and the total current draw on the 5V line is going to be about 50 mA.

Supply decoupling/bypassing isn't an exact science. What other circuitry do you have connected to the 5V supply?

Is the 5V coming from USB or the jack for Vin?

hammy:
As a rough guide for smoothing , etc, the time ( Sec) for the voltage across a capacitor to drop by 1/3 =RC.
R in ohm

The equivalent “R” of your circuit being the supply voltage/current taken.

That should be to drop TO 1/3 - charging or discharging for a period of 1x RC is about 70% of capacity.

masonp:
I've looked at the following website and tried their calculator, but I'm unsure about how long the charge time would be.
https://electronicbase.net/smoothing-capacitor-calculator/

Smoothing capacitors are needed only for unregulated transformer/rectifier power supplies. Unless you are
building a mains transformer based PSU, you can ignore smoothing.

Most modern supplies do the work for you and provide a pre-regulated DC supply. Only decoupling is needed.
The more current loads you are switching the more important bulk-decoupling will be. 0.1µF is typically enough
per package for just logic. If you were switching 100mA of LEDs as well though, 100µF or more electrolytic
capacitance would be useful.

With heavier switching loads like motors its best to use an entirely separate supply to keep glitches off the logic
supply - and more decoupling, such as 1mF (usually described as 1000µF for historical reasons).

It also depends what you are doing. I.e. if you need to measure small voltages you need much better decoupling than simple LED blinking.

Here is what happens without large capacitor decoupling, driving a stepping motor.

The ceramic capacitor takes too much current and burns.

Corrected my post thx