-
1Build a USB PD protocol analyzer
Bill of Materials (BOM)
- Bluepill development board (with a STM32F103C8 MCU)
- Breadboard
- USB C intermediate connector
- LM393P dual comparator
- 3.3kΩ resistors (2pcs)
- 1kΩ resistor
- Wires
Additionally, a device is needed to program the Bluepill. This tutorial assumes you have an ST-Link programmer (or compatible)
Wiring
- On the breadboard, create this schematic (left part only)
- Connect it to the Bluepill board according to the STM32 F1 Family Pin Assignment (Monitor pins only)
- Connect the USB C intermediate connector to the breadboard (GND, CC1 and CC2). Note that CC1 and CC2 might be called A5 and B5.
Software
In the Arduino IDE:
- Install the library "USBPowerDelivery".
- Create a new sketch based on the example "USBPowerDelivery > Protocol Analyzer"
- Compile and upload it to the Bluepill
For more detailed instructions, see https://github.com/manuelbl/usb-pd-arduino/wiki/USB-PD-Protocol-Analyzer-for-5-USD
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.