Electronic – Measuring computer power usage

current measurementdataloggerpower

I am trying to optimize the power usage of a custom application (C#) running on an embedded computer (Intel i7, Windows 7). To do so, I am measuring the current that the system requires while running the application.

This current fluctuates; every second I get a different reading using a regular multimeter (Fluke 175). This makes me wonder about the accuracy of the reading.

1) If I would calculate the average of these readings, would this be a good indication of the power usage? Or would I miss high frequency peaks / dips in the current?

2) Could this be solved by taking multiple measurements per second using some sort of current sensor with a microcontroller and averaging the values?

3) If so, what would be a good rate to take measurements at; 10Hz? 1000Hz?

4) Could adding an RC-filter between the current sensor and the ADC of the microcontroller help in some way?

This is my first question on StackExchange, please let me know if I'm making any mistakes.

Edit:
The goal is to get a realistic power consumption estimation so we can improve and predict battery life.

Best Answer

If you are trying to calculate things like battery lifetime, then you want the average current or power, depending on how your power supply system works. If the voltage is constant, then simply averaging the current and multiplying this by the fixed voltage yields average power.

The problem you are running into is aliasing. Sampling every second does not give you a valid picture of the current since that current apparently has significant frequency components above 500 mHz. The solution is to either sample so fast that there is little content above half the sampling frequency, or low pass filter the result to remove the content above half the sampling frequency.

The latter is easier, and all you need if you just want to find "average" current consumption. Put a low pass filter between whatever is producing the current signal and where it is sampled.

For example, let's assume you are using a low-value current sense resistor and are measuring its voltage with your voltmeter that samples at 1 Hz. For example, two poles of R-C filtering at 100 mHz should help a lot. Each could be realized with a 10 kΩ resistor in series followed by a 160 µF cap across the signal. Try that and see if it gives you the right combination of not being too jumpy, but still responsive enough.