Looking for a USB Type C - SPI (or serial) bridge - recommendations? - Page 1
Forum section: electronics / general

author: Unknown
author_rank: Unknown
timestamp: August 01, 2017, 09:48:24 pm
content: On my next board I'd like to implement a USB Type C interface (upstream facing; this will power the board and exchange data with a PC).I'm looking for suggestions re a single-chip bridge between SPI (or serial data) and USB Type C.By now thereoughtto be some on the market, but the best I've found so far are 2 chip solutions (one to do the USB C power thing, the other for USB data).Ideally, the part would simulate a serial port (COM1, COM2, etc.) on the PC side using standard drivers (no need for a custom host-side driver).Also, a small footprint and simple interface would be nice. (While I'm dreaming, an integrated Li+ charger circuit/battery monitor would be nice too.)Suggestions?

author: TiN
author_rank: Super Contributor
timestamp: August 01, 2017, 10:27:32 pm
content: FTDI USB2.0 to SPI bridge will do the job, no?

author: funkathustra
author_rank: Regular Contributor
timestamp: August 02, 2017, 12:24:57 am
content: What microcontroller are you using? Most MCU families include members with full-speed USB peripherals. This is probably easier to get working than a separate SPI chip, as you won't have to port anything to your platform specifically.On first read, it looks like you might be getting hung up on the USB-C part; USB-C is just a connector. As long as you only need USB 2.0-type stuff (5V, 500 mA max), you don't need to implement any of the PD mechanisms that USB-C introduces — and if you *do* need to implement that stuff, you'll need a USB-C PD controller chip; I like theFUSB302, since it's small enough to fit into existing designs.

author: amitchell
author_rank: Regular Contributor
timestamp: August 02, 2017, 04:18:37 am
content: The Cypress CCGX series may work for you, I have had good luck with the CCG3 series:http://www.cypress.com/file/222281/download

author: Unknown
author_rank: Unknown
timestamp: August 02, 2017, 01:10:34 pm
content: Thanks for the suggestions.Quote from: funkathustra on August 02, 2017, 12:24:57 amI didn't know that. I just want the reversible connector - 5V/500mA is fine.But my understanding was that you needed some extra stuff to implement the Type C connector.Can you point me at a reference re how to implement Type C with USB 2.0 without extra hardware (other than the connector itself)?

author: joshtyler
author_rank: Contributor
timestamp: August 02, 2017, 01:51:21 pm
content: The hard part is laying out the reversible connector, especially on a two layer board (Because you've got to wire up both of the D+ and D- pairs, and they need to criss-cross each other to make the connector reversible).Here'sa simple example of a board the Macrofab guys did. It's a 2 layer board of a USB C connector in USB 2.0 mode connected to an FTDI USB->UART bridge.There doesn't seem to be much documentation for it, but they talked about it in a couple of the earlier podcasts.

author: hermit
author_rank: Frequent Contributor
timestamp: August 02, 2017, 11:34:05 pm
content: Wasn't there a post recently that had a link to a TI recommendation? 4 mill traces.....

author: westfw
author_rank: Super Contributor
timestamp: August 03, 2017, 11:57:08 am
content: Pff. "I'd like to use a connector that's especially hard to solder and fragile, so that my customer can use more expensive and fragile cables, because they can't figure out 'right-side up' on the older and more robust connectors."

author: funkathustra
author_rank: Regular Contributor
timestamp: August 03, 2017, 05:37:58 pm
content: Quote from: joshtyler on August 02, 2017, 01:51:21 pmThis isn't a big deal for full-speed USB devices, where the stub lengths are pretty short.Quote from: joshtyler on August 02, 2017, 01:51:21 pmThis design is wrong, as it's missing the other USB pair — only one is wired. This will only work with legacy A-to-C cables, and probably won't work with USB 2.0-style USB C cables. On the device side, you need both pairs wired.By the way, it's ironic that it's a Macrofab design; I had them fab a design that had a USB-C connector on it, and the boards came back with the back row of pins disconnected (the connector hadn't been seated properly into the alignment holes before reflow). Consequently, the board only worked in one orientation, just like this design you presentedThis Microchip app noteis what I used a year or two back when I did my first USB-C project.Basically, to make a "normal" USB 2.0 device that uses a USB-C connector, connect the VBUS and GND pins together. Connect the D+ and D- pins together (respectively, of course). Use a separate 5k1 resistor shunted to ground on both the CC1 and CC2 pins. Do not connect CC1 and CC2 together to save a resistor; this is the whole mechanism down-stream-facing ports use to determine cable orientation.If you don't use the CC1 and CC2 resistors, your device will work fine with normal USB-A to C adapter cables (which have no mechanism of detecting cable orientation), but it won't work with true USB-C devices (like smartphones or computers).Anyway, I've got a design that's been tested and validated in four different USB-C and USB-A hosts, including dual-function hosts like smartphones.Here's my schematic:Here's my PCB layout:As you can see, not much to it!Quote from: westfw on August 03, 2017, 11:57:08 amUSB-C is, by far, the most rugged USB connector ever designed. It's got a massive amount of retention force, and can handle a lot of lateral force. Micro was a big step up from Mini, but it's no match for C. USB-A "feels" rugged (because it's big), but it's not rated for many insertions at all, so they wear out quickly. Plus, connectors get as rugged as you'd like -- many of them have thru-hole mounting legs. Also, I don't think they're any harder to solder than other "usual suspects" that end up on PCBs in 2017. 0.5mm QFNs, FFC connectors, etc. In fact, I don't think I've ever had a USB-C connector come out of the reflow with a solder short. Probably due to the long pins internally in the connector, wicking up extra solder.

author: joshtyler
author_rank: Contributor
timestamp: August 03, 2017, 06:33:49 pm
content: Quote from: funkathustra on August 03, 2017, 05:37:58 pmYes, I meant more from the point of view of not violating PCB design rules.It's okay for 4 layer+ designs, but harder for 2 layer designs. Not impossible, just harder than micro USB. I believe that the design I posted only just meets the Macrofab's "standard" 5/5thou trace/space design rules.QuoteThe schematic symbol they use only has one set of D+/D- pins, but both pairs are connected. Look at thelayout, A6 is connected to B6, and A7 is connected to B7.

author: westfw
author_rank: Super Contributor
timestamp: August 03, 2017, 07:05:43 pm
content: Quote>[complaints about fragility]USB-C is, by far, the most rugged USB connector ever designed ...connectors get as rugged as you'd like -- many of them have thru-hole mounting legs.Nice theories. I was very impressed with the lecture on micro-USB I received at a trade show. And then I had actual consumer experience with a couple devices where the connector was prone to shearing off the PCB, because no one seems to USE the robust connections with thru-hole legs. And a set of (cheap) micro USB and (no so cheap) lightning cables apparently prone to having the internal conductors break off of the connector contacts because the strain relief wasn't up to the way consumers actually treat the cables (and I don't see how a standard with MORE (presumably finer) conductors is going to fix that. (although I guess if there are 4 gnd and 4 5V wires, you might not notice some of them breaking until the insulation melts...))(I looked for a nice micro-USB connector with through-hole legs (on the shield) a while back, and I think I found ONE. Plus a bunch with sort-of partial-length stubs for through-holes that would be SOME improvement, I guess)

author: funkathustra
author_rank: Regular Contributor
timestamp: August 03, 2017, 07:33:00 pm
content: Quote from: joshtyler on August 03, 2017, 06:33:49 pmWhat the hell are you talking about? You can easily route USB 2.0 signals out of a USB-C connector on a two-layer 6/6-mil design with 12-mil diameter vias. Look at the PCB layout I posted. It's completely standard-spec stuff. It's only "harder" than a USB micro connector because you have to jump to the bottom layer and come up again to route the second diff pair crisscross. A USB-C connector has a bog-standard 0.5mm pitch.Quote from: joshtyler on August 03, 2017, 06:33:49 pmYes, on second glance, it looks like they're using a non-standard USB-C pin-out that leaves space between the A6/A7 diff pair. They make connectors that are missing the A6/A7 diff pair (one-way connectors), and that's what I thought they were using. Their routing has unnecessarily long stubs; not sure why they didn't route it more similarly to the example I posted.Honestly, I suspect that you read or heard somewhere that USB-C was "hard to route" (an opinion you're pushing), but it doesn't seem like you've examined in much detail the evidence you're posting; as it directly contradicts what you're saying.Now, if you have to route a full USB 3.1 set of connections to USB-C, now *that* gets hard to route. Here's the USB-C to TI USB mux routing I did for a USB 3.1 camera design:That would be possible to do on a two-layer board, but it would probably violate USB timing requirements. Either way, we're not talking about USB 3.1 signals — just a simple USB 2.0 diff pair!

author: funkathustra
author_rank: Regular Contributor
timestamp: August 03, 2017, 07:37:07 pm
content: Quote from: westfw on August 03, 2017, 07:05:43 pm...but we're not talking about how robust the connector is inother people's designs, we're talking aboutour own designs, no? Most USB-C connectors have thru-hole mounts. In fact, I'm not sure I've seen any that are pure SMD. Look at the picture of the USB 3.1 routing I just posted; that's your typical USB C connector footprint. That thing ain't going nowhere.You seem to have a strong opinion about whether a USB-C-based design can be robust, based on your experience with crappy USB micro products — bizarre.

author: hermit
author_rank: Frequent Contributor
timestamp: August 03, 2017, 07:58:32 pm
content: https://e2e.ti.com/support/interface/usb/f/1008/t/512449

author: funkathustra
author_rank: Regular Contributor
timestamp: August 03, 2017, 08:52:16 pm
content: Quote from: hermit on August 03, 2017, 07:58:32 pmNot relevant. Focuses on SS signals, not plain ol' USB 2.0 signals. But that should show you how inconsequential these are; they're not even mentioned in the post.

author: Unknown
author_rank: Unknown
timestamp: August 03, 2017, 09:08:29 pm
content: @funkathustra Thank you, this is tremendously helpful.So if I do it that way, it's both USB Type C and USB 2.0 compliant? And will work with all Type C connectors in either orientation?Re the two 50k resistors (R3 and R4), these signal port direction only? Or are they also signaling something about current required? (My device is a current sink, not a current source. It's powered by the USB.)@westfw My own experience is that micro-USB is the worst of all options. Mini-USB has been much more robust for me, and I've had no problems with Type C either so far. But micro-USB seems to have a lot of failures. I suspect it's because the cable ALWAYS connects on the THIRD try (wrong - flip it - wrong again - flip it - connect). That's probably very wearing.I've never bought the "more reliable" argument for micro-USB. I think Nokia couldn't fit a mini-USB into one of their phones and just wanted something smaller.

author: hermit
author_rank: Frequent Contributor
timestamp: August 03, 2017, 10:53:55 pm
content: Quote from: funkathustra on August 03, 2017, 08:52:16 pmJust something I started thinking about recently for interfacing some boards I'm thinking of building and I'm still trying to wrap my head around the subject. That's why I wandered into the thread. So let me ask, if you are using just 'plain old USB 2.0 signals', why bother with the newer connector? I have yet to see the newer connector on anything so the older connector should be compatible for a long time to come. Well, other than the 'cuz I can'?

author: funkathustra
author_rank: Regular Contributor
timestamp: August 03, 2017, 11:21:41 pm
content: Quote from: Dave92F1 on August 03, 2017, 09:08:29 pmYup.Quote from: Dave92F1 on August 03, 2017, 09:08:29 pmCareful — they're 5.1k resistors, not 50k. But yes, they're used to determine cable orientation. Since you'll be building a USB 2.0 device, you'll have to negotiate with the host to get 500 mA from it (unless you want to violate the spec and just pull 500 mA directly — I have yet to see a host port that actually has a protocol-based current control.Quote from: hermit on August 03, 2017, 10:53:55 pmI don't know about the OP, but I use USB-C in my design because it's bidirectional and customers perceive it as "modern" and "forward-thinking" — which adds perceived value to the product.Another important consideration for me is that it has good fidelity across device categories. If I want to build a device that plugs into computers and smartphones, I can't think of a better connector than a female "C": USB A-to-C cables are as cheap as good-quality USB A-to-micro cables, so there's no advantage to use USB-micro there. And a female USB-C device can plug into a smartphone using a USB C-to-C cable, which is totally standard cable. On the other hand, if you put a USB micro B connector on a device, I don't know how you plug it into a smartphone without a weird array of USB-micro-OTG-to-female-A adapters and USB A-to-micro-B cables; USB micro-B-to-micro-B OTG-friendly cables are very uncommon.

author: joshtyler
author_rank: Contributor
timestamp: August 03, 2017, 11:32:36 pm
content: Quote from: funkathustra on August 03, 2017, 07:33:00 pmI think perhaps my posts have been interpreted a little more strongly than they were intended. What I said was:QuoteWhich I stand by: it's by no means impossible, just harder than a simple four pin micro USB connector. The "evidence" I posted was a reference design, that the author spent some time producing because they found it non-trivial.I happen to quite like USB type C. I posted the Macrofab design not to discourage OP from using it, but to show them how it could be done.

author: westfw
author_rank: Super Contributor
timestamp: August 04, 2017, 02:23:03 am
content: QuoteWell, substitute "will be" for "can be" and "common" for "crappy", and I'll agree with that: "common USB-C cable/connector combinations will end up being less robust than desirable."QuoteThat, at least, is an improvement. Thanks for pointing this out.I don't suppose that anyone makes a connector (receptacle) that is USB-C on the outside and USB-2 (4 or 5 wires) on the PCB-side, that already has at least the data and hopefully power properly cross-connected? For all of those products that don't need more than USB2, but want to look "modern" and support the invertable cable? I mean, the receptacle is essentially a little piece of high-quality PCB material - can't they just add some vias and additional traces? (or is this the sort of non-standard thinking that the USB Implementers Forum frowns upon?)

author: Monkeh
author_rank: Super Contributor
timestamp: August 04, 2017, 04:02:33 am
content: Quote from: Dave92F1 on August 03, 2017, 09:08:29 pmPerhaps if you stop putting the sockets on upside down..

author: funkathustra
author_rank: Regular Contributor
timestamp: August 04, 2017, 04:47:49 am
content: Quote from: westfw on August 04, 2017, 02:23:03 amI don't understand; what's wrong with a standard USB-C connector? Seriously, I don't understand what people on this thread are worrying about. If you're not comfortable dropping to the bottom layer to crisscross your USB data diff pair, I can't imagine how you'd possibly lay out a normal PCB design. How is this any different than any other part on a normal PCB?

author: sporadic
author_rank: Regular Contributor
timestamp: August 04, 2017, 12:32:26 pm
content: I'm laying out a USB to serial dongle and am seriously considering using Mini-B due to all the issues I've experienced using micro USB in consumer devices. You see all these articles and studies where micro is better / last longer but reality seems to be otherwise. Have yet to really see any consumer reliability feedback on USB-C. Maybe that's a good thing?Sent from my R1 HD using Tapatalk

author: RGB255_0_0
author_rank: Frequent Contributor
timestamp: August 04, 2017, 01:00:53 pm
content: Type C is still new so we will see in the long term how reliable it is. My girlfriend's daughter has a 5X and she's chewed (almost literally) through several cables but the connector itself inside is still fine. It's almost a year old. Micro USB becomes loose pretty quickly IME but I don't recall actually breaking one - but I've not dropped a heavy device with the connector still attached or been otherwise reckless with it. Both flavours will be around for years more; mini B is practically dead though.If you're designing a board and debating which connector, you may as well go with Type C and get used to routing.Linus did some testing with the durability of both connectors.

author: Unknown
author_rank: Unknown
timestamp: August 04, 2017, 04:17:18 pm
content: QuoteFor me, its:a) I don't trust/like micro-USB. Too fiddly to plug in, too unreliable in my personal experience.b) Mini-USB is really getting old.c) Being able to plug in the cable either way is nice.

author: funkathustra
author_rank: Regular Contributor
timestamp: August 04, 2017, 09:05:58 pm
content: Quote from: sporadic on August 04, 2017, 12:32:26 pmWe ran into issues with USB cables and dev boards that we used for several years with hundreds of students. We did a ton of experiments and testing with different setups, and the TL;DR is essentially "of course USB mini appears more reliable; it's not used for anything these days with high insertion rates"Here's what we concluded:Most problems with USB micro can be traced to old cables that people have used every day for five years or longer with several generations of smartphones. These cables have probably seen thousands of insertion cycles.There are lots of really cheap USB micro cables out there, and these have a high failure rate. When we switched from $1 bulk USB micro cables to $4 name-brand ones, all our problems went away with bad cables.USB mini connectionsappearto be more reliable these days, but our hypothesis is that most USB mini cables people have laying around these days were never used daily with smartphones — and instead, have only been used with dev boards. Most of these cables have probably less than 50 insertion cycles on them.When we've used USB mini receptacles on boards that have similar use to USB micro receptacles, the minis fail more quickly

author: sporadic
author_rank: Regular Contributor
timestamp: August 04, 2017, 09:45:37 pm
content: Quote from: funkathustra on August 04, 2017, 09:05:58 pmYou bring up some good points, appreciate it. Thanks!

author: alm
author_rank: Super Contributor
timestamp: August 05, 2017, 01:57:10 am
content: That makes sense. USB micro-B is rated for many more insertions than mini-B. And micro-B was designed so the cables fail before the connector fails.

author: westfw
author_rank: Super Contributor
timestamp: August 05, 2017, 11:49:22 am
content: QuoteCare to name names? Especially for the "good" $4 cables?There are a LOT of cheap, bad, cables out there, and no one is likely to want to spend $15/cable.I expect USB-C cables to have the same quality problems, except that even the cheap cables will be more expensive.

author: funkathustra
author_rank: Regular Contributor
timestamp: August 06, 2017, 06:06:20 pm
content: Quote from: westfw on August 05, 2017, 11:49:22 amI wasn't involved in the purchasing process, but I'm almost positive that we went with Anker cables — might have worked directly with them, or just bought them from Amazon/eBay.So far, my favorite USB-C cables for USB 2.0 applications are the Cable Matters ones — they're$6 on Amazon, have a great matte feel, super thin cable, and have gold-plated connectors that are a lot stricter-tolerance than other cables, which means they never lose a connection — even when subjected to a ton of lateral force. They have the most satisfying "click" I've heard, too, which gives me a ton of confidence for more rugged applications.Just remember: the great thing about USB-C and the worst thing about USB-C are one in the same: it's one connector to rule them all. Those simple USB 2.0 A-to-C cables are going to be worthless for connecting actual USB 3.1-capable devices (external hard drives, capture cards, etc) to your computer. For that, you'll need a more expensive, bulkier USB 3.1 A-to-C cable that actually has all 22 signals bonded out.

author: westfw
author_rank: Super Contributor
timestamp: August 10, 2017, 08:46:21 pm
content: QuoteGood to know, I guess.Recent facebook post from tech-savvy (network engineer) friend:Quote

author: Monkeh
author_rank: Super Contributor
timestamp: August 10, 2017, 10:26:07 pm
content: Does anyone make a user who doesn't destroy cables needlessly? I've used the same ones daily for years.

author: hermit
author_rank: Frequent Contributor
timestamp: August 10, 2017, 10:34:33 pm
content: The only one I have 'destroyed' is a cheap 10 footer. It will charge but I can't transfer data.

author: Monkeh
author_rank: Super Contributor
timestamp: August 10, 2017, 11:19:21 pm
content: Quote from: hermit on August 10, 2017, 10:34:33 pmThe only one I've destroyed I haven't dared test - it got left on the back of a chair and fell into a loose joint. It's very flat now.

author: judge
author_rank: Contributor
timestamp: June 22, 2020, 06:49:30 pm
content: Very old thread I know, but good info on it. One thing I saw on a recent design was use of a connector like this:https://gct.co/files/drawings/usb4105.pdfInterested to know people’s opinions of this design, which is specific to USB-C/USB 2.0

author: lucazader
author_rank: Regular Contributor
timestamp: June 22, 2020, 08:21:31 pm
content: We use them in out designs. Or at least something similar with a similar footprint.The ones that we have sourced are quite reliable. good connector feel and work really well for our application.They have the USB-2.0 data lines as well as the CC lines. They should also have the SBU lines as well in case you are considering using them.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: June 23, 2020, 04:34:33 am
content: Full thru hole stakes on USB-Micro seems to have improved since this thread started, and this is a good examplehttps://lcsc.com/product-detail/USB-Connectors_XKB-Enterprise-U254-051N-4BH806_C319170.htmlType C connectors seem to still be a premium price, but do offer higher current ratingshttps://lcsc.com/product-detail/USB-Connectors_Jing-Extension-of-the-Electronic-Co-Jing-Extension-of-the-Electronic-Co-USB-3-1-C-16PF-SMT2-0Type_C167321.html

author: NorthGuy
author_rank: Super Contributor
timestamp: June 23, 2020, 05:11:27 pm
content: Quote from: westfw on August 05, 2017, 11:49:22 amI bought several assorted UGreen USB cables on AliExpress. They all were good.