https://github.com/tobychui/pd-adjustable-dc-power-supply
A DIY, USB PD powered, pocket sized adjustable DC / lab bench power supply for electronic makers
https://github.com/tobychui/pd-adjustable-dc-power-supply
Last synced: about 2 months ago
JSON representation
A DIY, USB PD powered, pocket sized adjustable DC / lab bench power supply for electronic makers
- Host: GitHub
- URL: https://github.com/tobychui/pd-adjustable-dc-power-supply
- Owner: tobychui
- License: mit
- Created: 2025-02-16T03:46:34.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-13T03:45:32.000Z (3 months ago)
- Last Synced: 2025-04-11T03:14:15.386Z (about 2 months ago)
- Language: C
- Size: 39.9 MB
- Stars: 65
- Watchers: 4
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# PD Adjustable DC Power Supply
A DIY, USB PD powered, pocket sized adjustable DC / lab bench power supply for electronic makers
I also made a pocket size reflow hotplate for automatically reflowing SMD components. See [here](https://github.com/tobychui/MCH-PD-Automatic-Reflow-Hotplate) for more details on how to build one. These two pocket size devices have the same footprint so they can be stacked in your portable tool box!
### Specifications
| Item | Value | Remarks |
| ---------------- | ------------------------------------------------------------ | ---------------------------------------------------- |
| Power Input | USB PD (type C) 60W at 20V 3A | Refer to CH224K datasheet for trigger specifications |
| Power Output | Adjustable DC (2V to 20V), max 4A or 50W | Refer to XL4015E datasheet for specification |
| Dimension | 10cm x 5.2cm x 1.9cm (without knobs)
10cm x 5.2cm x 3.3cm (with knobs) | Adj. Knobs are replaceable |
| Output Mode | Constant Voltage (CV) / Constant Current (CC) | |
| Display Size | 0.91 inch OLED | |
| Display Accuracy | +/- 0.02V and +/- 0.05A | Refresh rate @ 1Hz |
| Data Output | Real-time voltage and current usage in csv format | Can be viewed via Arduino IDE serial graph plotter |### Photo




### Setting a Current Limit
Here are the steps to set the current limit on the PD power supply
1. Reduce both the output voltage and current to the lowest by rotating the knobs anticlockwise
2. Short the output positive and negative terminal. Now, the power supply should automatically switch into CC mode.

3. Slowly increase the current output by rotating the current knob (left knob) clockwise until a desired current is reached
4. Release the shorted terminal, now the power supply should automatically switch back to CV mode.
5. Increase the voltage until the target voltage output is reached.
### Folder Structure
- Firmware: The CH552G firmware for the real time information display
- PCB: The Gerber files and EasyEDA source file (which you can generate part lists / BOM from the online editor if needed)
- 3D Model: The 3D model for the case
- Schematic: A hand drawn circuit diagram (as this is a simple project, I directly starts with a PCB file instead of first drawing a schematic)
- Photo: Some photo shoot of the finalized product### Firmware Flashing
The firmware used by this PD power supply requires Arduino IDE with [CH55xduino](https://github.com/DeqingSun/ch55xduino) installed. There are no external dependencies except the above board library.
**The firmware code is designed for 0.91 inch single color OLED module running over I2C mode only**. Other display module will not work.
To flash the firmware, connect to the power supply via the lower USB port (the one closer to the display ). The CH552G has internal USB host that do not require an external USB to UART chips like CH340. If you have the CH55xduino correctly installed, your computer should detect an unknown USB device (before firmware flashing) or a virtual serial port (after firmware flashed) where you can use as a COM port to flash new firmware.
### License
- Code: MIT
- Hardware and 3D model designs: CC BY-NC-SA