Hardware Design and Software Interface

The internal layout of all USB-PD sniffers is quite similar. A microcontroller acts as the control center (interfacing with the data monitoring host and tapping into the CC lines). Power monitoring ADCs (TI INA family in most cases) are placed on the VBUS and VCONN lines after placing a shunt resistor in the path. These INA chips interface with the microcontroller over an I2C bus. The schematic for the Twonkie 2.0 (a Twinkie clone with updated components that is easier to prepare for DIY folks) is reproduced below.


Twonkie 2.0 Schematic - STM32F072 + 2x INA237 + 2x 12 mOhm Shunt Resistors

The Google Twinkie / USBC-TKEY differs only slightly from the above schematic, with 2x INA231 power monitoring ADCs in place of the 2x INA237. There are multiple resistors in the CC observation path, and these enable the placement and removal of the Rp / Ra / Rd from the Twinkie's CLI. The STM32F072 microcontroller has a Cortex-M0 CPU running at 48 MHz, 128KB of flash memory, and a 16KB SRAM.

The ChargerLAB KM003C's structure is likely to be similar to the above. Based on the photograph of the KM002C's PCB (the KM003C is an updated version with a larger screen, gravity sensor, and a supercapacitor), the main differences appear to be the use of a Huada HDSC HC32F460 microcontroller, multiple INA228 ADCs, and 20 mOhm shunt resistors.


KM002C PCB, with the TI INA228 ADC boxed in red

The HC32F460 is a highly advanced microcontroller compared to the STM32F072. It has a Cortex-M4 CPU (with floating point support) running at 200 MHz, 512KB of flash memory, and 192KB of SRAM. This allows the implementation of a fairly complicated user interface with built-in real-time graphing capabilities - features that are not present in the original Twinkie design. We believe that the KM003C includes at least 5 ADCs in order to measure the voltage on both CC lines as well as the D+ and D- lines (in addition to the VBUS). Voltage measurement on the D+ / D- pins is apparently necessary in order to detect and support custom fast-charging protocols, as indicated in the table below from the KM003C's user manual.

One of the bugs in the KM003C hardware design that has been acknowledged by ChargerLAB is the absence of support for USB 2.0 data passthrough. It is likely that the voltage monitoring on these lines for fast charging protocol detection purposes is breaking the data lines for normal operation. It is an unfortunate side-effect that hopefully gets fixed by ChargerLAB in the next hardware iteration.

On-Device Interface

Moving on to the external hardware aspects, the KM003C is equipped with a vibrant 240 x 240 1.54" IPS screen and four physical push buttons. These allow the user to navigate through the various on-screen options for activation of different features, and also include special signals to modify certain settings quickly (such as a long press on the 'Confirm' button to alter the sampling rate when the dashboard screen is active). The gallery below presents the various features available via the device screen.

After power up (and showing an optional startup image set up through the PC software), the screen lights up with the dashboard that provides important information at a glance - the voltage, current, and power consumption inferred from the parameters on the VBUS line, the charging protocol (if applicable), and voltages on the CC and D+/D- lines. The next interface is the application screen from which the charging protocol support detection can be triggered. This involves ensuring stable power supply through the HID port and connecting the Type-C male port to the power supply of interest. The female port should be left unconnected. Under this option in the interface, it is possible to trigger cable simulation (by selecting 'No e-marker'), request for a specific PD type (after selecting 'Auto'), and scan for different charging protocols support. Yet another option under the application screen is 'Modules'. Under this, various value-adds such as USB-C cable e-marker reading, and Apple charger genuineness checking are currently available. ChargerLAB plans to add testing for cable resistance also in the future.

Under the Settings screen, the display brightness and startup screen can be adjusted. Storage management options are also available. Language settings (Chinese or English) and device information, as well as the option to reset all settings to default can all be accessed from the same screen.

The real-time curves interface allows the user to view the voltage / current on the VBUS line, or the voltages on the D+ / D- lines, or the voltages on the CC1 / CC2 lines as a function of time. The screen also helpfully notes the sampling rate on the top left corner. The data storage interface records the charge and energy values from the INA ADC chip for the VBUS line. The save interval is configurable and the starting and stopping of the recording can be triggered based on the current in the line. Up to 40 different data sets of 10000 points each can be stored in the 4MB of memory available in the device.

PC Software Features

ChargerLAB provides a Windows application that can be used to manage multiple USB power testers from a single pane. Our evaluation was with a single KM003C in the list, which is displayed on the left in the interface. The application starts up with a 'Data Recorder' view. The top part of this view has all the parameters present in the on-device screen's dashboard interface, while the bottom part has a real-time chart (with the available parameters on either side of the title). On the right side, a button to trigger the chart updates is available. The sampling rate can also be adjusted. Available rates are 1, 10, 50, and 1000 samples per second. The cache depth on the PC side is also configurable.

The software interface language can be modified from the triangular drop down on the top right near the window controls. However, some options continue to remain in Chinese even after the language is set to English. However, the software is intuitive enough for that to not be too much of a concern. The device firmware, as well as the application itself, can be updated from within the program. The 'PD Analyzer' view shows a real-time view of the various voltages and currents, along with a tabular view of the PD handshake process. Various other options such as saving graphs, recording data to a CSV or SQLite DB on the PC, etc. are available, as shown in the gallery above.

Open APIs

The Windows application is closed-source, but ChargerLAB provides some documentation in their HID Demo archive. The document is in Chinese, but I used Google Translate to get an inkling of the contents. From previous reviews, I have found that links often go stale. In order to avoid that with the KM003C API description, a screenshot of the translated version is provided below.


Click for a higher-resolution version of the API document

It is possible that ChargerLAB might update the APIs in the future. In that case, the latest version can be obtained from the FAQ section on their support page. ChargerLAB states there are three interfaces available - as a WinUSB (vendor specific interface) device, a HID device, or a virtual serial port (CDC). The next couple of sections take a look at how these interfaces can be taken advantage of in different operating systems.

Introduction and Product Impressions API Access on Linux
Comments Locked

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)overpriced
  • Threska - 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

Log in

Don't have an account? Sign up now