Capacitors for Power Supplies
Capacitors are generally added to your power supply to smooth voltage drops / spikes. A common question when building a hobby electronics project is “how big of a capacitor should I use?”
If you’re like me and deal a lot with the raspberry pi, you are probably using 3.3v / 5v electronics and buying 5v power supplies with varying amperage. If that’s the case, a good rule of thumb I learned is that your capacitor should be roughly twice the voltage of your power supply. So for a 5v power supply you generally want 10v capacitors.
As far as how much capacitance, I’ve seen ~3000-5000uF be the common choice for small 5v projects. Obviously more capacitance makes your power smoother which explains such large capacitors. I’m not sure what the upper or lower bounds are for what you need exactly but since I work with 5v electronics I’ll probably stick to buying capacitors like this one.
Another note: the shorter side of the capacitor is negative and the longer side is positive. Connect the short (negative) side to ground (black), and positive to the hot wire (red).