Looking for a mature low cost circuit design for VBUS in dual role USB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Looking for a mature low cost circuit design for VBUS in dual role USB

3,059 Views
kai_liu
Senior Contributor I

The board I am working on has on board USB OTG port (KL25Z). Actually it is dual role, 'cause I haven't implemented OTG protocol yet. The VBUS design bothers me a lot.

KLQRUSB_DualRole.PNG.png

Above is recommended from FSL application note.

Here is some snapshots of my schematics.

SCH_VBUS.PNG.png

Fig 1: USB Port

SCH_LDO.PNG.png

Fig 2: Power Supply

SCH_LD_SW.PNG.png

Fig 3: Load Switch

In USB dual role design, we have two power source, Vin (5V) and VBUS (5V). These sources are ORed by diodes to LDO to offer 3.3V Vcc.

When in USB device mode, VBUS offers 5V, via diode, to LDO, generates 3.3V.

When in USB host mode (loaded with host firmware), Vin offers 5V, via diode, to LDO, generates 3.3V. VBUS output is controlled by a load switch SP619.

The VBUS will be switched on in host mode only if ID-pin is grounded. However what happens if an abnormal cable (terrible connector with internal short-circuit ID-pin to GND) is used between external host to this board? VBUS and Vin have contention here. SP619 has 0.377Ohm Rds, so even 0.1V gap between VBUS/Vin will generate 265mA current. Yes, the situation is abnormal and doesn't appear too often, but we must prevent it.

I add two sense networks on VIN/VBUS. That makes things more complex since it involves firmware interaction.

  1. If firmware senses VBUS during SP619 switch off, then external host is judged, the firmware will not switch on SP619 anyway.
  2. If firmware doesn't sense VBUS during SP619 switch off, and ID-pin is grounded, the firmware will switch on SP619 to offer VBUS to external device.
  3. If firmware doesn't sense VBUS during SP619 switching off, and ID-pin is floating (it is normal situation in standard A device like USB memory stick), the firmware can not detect any activities. The user has to manually switch on, alternatively, the firmware can regularly switch on SP619 as a trial. (What a terrible user experience! Some marketing guy can say that is a selling point for saving power. But ......)

Is there a better and mature circuit for USB dual role? Actually I referred circuit design from IOIO(microchip), Arduino Due(Atmel). The first one also implements a user button to enforce VBUS. The latter one uses an external comparator and two NMOS circuit.

Tags (2)
0 Kudos
4 Replies

402 Views
Paul_Tian
NXP Employee
NXP Employee

Hi, Liu Kai

Attached picture is our board schematic for your reference.

USB OTG.bmp

Hope it is helpful for you.

Best Regards

Paul

402 Views
kai_liu
Senior Contributor I

Thanks Zhe Tian,

A diagram explains a lot. I will go thourgh this. If I have any further questions, I will ask later.

0 Kudos

402 Views
Paul_Tian
NXP Employee
NXP Employee

Hi, Liu Kai

No problem. How about your issue process? Is it work well?

Best Regards

Paul

0 Kudos

402 Views
kai_liu
Senior Contributor I

Hello, Zhe Tian,

Thanks for your time for pasting your schematics. Really appreciated. I have downloaded datasheets for SMSC USB3300 and MIC2026. I found actually we share some design with different parts. Let us discuss on your schematics.

SMSC USB3300:

  • CPEN, output to EXT_PWR_EN (active high)
  • VBUS, io as comp input or output in SRP
  • ID, input, 0 for Dev A, 1 for Dev B (ID-pin)
  • EXTBUS, input as external VBUS indicator

MIC2026:

  • INA, connects to EXT_PWR_EN, aka CPEN in USB3300
  • OUTA, connects to VBUS_SMSC

USB Micro A/B:

  • VUSB_5V connects L/R to USB_SMSC_VBUS (VBUS on USB3300)
  • VUSB_5V conencts L to VBUS_SMSC

Operations:

Device only mode:

VUSB_5V -> L509 -> VUSB_SMSC -> VUSB_OTG_SR -> D3 -> 1117 -> VCC3V3

OTG mode:

Device A/B mode:

CPEN -> EXT_PWR_EN -> (ENA) MIC2126

VCC5V -> VUSB_SMSC -> L509 -> VUSB_5V (maybe LM1117)

CPEN is controlled under DrvVbus/DrvVbusExternal by firmware.

EXTVBUS is flag from external vbus switch.

The situation I am worried about is:

If external host connects to our board with a short-circuit cable, (ID pin is grounded), then firmware will read the ID-pin in wrong state, and switch the MIC2126 via CPEN. VBUS from MIC2126 will conflict with VBUS from external host.

Some hardware guy tell me that rarely happens, and if we use serial topology LDO, that is all right.

So far, I haven't find any hardware protection method, so I can only state it clearly in my user manual.

0 Kudos