Windows software to show computer's energy usage or battery discharge rate

4

2

Is there any software for Windows 7 which can show a computer's energy usage in real-time? I am currently using Battery Bar, which gives an estimated discharge rate, but this is essentially an average of the decrease in battery power over a given time period, and is not instantaneous - it seems to respond very slowly to changes. I would like something which shows me how many watts the computer is using at any given time. Furthermore, battery bar doesn't work for desktop computers, and I would like to be able to gauge system energy usage for desktops as well.

If the software can also log power usage over time, that would be even better.

nhinkle

Posted 2011-05-12T23:28:05.833

Reputation: 35 057

1Hm. Not sure if this is actually possible through software. If you don't find a solution, you could always go buy a Kill A Watt. – Hello71 – 2011-10-19T00:44:41.960

Answers

3

At last, I have found a solution! Microsoft has a free Research Labs program called Joulemeter which estimates power usage of the overall system and various components:

Joulemeter is a software tool that estimates the power consumption of your computer. It tracks computer resources, such as CPU utilization and screen brightness, and estimates power usage.

On laptops it uses internal power-measuring circuitry which I presume is present in most computers. For desktop computers, it can make estimates or use an external power measuring device to calibrate itself.

Unfortunately, I ran into some errors with the automatic calibration on my laptop (possibly related to the fact that HP batteries don't provide as much battery usage data as other laptops do), but was able to calibrate it manually.

screenshot of joulemeter

I just found this and haven't had much time to play with it yet, but it looks like it'll do the job!

nhinkle

Posted 2011-05-12T23:28:05.833

Reputation: 35 057

2

Code (in C):

#include <stdio.h>
#include <windows.h>
#include <powrprof.h>
#pragma comment(lib, "powrprof.lib")

int main(void)
{
    SYSTEM_BATTERY_STATE sbs = {0};
    CallNtPowerInformation(SystemBatteryState, NULL, 0, &sbs, sizeof(sbs));
    printf("Charge rate: %.1f W\n", (int)sbs.Rate / 1000.0);
    return 0;
}

Executable (base64; 1 KiB):

TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABX6uPGE4uNlROLjZUTi42V0ISClRKLjZ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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

which can be decoded with online tools, e.g. this one.

Output:

Charge rate: -18.0 W

Of course, it's only querying the battery for the information, so its accuracy is entirely dependent on the battery's. :)

user541686

Posted 2011-05-12T23:28:05.833

Reputation: 21 330

Could you provide a quick reference on how to change that base64 into an exe? – nhinkle – 2011-11-29T05:20:26.670

@nhinkle: Of course! Added it. – user541686 – 2011-11-29T05:21:55.093

Dang. It just returns Charge rate: 0.0 W for me... told you my battery circuitry is crap. Nifty little tool though; thanks for sharing! – nhinkle – 2011-11-29T05:30:13.683

@nhinkle: Aww darn. :( Sometimes it gives better info if you wait a little, idk. Yup, hopefully someone else will be able to use it. :) – user541686 – 2011-11-29T05:33:33.840

1

Now looking at the Battery Bar Features Page, it appears to give you capacity. You could try seeing how many mWh it goes down by each second or minute, and just do a little math.

Simon Sheehan

Posted 2011-05-12T23:28:05.833

Reputation: 8 641

I can do this, and it sort of works, but I'd much prefer something with a live read-out. Battery Bar already does essentially this, but the problem is, it doesn't update very quickly. – nhinkle – 2011-05-12T23:54:32.133

I do not have it installed currently, but are there any settings to increase the update time? – Simon Sheehan – 2011-05-13T00:04:10.933

possibly in the Pro version, but the Free version is not configurable in any way. – nhinkle – 2011-05-13T00:05:29.823

1

I use BatteryCare and recommend because it has more features than BatteryBar (that I used before) for free.

It also shows ballon popups when charging and discharging, numeric info in notification area when discharging and some more info accessing them from its menu on tray.

Try that ;)

kokbira

Posted 2011-05-12T23:28:05.833

Reputation: 4 883