gregdavill / PD-sniffer

USB PD sniffer
Creative Commons Attribution 4.0 International
180 stars 15 forks source link

[v0.1] Form Factor #5

Open gregdavill opened 3 years ago

gregdavill commented 3 years ago

The current design features an upstream Type-C plug and downstream Type-C socket. freshtwinkie_hw_v0 1

This is designed to plug directly into a host, but the Type-C paddle mounted connectors mean we're forced to use a 0.8mm PCB, and the overall design feels a bit flimsy. Potentially a 3d printed case might help?

Would it be possible to use two Type-C sockets, and then maybe house the device in a small extruded aluminum case as shown? 1455d601rb

whitequark commented 3 years ago

This is designed to plug directly into a host, but the Type-C paddle mounted connectors mean we're forced to use a 0.8mm PCB, and the overall design feels a bit flimsy. Potentially a 3d printed case might help?

These are exactly my thoughts--I think I was going to file a bug but forgot.

Would it be possible to use two Type-C sockets, and then maybe house the device in a small extruded aluminum case as shown?

Unfortunately, I don't think two sockets will work. If you are using something that requires e-marked cables, I think (based on my understanding of the PD spec) that will just garble the communication since there's only SOP' and SOP'' to address the markers. Also, if you are using something like Thunderbolt, two cables plus the PD sniffer PCB might exhaust the entire link budget. I am very interested in using it for both of these applications.

The latter reason also excludes e.g. having two connectors with a mux picking between them, since you cannot pick a mux that handles every conceivable altmode. The board has to stay passive and functional with only a single cable involved, or it will lose a lot of its usefulness.

I think a sturdy case, 3d printed or not, is the way to go. I expect some boards will break during use, but... it's not a complex or expensive board (now that we aren't using Google's absurd design rules) so it's not a huge loss. In any case, plugging suspicious type-C stuff into a type-C debugger directly electrically interfacing the lines is inherently hazardous. We don't even have protection from having 20V on the CC lines; anyone using this sniffer ought to buy them in pairs!

hardkrash commented 3 years ago

If you wanted to move away from a PCB mount plug then the other option is to use a captive cable. It appears that this might be the correct cable, but I cannot tell as their data sheets seem to not match well with their product's pages.

https://www.wit-area.com/20v-5A-100w-USB-C-cable-63.html If these are not exactly what you need they might have a different version that I couldn't find exact details from their data sheets. It seems pretty hard to find these online and listed.

If you wanted two receptacles then you would want to get a cable like this one from Acroname. https://acroname.com/store/c38-usbc-uoc

This is the problem that Acroname had to solve for their passive USB-C switch. https://acroname.com/store/s85-rdvr-usbcsw?sku=S85-PASS-USBCSW

With all this I agree with @whitequark that the plug with an enclosure would work reasonably well. Especially with a connector that has some mechanical stability designed in. e.g. the JAE DX07P024MJ1R1500 this connector can get some metal attached to the shell and get firmer mounting to the PCB or enclosure.

Note: it is super easy to break un-reinforced type-c plugs off of boards. The pads alone don't have enough adhesion to retain the connectors.

whitequark commented 3 years ago

If you wanted to move away from a PCB mount plug then the other option is to use a captive cable.

This seems like it would be very hostile to DIY. Is that microcoax on the cable you linked? I think that would be a problem for many people, myself included.

If you wanted two receptacles then you would want to get a cable like this one from Acroname.

This is more reasonable but I think it's still kinda hostile to DIY; not only you need to get a custom device (which we can maybe get to be easily orderable through e.g. JLCPCB) but now you also need a custom cable with very few suppliers which is also not easy to find a second source for.

(Thanks for bringing it to my attention though!)

Note: it is super easy to break un-reinforced type-c plugs off of boards. The pads alone don't have enough adhesion to retain the connectors.

That's how I felt about it, too. Guess I'm going to be even more careful now that you've confirmed it!

hardkrash commented 3 years ago

There are different options for board edge midplane USB-C plugs, The DX07P024MJ1 from JAE has extra mechanical strength by having the shell extend back to get better leverage and mechanical durability as the connectors pins are now not the mounting point.

image

Generated with a SnapEDA footprint modified to work with the USB-Plug footprint. Steps to reproduce:

I'm on Nightly and don't know KiCad 5, so not sure about submitting a branch with the modifications.

hardkrash commented 3 years ago

If you wanted to move away from a PCB mount plug then the other option is to use a captive cable.

This seems like it would be very hostile to DIY. Is that microcoax on the cable you linked? I think that would be a problem for many people, myself included.

I would expect the cable to be shielded twisted pair (STP). I agree that terminating shielded twisted pair is not DIY friendly, it would require good magnification. Terminating micro-coax is at the high end of difficult DIY.

whitequark commented 3 years ago

To be explicit about my goals, I want to have a device that would reduce USB-related frustration, so I'm strongly biased towards solutions that are, perhaps, suboptimal, but do not require specialized skills, or even skills most people could probably acquire quickly but are afraid of (like BGA soldering for example). I think there is a space for a more complex PD debugger that is also more capable, but I'd really like to fill a baseline need first.

gregdavill commented 3 years ago

... plugging suspicious type-C stuff into a type-C debugger directly electrically interfacing the lines is inherently hazardous. We don't even have protection from having 20V on the CC lines; anyone using this sniffer ought to buy them in pairs!

Is there an easy way to add 20V protection? I notice this is a common feature on some of the integrated PD controllers. I guess at a minimum we should try to ensure a 20V fault can't propagate back through the USB 2.0 interface.

whitequark commented 3 years ago

Is there an easy way to add 20V protection?

Maybe pass FETs? Paging @electroniceel

gregdavill commented 3 years ago

A very quick search shows some integrated solutions, that at-least cover CC/SBU pins.

NX20P0407, or TPD8S300

whitequark commented 3 years ago

Oh neat, I knew about TPD4 but not TPD8

hardkrash commented 3 years ago

24 pin Type-C connectors sorted for my opinion of easiest soldering:

Plugs:

Receptacles.

hardkrash commented 3 years ago

If something more fancy is done for the USB 2.0 data lines requiring protection. Then 20V protection could be integrated with a TS5USBC41 Unfortunately it is a DSBGA package. :-/

The NXP part above also has a sibling part for USB 2.0 protection NX20P0408. Unfortunately it is also WLCSP12.

gregdavill commented 3 years ago

So thinking a bit more about this, it shouldn't matter about the SS and USB2 pins being unprotected. Since we're just passively connecting them through. It will be upto the downstream device to have adequate protection.

Unless we really want to add protection.

I think we'll stick with a style of mid-plane connector, whether that has the extra tabs or not. And also develop an enclosure for the device, for adding rigidity. It could be cool to do a milled case, but we'll also need to have a design for FDM printing for DIY cases.

Is it possible to get 100% THT full featured 24pin USB-Receptacles? The one you linked is only USB-2.0 pins. The dual row SMT means you are required to use solder-paste/reflow. IMO, they're the best option automated assembly, as it removes the need for THT soldering. I'll look into SMT+THT as an option.

hardkrash commented 3 years ago

Whoops, I though it was 24 contacts to the board. Appears that when I searched and it showed up as a 24 pin part, I misinterpreted as 24 contacts wired in.

The enclosure would make the mounting strength issues less important. Also I bet liberal amounts of glue would work as well for those without printers and the like.

electroniceel commented 3 years ago

Is there an easy way to add 20V protection?

Maybe pass FETs? Paging @electroniceel

For the CC lines you could do it like I have planned for my Glasgow protection addon: https://github.com/electroniceel/io-protection-notes Unfortunately I haven't continued to work on this since I started doing other Glasgow-related work. So this is more in the state of a design concept and not a fully tried and tested schematics you can just copy and it works.

electroniceel commented 3 years ago

If something more fancy is done for the USB 2.0 data lines requiring protection. Then 20V protection could be integrated with a TS5USBC41 Unfortunately it is a DSBGA package. :-/

The NXP part above also has a sibling part for USB 2.0 protection NX20P0408. Unfortunately it is also WLCSP12.

Protecting D+/D- from >20 V is the really tricky part and these seem to do it. Nice. I didn't know there was an IC that could do it.

Since these are really small, we could consider adding them to the regular Glasgow ports in a future rev. They don't protect from negative voltages and don't cover Vio, but they'd still make regular Glasgow much more resilient.

Only real downside are the packages.

I will order some samples and play with them a bit.

hardkrash commented 3 years ago

I bought some Type-C plug breakout boards with the JAE DX07P024MJ1, they are much more stable than other SMT midmount options.

image

I would use this in my lab without a case.

dnschneid commented 3 years ago

Some thoughts:

gregdavill commented 3 years ago

Thanks for these insights @dnschneid!

dojoe commented 3 years ago

FWIW, I solved this in an unconventional way in the Twonkie: I'm using vertical-mount connectors and using them as straddle mounts (or rather, touch-the-board-edge mounts). This requires some minor physical modification to the connectors (removing some mounting features that are in the way and slightly bending the pins for better contact) but it worked like a charm on two specimens so far, much easier to get right than I expected, and since I solder the shell to the PCB surrounding the connector it's also rock solid mechanically. Also I can use an 1.6mm PCB which is good for stability (and availability).

I was a little afraid that the little stubs created by the pins would cause problems on the high speed links but both boards I built so far support TB3 20Gb/s links just fine.

Of course this is not suitable for automated assembly but it works pretty well for DIY.