Close
0%
0%

Dr. PD

A fully featured, open-source USB Power Delivery protocol/power analyzer and programmable sink for testing, logging, and debug.

Similar projects worth following
If you’ve ever used USB Power Delivery in one of your projects, you know how useful it can be. USB-C power supplies are flexible, cheap, and easy to source, and adding PD support to a design is often as simple as dropping in a controller that negotiates the profile you need.

The problem is that these controllers are usually black boxes. When something goes wrong, or when you want to characterize a charger or source, you often get almost no visibility into the negotiation itself. Until now, the usual alternative has been analyzers that cost thousands of dollars.

Dr. PD is an open-source USB-C Power Delivery analyzer and programmable sink built to close that gap. It lets you inspect PD traffic in real time, correlate it with VBUS voltage and current, and test supplies by requesting specific profiles, including SPR, EPR, PPS, and AVS up to 48 V, 5 A, and 240 W.

Dr. PD is an open-source USB-C Power Delivery analyzer and programmable sink. It can sit inline between a USB-PD source and sink to show you the communication between them, or connect directly to a source and emulate a sink so you can characterize chargers and power supplies.

The goal of the project is to make serious USB-PD analysis more accessible. The hardware, firmware, and host software are all open source. The control software runs locally in Chrome or Edge with no drivers or installation required, and the platform also provides Python, JavaScript, SCPI, and USBTMC interfaces for automation.


Want your own? Dr. PD will be crowdfunding soon. Follow the project page on Crowd Supply and sign up for updates!


What it does

  • Captures and decodes USB Power Delivery traffic in real time

  • Measures and plots VBUS voltage and current alongside protocol events

  • Correlates PD messages with live power behavior

  • Supports SPR, EPR, PPS, and AVS modes up to 48 V / 5 A / 240 W

  • Acts as a programmable sink for source characterization and fault injection

  • Provides triggering, search, annotation, and export tools for long captures

  • Works with a browser-based UI, terminal tools, and industry-standard automation libraries (USBTMC, SCPI, Python)

Why it exists

USB-C Power Delivery is powerful, but debugging it is often painful. The chips used to add USB-PD support to products usually expose very little about what is happening internally. Many power supplies also support capabilities beyond what common interface chips make easy to access, and characterizing source behavior, especially with battery-powered supplies, can be difficult.

The usual alternatives are either sniffing traffic with an oscilloscope or logic analyzer, or using a dedicated USB-PD analyzer. The first approach is fiddly and makes it hard to correlate protocol activity with analog behavior like voltage and current. The second often means buying tools that cost hundreds or thousands of dollars.

Dr. PD is meant to fill that gap by providing professional-grade USB-PD analysis in a fully open-source instrument that is capable, transparent, repairable, and free from proprietary lock-in.

Highlights

  • Inline USB-C analysis with synchronized power measurements

  • Programmable sink mode for charger and source testing

  • Support for modern USB-PD revisions, including EPR

  • Browser-based control software with no installation required

  • Automation-friendly interfaces including SCPI, USBTMC, Python, and JavaScript

  • Open-source hardware, firmware, and software

Current status

Dr. PD is currently at the DVT stage. The hardware and software are working, and the system is now undergoing testing and verification. Follow the project for updates as the design progresses and we start sharing demos, and don't forget to sign up for our upcoming crowdfunding campaign!

  • The curiously complex taxonomy of USB plugs

    Marco Tabini14 hours ago 0 comments

    Dr. PD is crowdfunding soon! Sign up at our prelaunch page on Crowd Supply to receive product updates.


    In the last decade or so, USB-C has become the dominant standard for power and data transmission. Despite the occasional attempt at proprietary formats (Lightning, anyone?), practically every device these days comes with the ubiquitous rounded port.

    Without a doubt, this success is well deserved: USB-C cables are easy to acquire and inexpensive, compatible power supplies can be had for less than the cost of an espresso beverage, and inserting a plug into a receptacle does not require a degree in quantum physics.

    These capabilities, however, come at a cost. USB-C receptacles and cables are surprisingly complex, and designing hardware around them can be challenging even if you decide to use off-the-shelf parts.

    Anatomy of a USB-C port

    Let's start by looking at a “full” USB-C port and its signals:

    Let's go through these in detail:

    • GND and VBUS carry power to and from a device. By default, only 5V is available, with analog signaling on CC1 and CC2 used to advertise or detect up to 3A of current. By using Power Delivery, however, devices can negotiate various voltage and current combinations up to 48V and 5A—a whopping 240W of power.
    • CC1 and CC2 can be used for four (!) purposes:
      • By manipulating the analog characteristics of these lines, a device can advertise 5V at either 500mA, 1.5A, or 3A without the need for more advanced digital negotiation. Default USB current corresponds to the legacy USB current level, typically 500 mA for USB 2.0 or 900 mA for USB 3.x.
      • One of the two lines can be used to provide VCONN, a special 5V power rail capable of providing up to 1W of power that can be used to power accessories independently of VBUS. This is useful because an accessory may need 5V to function, but then request a higher (or lower) voltage to be delivered on VBUS to power some of its peripherals or another device. Notably, VCONN does not normally pass through the cable end-to-end; it is used to power circuitry in the cable or plug assembly and is typically not presented as a usable rail at the far end.
      • The other line can be used for Power Delivery signaling. By using a dedicated serial protocol, devices can exchange information, negotiate a power contract to deliver a voltage different from the standard 5V alongside specific power and current capabilities, or enter Alternate Modes that repurpose some of the data lines in the cable for something other than ordinary USB communication. For example, monitors use an Alternate Modes to receive video data from a host device.
      • Because each line takes on a different role, their relative position is used to determine the orientation of the cable in the receptacle.
    • The SBU pins are used for “sideband” data. They provide an independent low-speed (up to 1MHz) channel that can be used for custom out-of-band communication between compatible devices. For example, DisplayMode Alternate Mode uses them for AUX signaling, and USB4 can also use them for sideband functions during link management and initialization.
    • D+ and D- are traditional USB 2.0 data lines. These represent a single differential pair and run as a twisted pair inside the physical cable, and are capable of serial speeds up to 480Mbps.
    • TX+, TX-, RX+, and RX- are SuperSpeed differential pairs. In a full-featured USB-C connection, these high-speed pairs can be used for protocols such as USB 3.x, USB4, Thunderbolt, or Alternate Modes. In the newest USB4 mode, the total link rate can reach 80 Gb/s symmetrically or 120 Gb/s in one direction with reduced bandwidth in the other. As I mentioned above, these lines can also be repurposed to carry non-USB data through Alternate Modes.

    If this seems complicated… well, it is. A good, if somewhat reductionist, way of looking at how all these lines relate to each other is:

    • D+ and D− are legacy USB 2.0 data lines. They are...
    Read more »

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates