Question: How do I calculate the size of a filter capacitor to reduce the ripple when I have a microcontroller on the same regulated power supply as a high current load like a motor?

[![enter image description here](https://i.stack.imgur.com/xHeuw.jpg)](https://i.stack.imgur.com/xHeuw.jpg)

**My parameters:**  

Motor: DC 5V; 0.82W; 180 mA (with PWM up to 200 mA)  

PWM with 70%-100% Duty Cycle  

Vdd = 5V = Vmax  

PWM: 20kHz

f = 1/20kHz = 50 μs  

All the searches I've done lead me to articles about filtering ripple on AC power supplies. However, I'm not trying to smooth ripple from a rectified AC supply. I'm trying to smooth out variations in an already regulated 5V supply as the load to the supply changes.

How do I calculate the rating of a filter capacitor to put on the 5V rail that feeds the microcontroller to smooth its input voltage as the load to the power supply changes? Maybe my calculations are correct?

Answer: 
Since this is homework, I'll rather "hint" you in the right direction to help you employ the right methods than solve it completely, I think you'll enjoy that more!

This gets doable if you start with your first schematic, and apply the Y-Delta transformation on the "inner" three R (those who connect to C). Afterwards, you will have two parallel triangles, and can d simplify the "double edges" individually.
Looking at your redrawn circuit, I can see that

* I5 and I9 are the same current, labelled twice.
* By symmetry, I3 = I4 = I5 = I8
* By symmetry, I6 = I7 = 0