The previous few years have seen a rise in adoption of the Kind-C connector. It has concurrently been accompanied by further technological improvements on high of it. This has created a necessity for gadgets and instruments to observe the communication over the connector – specifically, the facility supply (USB-PD) facet. Whereas expensive USB protocol analyzers fulfil the requirement of firms concerned in silicon growth and low-level {hardware}, these are impractical for individuals seeking to optimize their microcontroller tasks, hobbyists, fans, and even finish customers.
The Google Twinkie (developed in 2014) was the unique USB-PD Sniffer. Since then, many gadgets have tried to duplicate not less than a number of the performance in a extra user-friendly method. Nevertheless, none of them have been in a position to match the Twinkie’s flexibility for superior customers. In contrast to the Twinkie, the designs additionally interfered with common knowledge visitors whereas monitoring the facility switch. ChargerLAB’s KM003C is without doubt one of the newest premium options within the checklist, and it ticks lots of the bins that different options don’t. Actually, it goes one step additional than the Twinkie by supporting the EPR specs additionally (Prolonged Energy Vary, as much as 240W).
One of many key benefits of the Google Twinkie is the supply of a shell over a serial port by way of which the operation might be configured. This enables finish customers to develop customized scripts and functions for monitoring varied parameters. At AnandTech, we’ve got been utilizing Plugable’s USBC-TKEY (a model of the Google Twinkie for the retail market) to trace the facility consumption profile of bus-powered USB gadgets since 2016. After 7+ years of service, the USBC-TKEY had began to point out its age, prompting us to be looking out for another. After wanting on the specs of the ChargerLAB KM003C, we determined to take a punt and bought one to see if it may change the USBC-TKEY in our workflow.
ChargerLAB offers a Home windows-only closed-source utility to show the superior options of the KM003C (past what’s offered within the show on the gadget). The corporate additionally offers documentation for his or her APIs in Chinese language. This evaluate takes an in depth have a look at the options of the ChargerLAB KM003C. It additionally particulars our makes an attempt to make use of their APIs to duplicate the Google Twinkie performance for AnandTech’s use-case.
Introduction and Product Impressions
The USB specs have been topic to fast updates because the introduction of the Kind-C connector. Knowledge charges have been rising and the newest variations even permit encapsulation of PCIe visitors. On the identical time, the USB-IF additionally foresaw the necessity for flexibility in transmitting totally different quantities of energy from the host to the gadget and vice-versa. In the direction of this, the USB-PD (energy supply) specs have been additionally developed. The newest revision – USB-PD 3.1, brings assist for 140W, 180W, and 240W energy ranges. The PD specs have additionally allowed for energy transmission both from the host, or the gadget. All these capabilities are enabled by an influence supply handshake course of between the gadgets on both facet of the cable. As the facility supply requirements evolve in each capabilities and adaptability, a necessity has come up available in the market for gadgets that may present suggestions to the customers and builders on the PD handshake course of and its outcomes.
USB protocol analyzers additionally embody assist for analyzing the PD handshake course of. Silicon and low-level {hardware} builders do use them, however they’re often extraordinarily expensive (as a result of additionally they assist the tracing and debugging of the high-speed knowledge transfers). The PD handshake course of is at a comparatively sluggish pace (round 300 KHz) over the CC (management channel) wire, and does not require high-speed sign monitoring. There are a lot of low-cost gadgets available in the market that faucet the CC1 and CC2 pins to supply data on the PD handshake course of to the top person.
Energy supply sniffers additionally want to observe the voltage and currents on the VBUS and VCONN pins. Superior sniffers permit for the injection of energy supply packets on the CC pins and in addition inserting the termination resistances. From an influence measurement perspective, the fascinating ones are the VBUS and VCONN. The previous carries bus energy for gadgets (and, in some instances, for the circuitry within the cable itself). The voltage could fluctuate from 5V for typical USB 2.0 hosts / gadgets to as much as 48V for USB-PD eventualities. VCONN, alternatively, is at all times set to 5V and may provide as much as 1W of energy for circuits inside the plug. These circuits can implement electronically marked cables and even be equipment.
The pin-out diagram above exhibits the D+ / D- differential pair that’s used just for USB 2.0 visitors. An inline energy supply sniffer may decide to chop out the trail, eliminating USB 2.0 knowledge switch path fully. The identical might be carried out for the TX / RX pairs chargeable for the upper pace knowledge visitors in USB 3.x / USB4 / Thunderbolt 3+. Whereas there are some authentic use-cases for permitting solely energy switch by way of the USB cable, most customers using an inline energy supply sniffer need knowledge visitors to be untouched. Sadly, a majority of the low-cost sniffers available in the market take the simple means out by fully ignoring the information switch path.
ChargerLAB KM003C Bundle Contents and Function Set
The ChargerLAB / Energy-Z KM003C is marketed primarily as a USB PD tester, and is available in a non-descript field. The rear label offers the high-level specs by way of supported voltage and present vary, in addition to quick charging protocols. Contact particulars for assist and enterprise points are additionally offered.
Contained in the package deal, we’ve got an aluminum storage field with the PD tester positioned inside a foam cladding for cover when the unit just isn’t in use. The Kind-C male port additionally has a safety cap. QR codes with hyperlinks to ChargerLAB’s YouTube and Telegram channels are offered in an accompanying enterprise card.
The ChargerLAB / Energy-Z KM003C is an inline gadget positioned between the downstream dealing with port (DFP) of a bunch and the upstream dealing with port (UFP) of a tool. Both element can act because the supply and sink by way of energy supply. It’s used for voltage and present detection, energy supply functionality testing, cable testing for e-markers, quick charging protocols detection, and different such checks.
The KM003C itself is a cuboidal piece of aluminum (measuring 36.5mm x 35.5mm x 8.7mm, weighing in at 16.5g) with a Kind-C male port because the UFP, and a Kind-C feminine port because the DFP. It’s geared up with a vibrant 240 x 240 1.54″ IPS display that gives actual time data on the VBUS, IBUS, energy consumption, charging protocol (if relevant), and voltages on totally different strains within the connector. The product can also be geared up with a Kind-C HID port that can be utilized to interface it with a PC for knowledge recording and additional evaluation. There are bodily buttons on the product that permit the person to navigate the menus, configure varied testing parameters, set sampling charges, and so forth.
Bodily buttons on the KM003C (the HID port is on the face reverse to the buttons)
The KM003C can carry out some fundamental operations with the facility equipped by way of the VCONN line, but it surely requires connection to energy by way of the HID port for full-fledged operation. The everyday energy consumption of the KM003C itself is round 75 – 250 mW. It additionally features a supercapacitor that permits for a protected shutdown (guaranteeing that knowledge in flight is flushed out to everlasting storage) and the show to stay energetic for round 5 seconds after the facility is disconnected.
ChargerLAB additionally bundles a closed supply Home windows-only software program to graph and retailer the recorded parameters on a PC for additional processing.
ChargerLAB KM003C vs. Plugable USBC-TKEY
The Google Twinkie / Plugable USBC-TKEY and ChargerLAB KM003C are conceptually related in that they’re each USB PD sniffers / testers. Nevertheless, the variations are proof to the developments made within the USB area between 2014 and 2022, and in addition mirror the evolution of end-user necessities on this area.
The important thing distinction lies within the energy specs. The Google Twinkie / Plugable USBC-TKEY can assist solely as much as 20V / 5A on the VBUS strains because of the limitations of the digital energy monitoring ADC chip getting used. The KM003C can assist as much as 50V / 6A (full USB-PD 3.1 specs, with EPR as much as 240W).
The usage of a newer ADC chip has enabled elevated measurement accuracy within the KM003C as in comparison with the Google Twinkie / USBC-TKEY. The INA231 used within the latter has a 16-bit ADC and a voltage measurement step dimension of 1.25 mV. The INA228 within the KM003C has a 20-bit ADC and a voltage measurement step dimension of round 0.2 mV. The INA228 additionally contains temperature monitoring (and that’s obtainable by way of APIs and the show display on the KM003C).
The Twinkie was designed primarily to be used with Chrome OS, and consequently, its retail variations such because the Plugable USBC-TKEY assist solely Linux. TotalPhase gives the TP350110 based mostly on the identical {hardware} because the Twinkie. It comes with modified firmware and drivers that assist each Home windows and MacOS, together with prolonged APIs and a customized knowledge processing utility at a steep premium. The KM003C helps solely Home windows formally for the connection by way of the HID port, and their knowledge processing software program can also be Home windows-only.
The Twinkie / USBC-TKEY has a CLI shell accessible over a USB serial port and comes with assist for a particular set of instructions (like ‘tw vbus’ and ‘tw vconn’ for studying the voltage and present on the VBUS and VCONN strains, ‘tw res param1 param2’ for putting resistors on the CC strains – Rp / Rd / Ra), and so forth.). The KM003C is accessible over the HID port and is receptive to instructions, however these are customized encodings with out an interpretation layer within the center.
The Twinkie / USBC-TKEY can act as a sink and inject energy supply packets to make the host / supply negotiate a distinct energy supply contract. That is additionally obtainable within the KM003C when utilizing the cable simulation and charging protocol detection characteristic, however doesn’t appear to be uncovered by way of the APIs (to the most effective of my understanding).
The Twinkie / USBC-TKEY can arrange or take away resistors on the CC strains with a view to configure the related port as both UFP or DFP. The KM003C seems to have the same performance for the Rd alone. Once more, this doesn’t appear to be uncovered by way of the APIs.
The following part talks in regards to the {hardware} design and software program capabilities. It’s adopted by a dialogue of the API assist and easy methods to use them on each Linux and Home windows. After adapting our direct-attached storage circulation to assist energy monitoring from each USBC-TKEY and KM003C, we recorded some outcomes from each meters. We offer some comparisons of these outcomes earlier than continuing to the concluding remarks.