How do I go about measuring real current consumption of a circuit?
If I just sample the current shunt, I will miss some spikes... I'd probably need ridiculously high sample rates...
I was thinking, could I somehow run the current sensed thru an integrator and sample that at regular intervals?
Like, measure the real amount charge that has passed thru the circuit, sample that at regular intervals and get the real average current by dividing the charge by the time span instead of averaging the samples of immediate current?
Maybe two integrators so I can do double buffering and not miss part of the waveform.
Like, have two caps each charged with a current that is proportional to the current consumed by the measured device and tracks it very fast.
I could then sample one of the caps then discharge it, and next time sample then discharge the other cap... and so on
Similarly I'd have to integrate the voltage over the same period to be able to calculate power...
Could this work?