Hacker News new | past | comments | ask | show | jobs | submit login
Twonkie: A USB-PD sniffer/injector/sink based on Google's Twinkie open hardware (github.com/dojoe)
168 points by transpute 5 months ago | hide | past | favorite | 26 comments



> This one "sniffs" the link just for the Power Delivery negotiations that happen at the lowest electrical levels. If a device or cable is misbehaving, a knowledgeable person should be able to replicate the problem and see it happening with the sniffer. They could see which component was not following spec, and most importantly, exactly what it was doing wrong. > > Even if your computer is participating in Power Delivery, it can't see its own PD traffic because all that is handled at a low level by ASIC chips in your USB port. Hence the need for a separate physical device to see the signals that are actually being sent on the wire.

https://www.reddit.com/r/UsbCHardware/comments/qmz9uz/twonki...


Equivalent commercial PD analyer is ~$200, https://www.infineon.com/cms/en/product/evaluation-boards/cy...

> records traffic passively on the Configuration Channel (CC) and allows users to analyze and debug USB Power Delivery communication.. acts as a pass-through for VBUS, VCONN, USB 3.1, USB 2.0 and USB-PD traffic

Total Phase / Google Twinkie device with Sigrok Pulseview software, https://www.totalphase.com/blog/2015/10/usb-power-delivery-a...


More like $60, or charger lab has a nicer one for about the same price. https://estore.st.com/en/products/evaluation-tools/product-e...


> charger lab has a nicer one

Power-Z KM003C? https://www.amazon.com/ChargerLAB-KM003C-Portable-Charging-V...


Yes, I have a few of these and I love them


The big question is how it performs with high-speed data. Google's Twinkie and this Twonkie clone use a design which messes with the data lines as little as possible so they'll probably still work with USB4 if you're lucky, but the linked ST device is routing those traces all over the board. No issue with USB2, might work with 10Gbps USB3, but anything more? I wouldn't want to bet on it.


ChargerLab's KM003C passes in Thunderbolt 4 correctly at least.

(source: I have one and can have it between my macbook pro and a TB4 dock and two displays work correctly)


Nicer in what way? I've used the one referenced in the first comment (CY4500) and it worked quite well. I'm not entirely sure what could be done better.

Nice to know that cheaper ones exist though - is the supporting SW any good (reading out packets, recording etc)


Nicer in that it has a good HMI. Anandtech has a nice review: https://www.anandtech.com/show/18944/usbc-power-metering-wit...


This isn't quite the same thing, I think. The Cypress one has decent software for reading individual PD packets and debugging PD/TCPM implementations.

Even if you can read out the packets with that, it doesn't look like it has a good pre-existing analysis software for it, which is a large part of the value proposition for the cypress version.


That's what sigrok or wireshark are for, IMO. Of course, you lose something for half the price. The ST one does have a protocol analyzer.


Well, you can't read PD packets at that layer - they are only realistically visible at the driver layer and below, as the TCPM driver will manage the PD negotiation (and the main benefit of these analysers, at least for me, was to help write such a driver in the first place :))


$6 USB-C breakout for selectable voltage, https://learn.adafruit.com/adafruit-husb238-usb-type-c-power...

> The HUSB238 USB PD sink chip is neat in that you can either use jumpers (really, resistor selection) to set the desired power delivery voltage and current or you can use I2C for dynamic querying and setting.


I combined one of those cheap breakouts with this variable voltage power supply - https://www.amazon.com/gp/product/B0861LGM15 - and a 3d printed enclosure to make a benchtop power supply pretty affordably. Just use your laptop's power supply and now you can have any voltage and limited amperage.


I am waiting for an updated version that does PD 3.1, so it can go to 48V/5A.


That's 240W. You could charge an e-Bike via USB-C with that. Insane.


Yep. That's exactly what I am looking for. Use USB-PD to charge small electric vehicles in a standardised way ;) See https://jan.wildeboer.net/2024/06/Charging-SEVs-A-Modest-Pro... where I describe the concept and https://github.com/manuelbl/usb-pd-arduino/wiki where there is Open Source code (and schematics) to do PD sniffing and sink negotiation.


The AliExpress search term for similar devices is "trigger board" or "decoy board."

I'm seeing them as low as ~10/$.


Have these gotten mature enough to actually use? A few years ago, every single one I tested would just give you a different voltage if it couldn't trigger the correct voltage, which is obviously terrible.


They go to the next lowest voltage, because some PD capable supplies don't provide all the voltages. Most are missing 12V, unfortunately.


My experience is good so far with them, but it's good to get a couple of automobile lights to wire in series or parallel to load them.

As the saying goes: "With Ali Express you test, don't guess!"


The electronics are small enough to put into a USBC connector -- which is also a handy form factor:

https://www.amazon.com/Euogeudel-4-9ft-Trigger-Input-2-5mm/d...


Link to original Twinkie is dead, here’s an archived copy: https://archive.is/EGxFi



There is a very useful cheap device “TC66C” you can buy on aliexpress which acts as a multimeter and lets you test/trigger PD and the older protocols like Qualcomm quick charge.


I'm twinkie, and I'm twonkie, and we're the sniffer brothers




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: