Is there a cheap/simple way I can empirically measure the total energy used by my project over a sample time of several minutes?
It's a microcontroller based system which repeatedly wakes up, does some work then sleeps. Typically it will be awake for < 10ms. Looking at the voltage drop across a 1Ω shunt resistor with an oscilloscope, I've measured the energy consumption of each work period by calculating the area under the curve. Using an ammeter I've found the quiescent current during sleep.
In theory, knowing the sleep period I could calculate an energy estimate. But, I'd like to test the system as a black-box without making assumptions about the firmware.
Is there a device or method for accurately measuring the total energy usage of a device over a long period? (preferably something cheap).


