USB-C PD (Power Delivery) Sink for Voltage Selection over I2C with Arduino Nano and Adafruit HUSB238 Breakout Board
USB-C Power Delivery (PD) is a fast-charging technology that enables USB-C devices to deliver and receive higher levels of power, up to 100 watts. This allows for quicker charging times and the ability to power larger devices like laptops. Additionally, it supports dynamic power negotiation between connected devices, optimizing power delivery based on their needs. This tutorial explores Adafruit USB Type C Power Delivery Dummy Breakout with HUSB238.
Setting Up Adafruit USB Type C Power Delivery Dummy Breakout
This video demonstrates how to set up the Adafruit USB Type C Power Delivery Dummy Breakout with the Hynetek HUSB238 Sink chip. Using an Arduino Nano clone and an appropriate Arduino sketch, the chip will be configured over I2C (address 0x08) to negotiate 5V, 9V, 15V, and 20V from a Lenovo ThinkPad USB-C PD power supply.
The same setup can be achieved on any other microcontroller that supports the Arduino ecosystem, including Raspberry Pi Pico or ESP32 development boards. Please note that although the HUSB238 chip also supports sinking 12V and 18V, the power supply used in the demo as a source doesn't offer these voltages.
Source Code and Libraries
The source code of the Arduino sketch is based on the Adafruit_HUSB238 library. The example Arduino sketch is available on GitHub.