-
1Assembling 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.
-
2Uploading 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.
- OLED Power Meter (STM32):
Ludwin
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.