Skip to the content
2 layers11.5 × 16 mmUSB plug, the printed circuit board in 3D

This repository contains two DIY gadgets to monitor and log USB-C Power Delivery (PD). Both devices are designed to be easy to build, hackable, and useful for makers who want to explore USB-C PD.

Size
11.5 × 16 mm
Copper layers
2
Thickness
1.6 mm
Parts
4
Nets
21
Pads
37
Tracks, vias
107, 7
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
30 Aug 2025
Updated
9 Feb 2026

Overview

USB plug is an open-source printed circuit board by lhm0, from the lhm0/pd_logger repository on GitHub. It is a 2-layer board of 11.5 × 16 mm with 4 parts on 21 nets, routed with 107 tracks and 7 vias.

Its parts include 2 ICs and 2 connectors.

README

readme.md

USB-C Power Delivery Measurement Tools

This repository contains two DIY gadgets to monitor and log USB-C Power Delivery (PD).
Both devices are designed to be easy to build, hackable, and useful for makers who want to explore USB-C PD.

Update 01.01.2026: MQTT implemented

I was asked by @simonsayshomeassistant whether PD Logger could be connected using MQTT. The answer was "no", but I really liked the idea and therefore implemented the MQTT feature today.

I have added a MQTT button to the web interface:

DIY Power Meter

It starts the MQTT configuration page, which looks like this:

DIY Power Meter

Please note: I have tested MQTT with test.mosquitto.org and with a local mosquitto server. From what I see, it all works fine. However, I have not tested with home assistant, simply because I do not have home assistant and know just little about it. Please provide feedback!

Best regards, Ludwin


✨ Features

  • DIY Power Meter
    Small device with an OLED display showing voltage, current, and power in real time.
    Powered by an STM32 microcontroller.

  • PD Logger
    Wi-Fi enabled device based on ESP-01s.
    Logs voltage, current, and power for several hours and serves interactive plots in any web browser.


📷 Devices

Power Meter

DIY Power Meter

PD Logger

PD Logger

🛠️ How it works

  • USB-C connectors: male on the input side, female on the output side.
  • CC & VCONN lines are passed through to handle PD voltage negotiation.
  • Shunt resistor (50 mΩ) allows precise current measurement.
  • INA219 sensor measures voltage and current via I²C.
  • Step-down converter generates 3.3 V from 5–20 V input.
  • MCUs: STM32 with OLED display (Power Meter), ESP-01s with Wi-Fi (PD Logger).

📦 Hardware

  • Schematics & PCB files → in this repo (/electronics)
  • PCBs manufactured by JLCPCB
  • 3D printable cases → in /mechanics
  • Firmware → in /software

All production data is included in /electronics so you can order, print, and build your own devices.


🌐 Usage

  • Power Meter: plug between charger and device → read values on the display.
  • PD Logger: connect to your local Wi-Fi, then open http://pd-logger.local → see live values.
    • Update interval: 5 seconds
    • Logging capacity: several hours
    • Data download as CSV file
    • Interactive plots for Voltage / Current / Power over time

📄 License

This project is licensed under the
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.

You are free to share and adapt the material, for non-commercial purposes only,
as long as you provide proper attribution and distribute your contributions under the same license.

For details, see the LICENSE file.


🙌 Acknowledgments

Parts

4
QtyValueFootprintReferences
2~my_footprints:JLC_tooling_holeU1, U2
1Conn_01x06_Pinmy_footprints:header_01x06J1
1USB_C_Plugmy_footprints:C168690P1

More from lhm0/pd_logger

2
  • 2 layers30 × 49.3 mmUSB PD monitor V1, the printed circuit board in 3D

    USB PD monitor V1

    lhm0/pd_logger

    This repository contains two DIY gadgets to monitor and log USB-C Power Delivery (PD). Both devices are designed to be easy to build, hackable, and useful for makers who want to explore USB-C PD.

    34 parts82
  • 2 layers16 × 52 mmUSB PD monitor ESP01s, the printed circuit board in 3D

    USB PD monitor ESP01s

    lhm0/pd_logger

    This repository contains two DIY gadgets to monitor and log USB-C Power Delivery (PD). Both devices are designed to be easy to build, hackable, and useful for makers who want to explore USB-C PD.

    25 parts82

Similar boards

  • 2 layers18.5 × 26 mm24g2usb rp2350zero, the printed circuit board in 3D

    24g2usb rp2350zero

    joypad-ai/joypad-os

    Universal controller firmware for building adapters, dongles, and custom controllers.

    4 parts1.7kApache-2.0
  • 2 layers116 × 33 mm966595-1 and 963356-1, the printed circuit board in 3D

    966595-1 and 963356-1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    4 parts1.2k
  • 2 layers19 × 18 mmDaughter board, the printed circuit board in 3D

    Daughter board

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    4 parts915
  • 2 layers24.8 × 24.8 mmNrf24 breakout, the printed circuit board in 3D

    Nrf24 breakout

    tardate/LittleArduinoProjects

    a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

    4 parts803MIT
  • 2 layers26 × 20 mmCap chain, the printed circuit board in 3D

    Cap chain

    drandyhaas/KiCadRoutingTools

    A set of Python/Rust tools to aid routing in KiCad

    4 parts744MIT
  • 2 layers34.7 × 20 mmXG Station Power MSI, the printed circuit board in 3D

    XG Station Power MSI

    osy/XG_Mobile_Station

    Open source eGPU dock for ROG Ally and ROG Flow

    4 parts712CC-BY-4.0
  • 2 layers20.3 × 24.5 mmJack power input, the printed circuit board in 3D

    Jack power input

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    4 parts546MIT

Questions

How big is the USB plug PCB?

It measures 11.5 × 16 mm and has 2 copper layers, 1.6 mm thick.

What parts does the USB plug use?

4 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the USB plug KiCad files?

From the lhm0/pd_logger repository on GitHub, at the commit this page was made from: the board is electronics/USB_plug/USB_plug.kicad_pcb and its schematic electronics/USB_PD_monitor_ESP01s/MCU.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the USB plug design in my own project?

Its repository states no licence, so its author keeps all rights: ask lhm0 before reusing the design.