Electronic – USB OTG, some questions

usbusb-otg

I am attempting a project with USB OTG functionality. I've read quite a number of documents already but there is some contradicting information out there, so I want to find out if anyone can shed some light on a couple of things.

First some background on what I aim to achieve. I want to design a low cost device that needs some form of diagnostics interface. At the moment the idea is to have a microAB USB port which can be used to either connect to a PC, or to a custom bluetooth module(powered by the device) to connect to a smartphone for instance, the device acting as the OTG host in the latter case.

My questions are:

Is this the right type of application for USB OTG?

What is the maximum amount of current a OTG host may supply, and/or a OTG peripheral may consume? I've read a couple of places that this is only 8mA, but the USB OTG supplement to the USB2.0 spec states 8mA to 5000mA. I am more inclined to believe this spec, but I just want to make sure I am not misunderstanding something.

Lastly, can any USB pheripheral only device be connected to a OTG host provided that the driver is available, or do I need a OTG specific device.

Best Answer

The situation you're describing is not true OTG. True OTG is when you connect two OTG devices together and they negotiate which one becomes the host. But OTG controllers do allow switching between host and device modes at run-time, so you're on the right track. An OTG host will work normally with non-OTG devices.

8mA is the minimum current that an OTG host must support on VBus. I don't see 5000 mA in the OTG spec tables. Are you sure you're not looking at battery charging? Regardless, you should check the specs for the Bluetooth device to see what current it needs, then design to meet that.