Firmware & Hardware - GitHub

PD240W is an open-source, adjustable power supply designed to leverage the modern capabilities of USB-C Power Delivery (PD 3.1). While it fits in the palm of your hand, it is capable of negotiating up to 48V at 5A (240W), effectively turning high-power GaN chargers into fully programmable laboratory bench power supplies.

Built around the Raspberry Pi Pico (RP2040), this device bridges the gap between smart USB chargers and raw DC power requirements. While originally designed for testing motor drives in the field, it serves as an excellent general-purpose portable lab supply.

Key Features High Power Capability: 

  • High Power Capability: Supports PD 3.0 and PD 3.1 EPR (Extended Power Range), allowing negotiation of Fixed, PPS (Programmable Power Supply), and AVS (Adjustable Voltage Supply) profiles up to 48V. 
  • Precision Control: Adjustable current limiting (10mA - 5A) and voltage tuning via a rotary encoder. 
  • Rich UI: Features a 240x320 IPS display with anti-aliased fonts, providing real-time feedback on voltage, current, power, and thermal status. 
  • Safety First: Includes hardware overcurrent protection, overtemperature monitoring (NTC + internal sensors), and interrupt-based safety cutoffs. 
  • Motor Drive Specialized: Features a dedicated 17V Buck Output to simulate STO/SBC (Safe Torque Off) voltages for motor controller testing.

Firmware & Software

The firmware is written in C++17 using the Pico SDK 2.2.0. It utilizes a custom non-blocking event loop architecture to handle the UI, PD negotiation, and safety checks simultaneously. 

Notable Software Features: 

  • Auto PPS Tuning: A closed-loop control system that actively measures the output voltage and adjusts the PPS request to compensate for cable drop and charger inaccuracies. 
  • Persistent Settings: User preferences (brightness, sounds, default limits) are stored in flash with CRC32 validation. 
  • EEPROM Workflow: An on-device utility to flash and configure the TPS26750 EEPROM directly from the menu.

Current Status & Limitations

  • Valid: USB-PD 3.0 (up to 20V) and PPS modes are fully tested and working. 
  • Experimental: USB-PD 3.1 EPR (28V, 36V, 48V) functionality is implemented but need validation. 
  • Errata: The current PCB revision requires a simple manual fix (crossing D+/D- lines) to enable native USB data communication with the RP2040, though power negotiation works without this.

Open Source

This project is open source. The Gerbers, BOM, Pick & Place, 3D printable enclosure files (STL), and firmware source code are available on GitHub.

Acknowledgements

This project was supported by Synapticon GmbH.

Inspiration was drawn from the PocketPD by CentyLab and ProtoV MINI by Alex Xia.