I have a microcontroller project that has a few electrically moving parts including lots of sensors and power hungry WIFI modules and such. I want to get an accurate power use profile of the device that I can use to systematically reduce the device's power usage with the aim to hopefully get it working on batteries. To be able to do this, I need to be able to measure how effective each change I make to the device's code and electronics to compare to previous states of the system. This means I need to take a power snapshot of the device over a certain time window that is at least as large as a complete cyclic repetition of its power cycle. (This just happens to be 1 minute at the moment, each time the WIFI triggers)
I immediately realised that a DMM is no good for this so I used my DSO in roll mode to measure voltage (and by way of a dodgy 1 ohm current shunt resistor) and current over time. Using the DSO's built in maths function I multiplied the two two give me power over time.
Well.. It's not good enough for the following reasons:
1) On my DSO (Rigol DS1054) the maths function only works with data shown on-screen. This is not nearly accurate enough on either axis. On the Y axis there's just simply not enough bits of data and the output is quite quantised even when I use as much of the display as possible. The problem is even worse on the X axis (time) as data will fall off the end of the screen if the roll speed is too fast and sub-pixel data will not be registered if it's too slow. There's no good happy compromise between the two either, not without massive errors anyway.
2) Even if it did work well, the data is power over time and I really want *average* power over time for a certain time window.. Say 10 minutes, 1 minute, 1 hour, whatever I choose. Currently the repeating cyclical phases is about 1 minute but that might change.
How can I proceed with this on a budget?
(Just an FYI.. we are talking about current draws that are (very roughly) 0ma, 25ma, 75ma and spikes of 300mA)
I've attached an image of my crude attempts with my DSO