# Power consumption of an idle USB keyboard

I have asked recently about the voltage of a PS/2 keyboard, now that was a too complex circuit for me, and a lot of weird things happened, for example if I disconnected the red wire after the adaptor, the current just flowed through the other cables. So it's pretty unrealiable to do measurements on that side.

So I am doing measurements before the adaptor, since the adaptor had active components, probably a Chip-On-Board (COB).

The circuit looks like this:

Power Supply-> Computer -> micro USB Cable -> USB-PS/2 Adaptor -> PS/2 Cable -> Keyboard

Now the wire before the adaptor is basically a micro-USB cable, that is connected to the computer. The micro-USB has a known protocol, and hopefully doing measurements on this side is more realiable.

https://en.wikipedia.org/wiki/USB

The wires:

• Red: Vbus +
• White: Data +
• Green: Data -
• Black: Ground -

(I don't know why though the polarity on my data wires are inversed, compared to Wikipedia's article)

So I have measured the following:

• Red(+)->Black(-) 5.25 V DC and 3.2mA DC = 0.0168 W

• White(+)->Green(-) 3.03 V DC and 0.16mA DC = 0.0004848 W

So the question is, how much is the power consumption of my keyboard, measured at the usb side of the cable (obviously less power will get to the keyboard since the adaptor has some resistance as well, but measuring from this side I believe is more accurate).

Do I need to add together the white-green consumption, or does the red-black already contains that.

So does my keyboard consume 0.0168 Watts or 0.0172848 Watts?

• "0.0168 W or 0.0172848 W" <-- you do realize this question is utterly meaningless? The difference is a mere 480 µW... So, maybe you'd really want to aks why exactly you care? It's obviously not for power efficiency reasons, because using an old PS/2 keyboard with an adapter definitely isn't the way to go when saving power (and I'm sure that was discussed under your other question), and the question really is what is so power-conscious that you'd care about 480 µW, but still need a full keyboard... – Marcus Müller Apr 9 '17 at 20:06
• @MarcusMüller I would like to know how to measure the watts. It's not about the difference, that may be meaningless, but knowing the methodology is what I am interested in. – user138887 Apr 9 '17 at 20:08
• @MarcusMüller, come on MM, we're providing answers not rewriting the question to suit yourself :-) How can you go all boldtext on a Sunday night - is there no rest or have you had a few pints and gone all feisty :-D – TonyM Apr 9 '17 at 20:12
• @TonyM the bold text is all inviting, and OP really answered my question in her/his comment, so I'm all set – and also, I really think the question in my comment needed answering, in order to give a good answer, because as you noticed, the difference here is whether you consider only the power consumption of the device, or also what the driver sinks into the receiver over the data lines :) – Marcus Müller Apr 9 '17 at 20:15
• @TonyM hope the time I spent on my answer convinces you I boldtext people on a Sunday evening only because I want to help :) – Marcus Müller Apr 9 '17 at 20:44

The USB device power consumption referred to in the USB spec' is strictly that on the VUSB/GND connections (5 V to GND). So the current consumption of the USB+/USB- signals is to be ignored.

In standby mode, a USB 2.x compliant device must drop to 500 uA and that's not enough to power the LEDs. So the keyboard can never enter the USB Idle state while remaining active.

• So basically it's 0.0168 Watts in my case? I have measured the amperes on the red wire, and the voltage between the red and black. – user138887 Apr 9 '17 at 19:58
• @user138887, I can only take your word for that. I imagine you're measuring that with the multimeter you have to hand, which the accuracy at low currents that it possesses. I personally think that if you use a scope across a resistor feeding a 5 V regulator, you'd see a series of small pulses as the keyboard scans the switches (3 ms intervals?) and responds to USB interrogations (1 ms intervals?). So the peak draw is slightly more than the average but nowt to get excited about. – TonyM Apr 9 '17 at 20:09
• Yes the multimeter has 0.1% error margin, but that is not my question. I was asking about my methodology. So you have answered that it's basically the red-black wires that matter. So I have measured 0.0168 Watts, as in 5.25 V DC between red and black, and 3.2mA DC in the red wire, somewhat less in the black one, but the black is the return path, so the red transports the current to the keyboard. So thats 0.0168 W. My question is is this methodology correct (regardless of the measurement accuracy)? – user138887 Apr 9 '17 at 20:15
• @user138887, yes it is. I was highlighting the existence of peak-idling currents as well as errors in the tools but not your reasons for doing it. I'm all for investigating and learning :-) – TonyM Apr 9 '17 at 20:22
• oh that's no problem. Thanks for answer. Marcus Müller above referred to something "the driver sinks into the receiver over the data lines", what is that exactly? – user138887 Apr 9 '17 at 20:28

I would like to know the entire power consumption of the keyboard.

The question here really is:

What do you want to know, exactly?

If you want to give a number for how much power the device itself consumes, then measuring the red wire's current will be sufficient, and accurate. (Your multimeter might still be too slow for the fast changing current consumption of digital devices, but let's assume that's not an issue here, and there's plenty of low-pass filtering by bypass caps on the keyboard's side; still when talking about such minor differences, you simply mustn't neglect the fact that power will change much faster than your multimeter allows you to observe).

The D+/D- wires are the data-carrying lines. These are half-duplex, which means, some times they're driven by the host computer, and some times, they are driven by the device. Let's first consider the computer->device times only, since the power used to transmit in the other direction needs to be taken from the power supply on the V+ wire, so you'd cover this power consumption already. You must make sure that you're not measuring while the device is transmitting, that would count things twice (for that, your measurement device would need to "understand" which device is currently "talking", and that would be a logic/bus analyzer, not a multimeter). More about your measurements below.

But what does "driven" mean, here?

It means that an IC (the "PHY", often integrated into a larger functional unit) changes the voltage on these lines. Since USB is based on voltage signals, not current flowing, in (superficial) theory, there's no energy flow from one side to the other.

In practice, you indeed do need energy to change the voltage on such a line – and that's really the effect of how signal transmission on lines works. The question here really becomes: Do you want to count the power spent on essentially sending a wave into a cable as a power consumption of your device, or not? That power is not consumed within the device, and how much power is sunk depends on how strongly your driver drives the line – there's quite some leeway here, so it wouldn't be fair to "put it on the tab"¹ of the receiving receiving end. On the other hand, the power is spent on communicating with the device.

So, now about your measurements on the D+/D- lines: there's something wrong with them. And I simply think your multimeter is the wrong measurement device for this.

D+/D- are differential lines, so that one should have (theoretically perfectly) one line should simply have the inverse voltage of the other line. Now, since power flow is a directive entity, even when driving, it's always going to be the case that, as current flows in oppsite directions on these two wires, the average current should be zero, especially since USB is designed to avoid the opposite.

So, while power goes into the active driver, you couldn't determine the power flow by looking at average current, squaring that and assuming some resistance. You need to calculate the instantaneous power, calculate the absolute value and average that.

Also, USB works at >1 MHz, and that's far above what any multimeter can measure (it wouldn't be called multimeter but "RF power analyzer", "oscilloscope", "network analyzer"..., depending on what exactly it does). So, whatever you're measuring with your multimeter on these lines is very likely simply not representative on what happens on the lines.

¹ just to keep within Tony M's pub scenario :)

• I have no way to measure this "instantaneous power", however I ask, in your opinion. Do you think this extra power will be much less than the Vcc power? Like 10x , 100x, 1000x less? How would you estimate this power consumption? Negligible or significant? – user138887 Apr 10 '17 at 12:48
• negligible, probably! You can look at it this way: around 50% of the "communication power" (let's call it that way) is covered by the Vcc consumption, anyway. The other 50% would be spent by the host, in any case, to periodically inquire any keyboard, no matter what kind, so that it really a) can't be that much and b) you wouldn't be unfair to other keyboards, as they'd cause the same power to be used. – Marcus Müller Apr 10 '17 at 13:16

First, you are measuring power consumption of TWO devices. One is the USB to PS/2 converter IC (a USB device), and the other is the connected PS/2 keyboard itself. Then, if you made your measurements when the whole thing was plugged into host receptacle and operated normally, then the correct answer is 0.0168 W per measurement on red wire. The measurement on D+/D- is immaterial.

The reason is that USB1.1 devices, when plugged into host port, have about 1.5k pull-up on either D+ (FS devices), or D- (LS devices as keyboards and normal mice), to internal power rail. This voltage is derived from from the same VBUS (red wire), and is terminated into input impedance of USB receptacle D+/D- pins. This impedance is about 15k each. Therefore, the red wire (VBUS) is split between two return paths, main return goes into Ground (black wire), and D+/D- interface goes into ground inside the host receptacle. The second current is therefore about 3.3V/15k = 220 uA. Even if D+/D- toggle, they toggle differentially, so the total current through the digital interface remains about the same, 200 uA. The actual interface consumption should be a bit more, since signal toggling involves switching transients, and transients dissipate extra power on parasitic impedances. Also, when host drives USB packets, the low part of pulses are driven with about 40 Ohms, not 15k. But this is the difference you should see when measuring the return current on black wire as compared to red wire current.

Therefore, the red wire gives you the total consumption, regardless of how the return is split between main ground and signal interface ground.

Please keep in mind that when measuring such relatively small currents, your DMM might have substantial voltage drop across its shunt, so the actual voltages might be distorted, and power calculations might incur some error.