How to one model a microcontroller’s power consumption

microcontrollermodelingpower supply

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):

  1. I know from testing that the average current into V+ of the microcontroller is 20 mA
  2. My source voltage is 3.4v
  3. Therefore, my simulated load should be \$3.4v/20mA\$ or \$170 \Omega\$

Does this approach work? If not, what is a better approach?

Best Answer

if the supply voltage is fixed you could use use a 20mA current sink, if it's variable the resistor is probably a better model.