# Correct way to measure circuit power consumption before or after LDO

I have created a low power MCU project, and I want to measure the power consumption. I am confused with:

a) the correct way to place the ammeter, before (picture A) or after (picture B) my voltage regulator (LDO)? I measure the same current, which is strange, as the voltage is slightly different.

b) which option is in general the correct? If I place the ammeter BEFORE LDO, the battery voltage will vary, so I will have to measure both current AND voltage in order to measure Power. If I place the ammeter AFTER LDO, i will have to just measure current, as the voltage is stable (3.3V).

c) is it better to present Watts or Amperes in such projects in order to demonstrate the power management? I have seen both used..

## 2 Answers

The answer really depends upon whether you are trying to measure -- the circuit called "the rest of the circuit" or the circuit including your regulator.

The currents on either side of the regulator are nearly identical. However, the regulated current should be very slightly less. The current from the battery gets split into two parts. One goes to "the rest of the circuit", and the other part, very small, goes from the regulator directly to ground. This is current that the regulator needs to operate properly.

• this is where I'm confused: power = voltage * current I understand that it should be: power = unregulated_voltage * current_before_LDO = (regulated_voltage * current_aftrer_ldo) + (unregulated_voltage * ldo_operational_current) If the previous formula is correct, I assume that higher input unregulated_voltage (~4.0V of the battery) means LOWER current_before_LDO..but you say that the regulated current should be slightly less instead..why? Commented Dec 20, 2020 at 20:53
• Your understanding is incorrect. There's another loss term with a (linear) LDO, the theoretical power loss is (Vin-Vout)*Iout. That's the theoretical minimum power that the LDO has to dissipate (throw away to the environment). Switching regulators are different from LDOs. So if your current is 100mA and the input voltage is 10V and the output 5V, the very best an LDO can do is to throw away (10V-5V)*0.1A = 0.5W ( and it will get warm or very hot doing that, depending on the size of the package). So the best possible case is input 1W, regulated power 0.5W, used up in the regulator 0.5W. Commented Dec 20, 2020 at 21:35
• @uzer123. In a linear regulator, the current that enters Vin is divided into two parts. One part leaves Vout, and the other part leaves the "ground" or "adjust" or "control" pin. Leaving aside the much smaller current through the ground/adj/cntrl pin, the linear regulator lowers the voltage between Vin and Vout through resistance. A variable resistance to be sure (i.e. a transistor), but a power consuming resistance nevertheless. The power consumed by that resistance is (Vin - Vout)Iout. Commented Dec 20, 2020 at 23:01
• @SpehroPefhany yes, i understand what your saying: total_power = ldo_waste + my_circuit_power, but i dont understand why input current is higher than output current (did you read my comment under your first comment?) @MathKeepsMeBusy so, you are saying that even higher Vin voltage, the current BEFORE ldo is higher also, because a part of it goes to ldo like: Iinput = Ioutput + Ildo_to_gnd Commented Dec 23, 2020 at 2:09
• Yes. "Iinput = Ioutput + Ildo_to_gnd". Does that give you difficulty? Commented Dec 23, 2020 at 2:23

It really depends on what you want to measure. If you want to measure the circuit minus the LDO (which you presumably have some control over) then you can put it after the regulator. If the regulator draws significant current that can help separate the two.

If you want to measure the total draw (for example, to calculate the battery lifetime) then you would want to put it ahead of the regulator.

Since the current measurement will affect the voltage a bit, there may be some advantage in accuracy to put it ahead of the regulator.

Since you have a linear regulator, to a first approximation the total current into the regulator will be the quiescent current of the regulator plus the output current. Some regulators have Iq in the uA range so the two currents will be almost the same in many cases. Some regulators (particularly older bipolar types) may draw additional current that is related to the output current and possibly related to the proximity to drop-out. Usually that's not the case for CMOS regulators.

• I want to measure total power consumption and make an approximate calculation of how much time my Li-ion can hold it (btw:does Li-ion_mAh / my_measued_total_mA works? or I should use the mAh that my battery will be at a usable Voltage(=3.3V+Vldo_dropout)?) My datasheet doesn't have quiescent current maybe because it has an on/off pin, so instead I use the current_cons_during_operation which is very low (<0.1mA). so, my LDO consumption ~ 4.0V * 0.1mA = 4.0V * 0.0001A = 0.4mW which is almost zero compared to the rest circuit.. But how cur_before_ldo > cur_after_ldo when Vunreg>Vreg? Commented Dec 20, 2020 at 20:55
• @uzer123 Your battery will use the amount of current that your "rest of the circuit" uses, plus a little more, i.e. the amount that flows from the ground/adjust/control pin of the LDO to ground. Commented Dec 23, 2020 at 2:34