Close
0%
0%

DIY USB-C PD Tools: Power Meter & Wi-Fi Logger

Measure voltage, current & power from any USB-C charger with an OLED meter or a Wi-Fi logger – both fully open source.

Similar projects worth following
USB-C Power Delivery (PD) can supply up to 100 W, making ordinary chargers a flexible power source for makers. The challenge: it’s not easy to see what voltage is negotiated, how much current flows, or how stable the supply is. This project offers two open-source tools: • Power Meter – a compact device with OLED display for instant readings of voltage, current, and power. • PD Logger – Wi-Fi enabled, serving a web interface with live values and long-term plots directly in your browser. Both share the same core: a PCB with USB-C connectors, measurement circuitry, and a microcontroller (STM32 with display, or ESP-01s with Wi-Fi). All design files—schematics, PCB layouts, 3D cases, and firmware—are on GitHub. PCBs can be ordered from JLCPCB, and the enclosures are ready to 3D-print. With these tools, a USB-C charger turns into a real lab companion.

USB-C Power Delivery (PD) has become the standard for powering phones, tablets, and even laptops. With voltages from 5 V to 20 V and power levels up to 100 W, a single USB-C charger can replace many traditional power supplies. For makers, this is a huge opportunity—if you have the right tools to measure and understand what’s happening.

This project presents two open-source devices that make USB-C PD transparent:

  • OLED Power Meter

    Shows voltage, current, and power on a small display. Plug it between charger and load, and you instantly see the values.

  • Wi-Fi PD Logger

    Connects to your network and serves a web interface. It displays live readings, logs data for hours, and generates plots of voltage, current, and power over time. Perfect for analyzing charger stability and load behavior.

Both tools share a common architecture: a PCB with USB-C connectors, a 50 mΩ shunt resistor, and an INA219 sensor for precise measurement. The Power Meter uses an STM32 microcontroller with OLED display, while the PD Logger is based on an ESP-01s Wi-Fi module.

To power the microcontroller, a step-down converter generates 3.3 V from any PD voltage. CC and VCONN lines are passed through unchanged to handle negotiation, so the devices work with standard USB-C chargers.

All production data is included in the GitHub repository: schematics, PCB layouts, 3D-printable cases, and firmware. The boards can be manufactured at JLCPCB (or any other PCB house), and the cases are designed in Fusion 360.

With these tools, you can transform an ordinary USB-C charger into a flexible lab companion—whether you just need quick measurements or long-term power logging.

🔧 Technical Features

  • Voltage range: 5 V – 20 V (depending on charger PD profile)
  • Current measurement: via 50 mΩ shunt, resolution ~1 mA
  • Power calculation: real-time from voltage × current
  • Measurement IC: INA219 over I²C
  • Microcontrollers:

    • STM32F0 (OLED Power Meter)
    • ESP-01s (Wi-Fi PD Logger)
  • Display: 0.96” OLED (I²C, Power Meter only)
  • Logging: PD Logger stores several hours of data in local flash
  • Web interface: live values updated every 5 s; plots for voltage, current, and power
  • Data export: CSV file download from PD Logger
  • Enclosures: 3D-printed, designed in Fusion 360
  • PCB source: Gerber files provided; tested with JLCPCB fabrication

  • Video Walkthrough

    Ludwin09/11/2025 at 13:17 0 comments

    Sometimes it’s easier to see a project in action than just read about it. I recorded a detailed video that walks through the design, assembly, and usage of both devices: the OLED Power Meter and the Wi-Fi PD Logger.

    In the video you’ll see:

    • how the PCBs and 3D-printed cases fit together,
    • how the Power Meter shows live values on its display,
    • how the PD Logger serves a web interface and logs data,
    • and some example measurements while charging real devices.

    👉 Check out the full walkthrough in the embedded YouTube video below.

  • Using the PD Logger

    Ludwin09/11/2025 at 13:10 0 comments

    Once assembled and flashed, the PD Logger is very straightforward to use.

    1. Connect it between a USB-C charger and the device you want to power. In this example, I tested it while charging a tablet.
    2. As soon as the charger negotiates with the load, the PD Logger powers up and joins the local Wi-Fi network.
    3. Open a browser and go to pd-logger.local (or the device’s IP address). You’ll see a simple web page that shows the current voltage, current, and power. The values update automatically every 5 seconds.

    But the Logger can do more than live readings. All measurements are stored locally for several hours. By opening the /graphics page in your browser, you get interactive plots for voltage, current, and power over time.

    This makes it easy to analyze charger stability, load behavior, and even spot small fluctuations. The Y-axis auto-scales, so sometimes the variations look dramatic—but a closer look at the scale often reveals that the changes are tiny.

    Finally, the Logger also provides a CSV export button, so you can download the data and analyze it further in tools like Excel or Python.

    With this setup, any USB-C charger becomes a transparent, measurable power source—and all you need to access the data is a web browser.

  • Designing and Printing the Case

    Ludwin09/11/2025 at 12:53 0 comments

    The enclosures for both devices were designed in Fusion 360. The design is intentionally simple: two shells and a small insert, which together hold the electronics securely in place.

    I wanted the cases to be not only functional but also practical for repeated use. Instead of using fragile plastic clips, the design relies on M2 screws to close the enclosure. To make this possible, M2 nuts are embedded during the print. The print is paused at just the right height, the nuts are inserted into the cavities, and then the print continues. This creates durable threads that can handle many assembly cycles.

    The models are included in the GitHub repository and can be 3D-printed on any FDM printer. PLA works fine, but PETG is more robust if you expect frequent handling.

    This approach keeps the assembly straightforward: slide in the electronics, close the case with four screws, and the device is ready to use.

  • System Architecture

    Ludwin09/11/2025 at 12:37 0 comments

    Here’s a high-level schematic of how the measuring devices are built. At the core, the design is simple but effective:

    • USB-C plug and receptacle

      The device sits in-line between the charger and the load. All essential signals are passed through so the load can negotiate properly with the charger.

    • CC and VCONN lines

      These are carried from input to output to maintain proper Power Delivery negotiation.

    • VBUS shunt resistor

      A small 50 mΩ resistor is inserted into the VBUS path. By measuring the voltage drop across it, we can calculate the current flowing to the load.

    • Step-down converter

      Converts the charger voltage (5–20 V) into 3.3 V, powering the electronics regardless of the PD profile.

    • INA219 measurement chip

      Handles accurate voltage and current measurement over I²C.

    • Microcontroller

      Either an STM32 (for the OLED Power Meter) or an ESP-01s Wi-Fi module (for the PD Logger).

    • Optional display

      The OLED Power Meter uses a small I²C display to show live data. The PD Logger skips the display and instead serves a web interface.

    This modular architecture allowed me to build two different tools from the same foundation—one optimized for quick bench checks, the other for long-term monitoring and logging.

  • Handling CC and VCONN in USB-C

    Ludwin09/11/2025 at 12:31 0 comments

    When working with USB-C Power Delivery, the CC (Configuration Channel) and VCONN pins are critical. They are used during negotiation to select the voltage and current profile that the charger provides. Without them, PD simply won’t work.

    There’s a catch, though:

    • A standard USB-C cable only forwards one of the two CC lines, depending on how the plug is inserted.
    • The USB-C specification doesn’t require both CC pins to be passed through. That means if you just connect a charger through an ordinary cable, you can’t expose both CC/VCONN signals to your circuit.

    For devices like my Power Meter and PD Logger, this is a problem. Both gadgets need to make the CC/VCONN lines available at their output port, so the downstream device can negotiate properly with the charger.

    The solution: instead of relying on a regular cable, I mount a male USB-C plug directly on a small daughter PCB that connects straight into my circuit. This way, both CC/VCONN lines from the charger side are routed to the output connector. The result is full compliance with USB-C PD negotiation, regardless of plug orientation.

    This small design choice turned out to be essential for making the tools reliable and universally compatible with different chargers.

  • From Idea to Two USB-C PD Tools

    Ludwin09/11/2025 at 12:09 0 comments

    I started this project because I often use USB-C chargers in my maker builds. They are compact, powerful, and everywhere. But I quickly realized one big limitation: I had no clear way to measure what was really going on.

    • Which voltage profile did the charger negotiate?
    • How much current was actually flowing?
    • Was the power stable over time?

    Commercial USB-C testers exist, but most are closed-source and not easily hackable. So I decided to make my own tools.

    In the end, I built two different devices:

    • The OLED Power Meter – simple, compact, and with instant readout of voltage, current, and power.
    • The Wi-Fi PD Logger – no display, but logs data for hours and serves live plots in a browser.

    Both share the same core: a PCB with USB-C connectors, a shunt resistor, and an INA219 measurement chip. The Power Meter is based on an STM32 microcontroller, while the Logger uses an ESP-01s with Wi-Fi.

    What surprised me the most was how quickly these tools became part of my everyday bench setup. I use the Power Meter when I just want a quick look, and the Logger when I want to study a charger’s behavior over time.

    All the resources are available in the GitHub repository: schematics, PCB files, firmware, and 3D-printable cases. If you’ve got a USB-C charger and a 3D printer, you can build your own too.

    Next, I’ll add some detailed build logs with photos and sketches from the design process. Stay tuned!

View all 6 project logs

  • 1
    Assembling the Power Meter and the PD Logger

    Building the devices is straightforward. Each consists of a main PCB, a small daughterboard with the male USB-C plug, and a 3D-printed case.

    🔹 Power Meter (with OLED display)

    • The main board carries the STM32 microcontroller, measurement circuitry, and power supply.
    • The male USB-C plug is mounted on a small PCB and connected to the main board using a 6-pin angled header.
    • The OLED display is plugged onto the main board and soldered via pin headers.
    • Finally, the electronics slide into the 3D-printed case, which can be closed with screws.

    🔹 PD Logger (Wi-Fi enabled)

    • The main board includes the measurement electronics and power supply.
    • As with the Power Meter, the male USB-C plug is on a small board and connected with a 6-pin angled header.
    • Instead of a display, the PD Logger uses an ESP-01s module, soldered directly onto the board.
    • Assembly is completed by fitting everything into the 3D-printed enclosure and fastening it with screws.

    Both cases were designed in Fusion 360 and are included in the GitHub repository. Printing requires pausing at a specific height to insert small nuts, which later allow the cases to be screwed shut.

    The PCBs were fabricated at JLCPCB, and all production files are available in the GitHub repository if you want to order your own.

    With the boards soldered and the cases assembled, the tools are mechanically complete. The next step is to flash the firmware.

  • 2
    Uploading the Software

    Both devices require firmware before they can be used. The source code is included in the GitHub repository and is built with PlatformIO inside VS Code.

    • OLED Power Meter (STM32):

      The STM32 microcontroller is programmed via an ST-Link adapter. A dedicated header on the PCB allows flashing even after the MCU is soldered in.

    • PD Logger (ESP-01s):

      The ESP-01s is flashed with a common USB-to-serial adapter. During programming, it must be powered from a USB-C charger with a device attached on the output port, so PD negotiation starts. Besides the firmware, the web interface files also need to be uploaded into LittleFS.

    Once the software is uploaded, both devices are ready to run. The Power Meter shows live values on its display, while the Logger can be accessed from any browser in your network at pd-logger.local.

View all instructions

Enjoy this project?

Share

Discussions

erffrfez wrote 10/05/2025 at 13:14 point

suggest add the link to the github location in the initial description, not save it until (is it almost the very) end of the text (only place I could find the link was in the last shown "log")

  Are you sure? yes | no

Ludwin wrote 10/05/2025 at 14:40 point

thank you for your hint. I have included the GitHub link in the project description.

  Are you sure? yes | no

Does this project spark your interest?

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