USB power
USB seems to be a subject of great interest among embedded developers. I recently delivered a couple of Web seminars on the topic and had a very good sized audience and lots of questions. If you attended, thanks for coming along. If you were not there, but are interested, you can find a recording here. Please email me if you would like a copy of the slides. There was a very wide range of questions, but a few common themes became apparent. USB 3 seems to be sparking a lot of interest and there is certainly a demand for a more detailed, specific session and we will do one in the coming months.
Another topic that seemed to stir interest and queries is power delivery over USB …
As a user of numerous electronic devices, I really like the ability that many have to get their power from the USB connection. When I want to use my scanner, I just plop it on my desk, plug in the USB and I am ready to go. As a user, I am completely insulated from the details of what is happening [as is generally the case with USB]. It just works. However, the embedded developer may need to know a bit more.
With USB 2, a device can be defined as “low power” or “high power”; this implies a limitation of 100mA and 500mA respectively. Although a host will be able to supply enough current for a high power device, a hub may not necessarily have that capacity. When a USB device is connected to a host, the enumeration process is performed, which provides the host with a selection of information about the device, including its power requirements. If insufficient power is available, the device is informed and the host may inform the user [if the host is a PC, for example]. This raises an interesting question: what if there is insufficient power for the device to operate and participate in the enumeration process? The answer is simple: this should not occur, as it is a requirement [of the USB specification] that a device be able to perform the most basic USB communications using [only] low power.
USB 3 provides increased device power: 150mA and 900mA for low and high power respectively. This is only available to devices that utilize the increased speed capability of USB 3 – SuperSpeed. Again, an interesting question arises: what are the power implications if you plug a USB 3 device into a USB 2 host/hub. The answer is that the enumeration process will reveal whether the device needs more power than USB 2 can provide; this error condition can be handled in a controlled way. Interestingly, as I mentioned before, a device must be able to participate in enumeration at low power, but what has only recently become clear to me is that this means “USB 2 low power” – i.e. no more than 100mA, not the USB 3 level of 150mA. Otherwise, backwards compatibility would be compromised and a USB 3 device might fail totally when connected to a USB 2 hub.