Gaming PC

USB-C Power Metering with the ChargerLAB KM003C: A Google Twinkie Alternative?

Over the last few years, the adoption of Type-C connectors has increased. At the same time, it is accompanied by further technological innovations. This creates a need for devices and tools that monitor aspects of communication through connectors, especially power delivery (USB-PD). Expensive USB protocol analyzers meet the requirements of companies working on silicon development and low-level hardware, but they are also practical for people looking to optimize their microcontroller projects, hobbyists, enthusiasts, and even end users. It’s not the target.

of Google Twinkie (developed in 2014) was the original USB-PD sniffer. Since then, many devices have attempted to recreate at least some of their functionality in a more user-friendly way. However, nothing matched Twinkie’s flexibility for advanced users. Unlike Twinkie, this design also interfered with normal data traffic while monitoring power transfer. KM003C from ChargerLAB is one of the newest premium solutions on the list and meets many criteria that other solutions do not. In fact, it goes a step further than the Twinkie by also supporting the EPR specification (extended power range, up to 240W).

One of the main advantages of Google Twinkie is the ability to configure its operation using a shell over the serial port. This allows end users to develop custom scripts and applications to track various parameters. At AnandTech, since 2016, Plugable’s USBC-TKEY (a version of Google Twinkie for the retail market) has been used to track the power consumption profile of bus-powered USB devices. After more than 7 years of service, the USBC-TKEY was showing signs of aging and we needed to find a replacement. After reviewing the specifications of the ChargerLAB KM003C, he decided to buy it to see if it could replace the USBC-TKEY in his workflow.

ChargerLAB provides a Windows-only closed source application that exposes the KM003C’s advanced features (beyond what is shown on the device’s display). The company also provides documentation for his API in Chinese. This review explores the features of the ChargerLAB KM003C in detail. It also details an attempt to use the API to replicate Google Twinkie functionality for AnandTech’s use case.

Introduction and product impressions

The USB specification has been rapidly updated since the introduction of the Type-C connector. Data rates have increased, and the latest version also enables encapsulation of PCIe traffic. At the same time, USB-IF also foresaw the need for flexibility in transferring different amounts of power from the host to the device and vice versa. To this end, the USB-PD (Power Delivery) specification was also developed. The latest revision of USB-PD 3.1 supports power levels of 140W, 180W and 240W. The PD specification also allows power transfer from the host or device. All these features are enabled by a power delivery handshake process between the devices on either side of the cable. As power delivery standards evolve in both functionality and flexibility, there is a need in the market for devices that can provide users and developers with feedback on the PD handshake process and its results.

The USB Protocol Analyzer also includes support for analyzing the PD handshake process. Silicon developers and low-level hardware developers use them, but they are usually very expensive (because they also support high-speed data transfer tracing and debugging). The PD handshake process takes place at relatively low speed (~300 KHz) on the CC (control channel) wire and does not require high speed signal monitoring. There are many low-cost devices on the market that utilize the CC1 and CC2 pins to provide end users with information about the PD handshake process.



A power delivery sniffer should also monitor the V voltage and current.bus and Vcon pin. Advanced sniffers can inject power delivery packets or place termination resistors on CC pins. From a power measurement point of view, V is of interest.bus and Vcon. The former provides bus power to devices (and possibly circuitry in the cable itself). The voltage varies from 5V for typical USB 2.0 host/devices up to 48V for USB-PD scenarios. V.conOn the other hand, the is always set to 5V and can provide up to 1W of power to the circuitry inside the plug. These circuits can also be implemented with electronically marked cables or be accessories.

The pinout diagram above shows the D+ / D- differential pair used for USB 2.0 traffic only. An inline powered sniffer can choose to cut the path and eliminate the USB 2.0 data transfer path entirely. The same can be done for the TX/RX pair responsible for USB 3.x / USB4 / Thunderbolt 3+ high-speed data traffic. While there are some legitimate use cases that only allow power transfer over the USB cable, most users of inline power delivery sniffers want their data traffic unaffected. Unfortunately, the majority of low-cost sniffers on the market take the easy way out of completely ignoring the data transfer path.

ChargerLAB KM003C package contents and feature set

ChargerLAB / Power-Z KM003C is mainly marketed as a USB PD tester and comes in a nondescript box. The back label lists high-level specifications for supported voltage and current ranges, as well as fast-charging protocols. Contact details for support and business issues are also provided.

Inside the package is an aluminum storage box with the PD tester placed inside foam cladding for protection when the unit is not in use. The Type-C male port also has a protective cap. A QR code with links to ChargerLAB’s YouTube and Telegram channels is provided on the accompanying business card.

The ChargerLAB / Power-Z KM003C is an in-line device that sits between the downstream port (DFP) of the host and the upstream port (UFP) of the device. Both components can act as source and sink in terms of power delivery. It is used for tests such as voltage and current detection, power supply capability test, e-marker cable test, and fast charging protocol detection.

The KM003C itself is a cubic aluminum (dimensions 36.5mm x 35.5mm x 8.7mm, weight 16.5g) with Type-C male port as UFP and Type-C female port as DFP. Equipped with a brilliant 240 x 240 1.54 inch IPS screen, it provides real-time information on your V.busIbus, power consumption, charging protocol (if applicable), voltage of various lines in the connector. The product is also equipped with a Type-C HID port that can be used to connect with a PC for data recording or further analysis. The product has physical buttons that allow the user to navigate menus, set various test parameters, set the sampling rate, etc.



Physical buttons on KM003C (HID port is on opposite side of button)

The KM003C can perform some basic operations with power supplied via V.con However, it must be connected to a power source through the HID port for full-fledged operation. The typical power consumption of the KM003C by itself is about 75-250 mW. It also has a supercapacitor that allows for a safe shutdown (ensuring that in-flight data is flushed to permanent storage) and keeps the display active for about 5 seconds after power is removed.

ChargerLAB also bundles closed-source, Windows-only software for graphing and saving recorded parameters to a PC for further processing.

Comparison of ChargerLAB KM003C and Plugable USBC-TKEY

Google Twinkie/Plugable USBC-TKEY and ChargerLAB KM003C are conceptually similar in that both are USB PD sniffers/testers. However, this difference is evidence of the progress made in his USB space between 2014 and his 2022, and also reflects the evolution of end-user requirements in this space.

The main difference is in the power specifications. Google Twinkie / Plugable USBC-TKEY can only support up to 20V / 5A on V.bus The line is limited due to the limitations of the digital power monitoring ADC chip used. KM003C can support up to 50V / 6A (full USB-PD 3.1 specification, EPR up to 240W).

The use of the latest ADC chip improves the measurement accuracy of KM003C compared to 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 KM003C’s INA228 features a 20-bit ADC and a voltage measurement step size of approximately 0.2 mV. The INA228 also includes a temperature monitoring feature (available via API and KM003C display screen).

Twinkie is primarily designed for use with Chrome OS, so production versions such as the Plugable USBC-TKEY only support Linux. TotalPhase provides TP350110 Based on the same hardware as Twinkie. It comes with modified firmware and drivers that support both Windows and MacOS, plus extended APIs and custom data processing applications at a premium price. KM003C officially supports only Windows for connection via HID port, and the data processing software is also Windows only.

Twinkie / USBC-TKEY has a CLI shell that can be accessed via the USB serial port and has a specific set of commands (e.g. “two vbuses” and “Two Bukon” to read the voltage and current on Vbus and Vcon line, “Two parameters 1 parameter 2” To place a resistor on the CC line (Rp / Rd / Ra) etc.). The KM003C is accessible through the HID port and accepts commands, but these are custom encodings with no interpretation layer in between.

Twinkie/USBC-TKEY acts as a sink and injects power delivery packets to allow hosts/sources to negotiate different power delivery contracts. This is also available on the KM003C when using the cable simulation and charging protocol detection features, but (as far as I understand it) doesn’t appear to be exposed via the API.

Twinkie / USBC-TKEY can be setup or removed CC line resistance To configure connection ports as UFP or DFP. KM003C seems to have similar functionality For Rd only. Again, this doesn’t appear to be exposed via the API.

The next section describes the hardware design and software features. It then discusses API support and how to use the API on both Linux and Windows. After adjusting the direct attach storage flow to support power monitoring from both the USBC-TKEY and the KM003C, I recorded some results from both meters. Before jumping to conclusions, let’s compare some of these results.

Related Articles

Back to top button