Microcontroller based devices can wake up do something for a few tens of microseconds and go back to sleep mode for seconds or minutes to save power. Measuring this type of current consumption pattern is very hard as multimeter do not typically do not sample more than a few times per second while typical oscilloscopes can sample at very rapid rates do not usually have more than 6-7 bit of resolution nor have long sampling time.
The following screen cap is from Silabs Energy Profiling tool in Simplicity Studio. It is used as an example of what the current of such a device may look like.
The idea is to be able to sample at very high speed to capture fine details of short duration current spikes. The current is averaged for that sampling period and stored on the SPI FLASH. This averaging allows for high sampling rate and yet cut down on the amount of data and the data rate to be recorded. There is always a limit on storage capacity and write data rate.
Here is a block diagram of what I have in mind. The device operates on battery and can data log DC current consumption of low power devices over a long period of time. I am also trying to limit the cost of BOM to $10 U.S. to make it an affordable DIY hacker's tool.
The current of the device under test is sampled by a series resistor. The resistor value is kept small to minimize the effects of the voltage drop. The voltage drop across the resistor is fed to two amplifier circuits with different gains for different current ranges and sampled by with the on chip 12-bit ADC with (up-to) 1M samples/sec. The ADC data is DMA into a circular buffer in the ARM's internal RAM.
The two ranges allows for higher dynamic range for the measurement. e.g. 200mA and 200uA full scale ranges could be used to measure the active and sleep mode power consumptions. The firmware can sample the two channels at the same time and decide afterwards which range should be used for the calculating the average for that duration.
An average of the current is computed by the ARM core and store in a buffer to be written into SPI FLASH using DMA. Data captured can be display on the LCD as an average downloaded to a PC. The connection to the PC is isolated to prevent possible ground current loop between the device under test and the PC.