Measuring power consumption of a design ranging uW to tenths of mW
An important question you need to ask yourself is: Do I want the solution to be included in my board design/electronics and stored in my micro-controller?

The solutions given by Kamil are quite universally applicable for any electronic design, and may be reused for other projects, which may make an initial investment in time and money a threshold, but you can "write it off" over many projects.

If you want to include the measurements in your own system for indefinite measurements and logging you will need to make some good decisions about the power-cycle.

First: Your micro-controller will never be using that much current: Ah! Create a measurement path that monitors all the low-current devices and one that monitors the high-current devices. I am, after all, assuming that you will actively shut down the high-power electronics with very, very low leakage.

If you can do that, reliably make the high-current path go down to absolutely negligible current, you can add a second part of intelligence, powered before the current measurements of course, which monitors all the other device's consumption. As your main controller cannot measure in deep sleep, as the ADC will not be running and if it is that will be 90% or more of your entire consumption.

Then you just need to be able to turn on or off the current measurement device with the main controller to do measurements over given time periods, while allowing minimum sleep-current over the remaining time spans.



Alternatively it has to be said, that 24bit accuracy ADCs at low frequency and low unity-gain, but also high precision amplification need not be costing you gold, so a complete curve can be ascertained if you want to, at such rates as 1kSps it may even be affordable, allowing an audio-frequency (>36kSps, &lt;112kSps) ADC to settle and convert over a long period.