TransWikia.com

USB 2.0 0.9A and Data (hub) Simultaneously

Electrical Engineering Asked on January 27, 2021

Trying to combine USB hub and higher-than-default USB charging currents.

My experience with implementing USB is close to zero, although I usually have no problems with datasheets and other designs I could copy (understand and re-implement, sometimes modify). Add to that extremely confusing charging standards like power delivery, bc-thing, and you have me staring at the wall.

I’m currently developing a device that consumes 5V/500ma max under operation (typical ~400ma), and my prototype has 2 USB 2.0 ports (type-c physically), through which I program two different parts of the device – a microcontroller and a Nextion display. I use 2 identical circuits with CP2102N USB-UART, and it seems to be working fine, I can program each of them using only USB cable from PC without external programmers or anything, which is very comfortable (although I have to use a button to connect display’s UART to either MCU or CP2102N, will have to come up with the solution for it too). I only have to insert the USB cable into a different port every time I need to program different part of the device. Obviously, 2.0 USB port from PC provides enough power to supply the device itself, but charging the device while it’s on will be unbearably slow (if it can be called charging at all). We’ll get to this later.

To make it clear: I have a prototype PCB, and its power system part requires some work, rest of it is done/requires no attention atm.

So, right now I’m close to done in terms of main functions of the device (all hardware works as intended, all SPI/I2C working as intended, software works as intended whatever part of it is finished – and that’s most of it), I only have power and programming system to implement. I would prefer to leave only 1 USB port, which is supposed to combine programming port for both internal parts AND charging port.

Splitting the USB 2.0 port in two doesn’t seem difficult. I’ll put in a USB hub IC, split the USB in two parts and have CP2102N for each of them, I examined some real life circuit schematics and datasheets. Basically, it would be same as now, just with 1 USB port rather than two. A note: I want the end user to be able to update software on the device without opening it, so it has to be all plug and play, no internal switches or anything (maybe will make an external one, it’s all up to discussion, but no opening up)

Anyway, splitting USB 2.0 isn’t all that hard, there’re plenty of examples, ICs and other materials. The problem comes with charging. Or, rather, combining the two.

I want to guarantee the device would pull at least 0.9A from any charger or USB port (except standard 500ma ports of course). For that purpose, one must manipulate the D+ and D-. Which means I can have EITHER a hub OR power. The device is expected to be charged from standard phone or tablet power bricks with USB-A ports OR USB Type-C chargers (reminder: I use only USB 2.0 pins, but if I should change it, let me know)

I have read a lot of materials, datasheets and some articles on the topic, I’m plain not ready to process the entire power delivery or USB 3.0 spec (although I did read about them and the datasheets of the chips that work with them). USB and Charging are terribly confusing with USB-PD and BC standards of all sorts. How do I even make the thing work no matter what’s plugged into it (as long as it suppoorts 0.9A+).

The exact questions are:

1. How can I guarantee that any power source would provide more than minimum 500ma, while allowing me to have an internal USB hub (or at least just data transfer)? That includes USB-A wall chargers (typically 1A and above), USB-C chargers/ports and USB 3.0 ports. I can’t connect D+ and D- to two different chips at the same time, obviously, and extensive search on mouser returned no chips that combine USB 2.0 hub and power negotiator (but I could miss something for the lack of experience with USB)

2. Should I use more Type-C pins (implement PD)? I would prefer to not implement power delivery, feels like overkill, but if there’s no choice, I’ll have to, of course.

3. Should I protect my Type-C port(s) from 20V in addition to ESD diodes?

4. Don’t know if it matters, but if it does, the system will have a 3.7V li-ion, capacity to be determined, at least 2000mah (1×18650 minimum, probably more, maybe another form-factor)

5. I AM considering an idea to multiplex UART, but then while programming the display, the DTR pin will reset the MCU (tbh in my specific case I may be ok with it). Will have to think about it. Still, interested in the original question.

Of course, if I have to change my requirements or principle of operation of some parts, I’ll do that, no problem. Just want to hear some expert opinions, see a few useful links, if possible.

Pardon me, if I left some important info you would need out, feel free to ask anything.

P.S. if anyone can be like "hey, there’s an awesome chip that does what you want, here’s a link to mouser or digikey", it would be absolutely awesome

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP