USB-C Power Metering with the ChargerLAB KM003C: A Google Twinkie Alternative?
by Ganesh T S on July 5, 2023 8:00 AM EST- Posted in
- Gadgets
- USB PD
- Power Assessment Tool
- USB-C
The last few years have seen an increase in adoption of the USB Type-C connector. It has simultaneously been accompanied by additional technological innovations on top of it. This has created a need for devices and tools to monitor the communication over the connector - in particular, the power delivery (USB-PD) aspect. While costly USB protocol analyzers fulfil the requirement of companies involved in silicon development and low-level hardware, these are impractical for people looking to optimize their microcontroller projects, hobbyists, enthusiasts, and even end users.
The Google Twinkie (developed in 2014) was the original USB-PD Sniffer. Since then, many devices have attempted to replicate at least some of the functionality in a more user-friendly manner. However, none of them were able to match the Twinkie's flexibility for advanced users. Unlike the Twinkie, the designs also interfered with regular data traffic while monitoring the power transfer. ChargerLAB's KM003C is one of the latest premium solutions in the list, and it ticks many of the boxes that other solutions do not. In fact, it goes one step further than the Twinkie by supporting the EPR specifications also (Extended Power Range, up to 240W).
One of the key advantages of the Google Twinkie is the availability of a shell over a serial port through which the operation can be configured. This allows end users to develop custom scripts and applications for tracking various parameters. At AnandTech, we have been using Plugable's USBC-TKEY (a version of the Google Twinkie for the retail market) to track the power consumption profile of bus-powered USB devices since 2016. After 7+ years of service, the USBC-TKEY had started to show its age, prompting us to be on the lookout for an alternative. After looking at the specifications of the ChargerLAB KM003C, we decided to take a punt and purchased one to see if it could replace the USBC-TKEY in our workflow.
ChargerLAB provides a Windows-only closed-source application to expose the advanced features of the KM003C (beyond what is presented in the display on the device). The company also provides documentation for their APIs in Chinese. This review takes a detailed look at the features of the ChargerLAB KM003C. It also details our attempts to use their APIs to replicate the Google Twinkie functionality for AnandTech's use-case.
Introduction and Product Impressions
The USB specifications have been subject to rapid updates since the introduction of the Type-C connector. Data rates have been increasing and the latest versions even allow encapsulation of PCIe traffic. At the same time, the USB-IF also foresaw the need for flexibility in transmitting different amounts of power from the host to the device and vice-versa. Towards this, the USB-PD (power delivery) specifications were also developed. The latest revision - USB-PD 3.1, brings support for 140W, 180W, and 240W power levels. The PD specifications have also allowed for power transmission either from the host, or the device. All these capabilities are enabled by a power delivery handshake process between the devices on either side of the cable. As the power delivery standards evolve in both capabilities and flexibility, a need has come up in the market for devices that can provide feedback to the users and developers on the PD handshake process and its results.
USB protocol analyzers also include support for analyzing the PD handshake process. Silicon and low-level hardware developers do use them, but they are usually extremely costly (because they also support the tracing and debugging of the high-speed data transfers). The PD handshake process is at a relatively slow speed (around 300 KHz) over the CC (control channel) wire, and doesn't require high-speed signal monitoring. There are many low-cost devices in the market that tap the CC1 and CC2 pins to provide information on the PD handshake process to the end user.
Power delivery sniffers also need to monitor the voltage and currents on the VBUS and VCONN pins. Advanced sniffers allow for the injection of power delivery packets on the CC pins and also placing the termination resistances. From a power measurement perspective, the interesting ones are the VBUS and VCONN. The former carries bus power for devices (and, in some cases, for the circuitry in the cable itself). The voltage may vary from 5V for typical USB 2.0 hosts / devices to up to 48V for USB-PD scenarios. VCONN, on the other hand, is always set to 5V and can supply up to 1W of power for circuits within the plug. These circuits can implement electronically marked cables or even be accessories.
The pin-out diagram above shows the D+ / D- differential pair that is used only for USB 2.0 traffic. An inline power delivery sniffer could opt to cut out the path, eliminating USB 2.0 data transfer path completely. The same could be done for the TX / RX pairs responsible for the higher speed data traffic in USB 3.x / USB4 / Thunderbolt 3+. While there are some legitimate use-cases for allowing only power transfer via the USB cable, most users employing an inline power delivery sniffer want data traffic to be untouched. Unfortunately, a majority of the low-cost sniffers in the market take the easy way out by completely ignoring the data transfer path.
ChargerLAB KM003C Package Contents and Feature Set
The ChargerLAB / Power-Z KM003C is marketed primarily as a USB PD tester, and comes in a non-descript box. The rear label provides the high-level specifications in terms of supported voltage and current range, as well as fast charging protocols. Contact details for support and business issues are also provided.
Inside the package, we have an aluminum storage box with the PD tester placed inside a foam cladding for protection when the unit is not in use. The Type-C male port also has a protection cap. QR codes with links to ChargerLAB's YouTube and Telegram channels are provided in an accompanying business card.
The ChargerLAB / Power-Z KM003C is an inline device placed between the downstream facing port (DFP) of a host and the upstream facing port (UFP) of a device. Either component can act as the source and sink in terms of power delivery. It is used for voltage and current detection, power delivery capability testing, cable testing for e-markers, fast charging protocols detection, and other such tests.
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 Type-C male port as the UFP, and a Type-C female port as the DFP. It is equipped with a vibrant 240 x 240 1.54" IPS screen that provides real time information on the VBUS, IBUS, power consumption, charging protocol (if applicable), and voltages on different lines in the connector. The product is also equipped with a Type-C HID port that can be used to interface it with a PC for data recording and further analysis. There are physical buttons on the product that allow the user to navigate the menus, configure various testing parameters, set sampling rates, etc.
Physical buttons on the KM003C (the HID port is on the face opposite to the buttons)
The KM003C can perform some basic operations with the power supplied via the VCONN line, but it requires connection to power through the HID port for full-fledged operation. The typical power consumption of the KM003C itself is around 75 - 250 mW. It also includes a supercapacitor that allows for a safe shutdown (ensuring that data in flight is flushed out to permanent storage) and the display to remain active for around five seconds after the power is disconnected.
ChargerLAB also bundles a closed source Windows-only software to graph and store the recorded parameters on a PC for further processing.
ChargerLAB KM003C vs. Plugable USBC-TKEY
The Google Twinkie / Plugable USBC-TKEY and ChargerLAB KM003C are conceptually similar in that they are both USB PD sniffers / testers. However, the differences are evidence to the advancements made in the USB space between 2014 and 2022, and also reflect the evolution of end-user requirements in this space.
The key difference lies in the power specifications. The Google Twinkie / Plugable USBC-TKEY can support only up to 20V / 5A on the VBUS lines due to the limitations of the digital power monitoring ADC chip being used. The KM003C can support up to 50V / 6A (full USB-PD 3.1 specifications, with EPR up to 240W).
The use of a more recent ADC chip has enabled increased measurement accuracy in the KM003C as compared to the Google Twinkie / USBC-TKEY. The INA231 used in the latter has a 16-bit ADC and a voltage measurement step size of 1.25 mV. The INA228 in the KM003C has a 20-bit ADC and a voltage measurement step size of around 0.2 mV. The INA228 also includes temperature monitoring (and that is available via APIs and the display screen on the KM003C).
The Twinkie was designed primarily for use with Chrome OS, and as a result, its retail versions such as the Plugable USBC-TKEY support only Linux. TotalPhase offers the TP350110 based on the same hardware as the Twinkie. It comes with modified firmware and drivers that support both Windows and MacOS, along with extended APIs and a custom data processing application at a steep premium. The KM003C supports only Windows officially for the connection through the HID port, and their data processing software is also Windows-only.
The Twinkie / USBC-TKEY has a CLI shell accessible over a USB serial port and comes with support for a specific set of commands (like 'tw vbus' and 'tw vconn' for reading the voltage and current on the VBUS and VCONN lines, 'tw res param1 param2' for placing resistors on the CC lines - Rp / Rd / Ra), etc.). The KM003C is accessible over the HID port and is receptive to commands, but those are custom encodings without an interpretation layer in the middle.
The Twinkie / USBC-TKEY can act as a sink and inject power delivery packets to make the host / source negotiate a different power delivery contract. This is also available in the KM003C when using the cable simulation and charging protocol detection feature, but does not seem to be exposed via the APIs (to the best of my understanding).
The Twinkie / USBC-TKEY can set up or remove resistors on the CC lines in order to configure the connected port as either UFP or DFP. The KM003C appears to have a similar functionality for the Rd alone. Again, this does not seem to be exposed via the APIs.
The next section talks about the hardware design and software capabilities. It is followed by a discussion of the API support and how to use them on both Linux and Windows. After adapting our direct-attached storage flow to support power monitoring from both USBC-TKEY and KM003C, we recorded some results from both meters. We provide some comparisons of those results before proceeding to the concluding remarks.
20 Comments
View All Comments
ganeshts - Thursday, July 6, 2023 - link
The 50V and 6A are independent of each other. USB-PD 3.1 goes up to 48V / 5A, but other fast charging protocols can differ. For example, SuperVOOC 2.0 operates in the 3-10V / 0.1 - 6.5A range [ https://www.oppo.com/content/dam/oppo/en/mkt/newsr... ].The KM003C supports a long list of non-USB-PD fast charging protocols, and it looks like 50V and 6A are the maximum it supports for the voltage and current on the VBUS line.
lucaB75 - Friday, July 7, 2023 - link
55-110 bucks ? Come on , dont waste time on these reviews, we need real news not bs (highly)overpricedThreska - Friday, July 7, 2023 - link
"Despite this premium pricing, we believe that the KM003C should be part of every USB-C power user / developer's toolkit."Or people who regularly buy questionable chargers and cables.
meacupla - Friday, July 7, 2023 - link
With the way this tester is costing, you might as well buy from a reputable brand to begin with.I am pretty sure you can get an Anker USB GaN charger, with Anker 100W USB cable for $55~110.
TomWomack - Friday, July 7, 2023 - link
And that gets you one charger; we have at least one charger in every bedroom plus a couple on every desk, and spending $110 once on a device which lets you determine which $20 charger it is reasonable to buy a dozen of makes reasonable sense.TheinsanegamerN - Monday, July 10, 2023 - link
If you have enough expensive power hungry devices that you have to have 100w charging in every room, just buy decent chargers and be done with it.Bp_968 - Thursday, August 3, 2023 - link
This device is massive overkill for testing your portable USB battery or USB wall wart. You can do the same thing for 20-30$ if that's all you need it for. But this device will do far more then simply tell you if the battery can output 15 or 20v and at what amperage it can do so.It's like saying an oscilloscope is overpriced because you can use a much cheaper multimeter to see if your home outlet is putting out the correct AC voltage.
PeachNCream - Saturday, July 8, 2023 - link
Anything that lets you escape Google's revolting, mustache-twirling, sticky-fingered clutches is a good thing. It's always a pity to see the US sit idly by while Google feeds the population free candy in exchange for the entirety of the nation's personal data. At least the EU, problems noted where relevant, acts against disgusting data fetishist activity through GPDR enforcement that has teeth. Were it not for sucking from Google's four coloured teats at all levels of governance, the company could have been broken apart by now along. But who am I to complain? You let Elon Musk, Justin Bieber, and that sensationalized scammer-philantropist MrBeast all obtain fame while polluting the world for everyone by driving one and only one person with no cargo whatsoever in a enormous pickup truck or SUV. It's the US after all.Fury13 - Tuesday, July 11, 2023 - link
Is there any (affordable) hardware product available to monitor USB-C bandwidth so we view bandwidth of products such as web cams / VC systems / SSD's to PC's?I understand Crystal Disk Mark can work with a SSD, but this is not the only device I'd like to validate.
Ramalama - Saturday, July 22, 2023 - link
I own the KM003C since around 1 Year...And bought it on AliExpress for less as 50€.
Wondering why this review comes so late tbh.
However, this thing is really great, i have others like the CT-3, which is great either!
Tbh, the only difference is EPR, for example if i measure my MacBook Pro with the ct-3, it will limit the charging to 100W.
No matter what you do, your MacBook will never charge higher as 100W
If i use the KM003c, the MacBook will charge at full 140W.
But for everything below 100W there is literally no different between the ct-3 and KM003c...
Just that the one has usb-a and the other usb-c...
They are both very precise. Actually they work really great!
Would i recommend to buy one of those?
No! Why?
Because you literally use it once you buyed to play with and after some days you will never need it and forget where it even is.
Cheers