I was checking out this EE.SE question and thought I might play around with a similar idea on my own. I started to think about how I would model a power supply for a microcontroller with two possible sources (like a UPS for example), let's say a battery and some regulated supply like a USB connection. As soon as I began, I realized I do not know how to appropriately model a microcontroller in this way. It seems intuitive that I could use the following process (hypothetical problem below):
- I know from testing that the average current into V+ of the microcontroller is 20 mA
- My source voltage is 3.4v
- Therefore, my simulated load should be \$3.4v/20mA\$ or \$170 \Omega\$
Does this approach work? If not, what is a better approach?