Hi~ i have little problem with USB devices (ex:Bluetooth or USB disk). If i want to know the power consumption of USB devices using C# or C/C++ API, is't possible?? Please give me some guide or advice.
I think you are out of luck.
You might be able to catch an OS level exception if the thing over-draws, but I don't think current is reported.
If you need it to test stuff, I'd recommend getting a good volt ohm meter and a short USB A male-female cable. Splice a milli Ohm high precision resister inline with the power wire in the cable and measure the voltage drop across the resister to get the current.
You may be able to get a VOM with a serial output (or even USB) and use it to read the current back into a computer.
Seriously, a volt-ohm meter? My thinking is if Windows is able to display the power requirements of an attached USB device, there must be a way to do it in C#/C++. Anyone?
20 Jun '12 - 16:21
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)