DIY Pocket Sized PD Power Supply

by tobychui in Circuits > Electronics

661 Views, 3 Favorites, 0 Comments

DIY Pocket Sized PD Power Supply

project banner.png
DIY PD Powered Adjustable / Lab Bench DC Power Supply
banner english.jpg

Background Story

Recently I have been moving to a new city (again) for a new job position. I have been moving home for a few time in my life and since I have no family members living locally, every time I move I have to do all the hard-work myself, including moving my whole electronic workshop to a new location. It is fine for small parts or tools but for heavy, bulky things like my first (full sized) hotplate and DC power supply, I rather just give it to my local friends and buy a new one when I arrive to the new site.

That is why after this move, I have been thinking, would it be faster if I could shrink all my heavy tools in my workshop into something small and lightweight where I can just move them with me with a cardboard box next time I move?

That is why I am constantly replacing my tools with more lightweight, pocket sized options.

Why build your own?

I did saw a few great type C powered PD power supply out there, but most of them use fancy buttons and a MCU to control the output voltage. I really like their concept of having a fancy display to show real-time power usage statistic, but when I think about it, when I want to adjust the voltage or current output, instead of a fancy multi-layer menu, what I prefer is a much more simple options of knobs and buttons (lets call it the "Classic" type of power supply).

Currently on the internet, there are only two options

  1. High tech, fancy PD power supply that every time you want to change something, you need to navigate through layer of menus and apply the new settings
  2. Cheap but bulky AC powered power supply that provide you the classic experience of adjusting voltage and current, but well, it is heavy, large size and hard to move around.

So I decided to combine the good of both worlds, using the classic user experience design while integrating newer power supply design to use PD powered and make it as light weight and small as possible.


Supplies

As there are too many parts involved in this build, I would recommend you to use the included source file on my Github repo and open the part list / BOM list from the EasyEDA Editor. But here are a few important parts and supply required for building this power supply. Note this is not the full list of materials.


Basic Tools & Supplies

  1. 3D Printer
  2. Soldering tools
  3. Reflowing tools (e.g. a hotplate)
  4. Screws and screw drivers (M2 x 10)
  5. A 60W or 65W power supply that can output 20V @ 3A or above
  6. A high quality type C to C cable
  7. Power supply cable (banana plug on one end, and clip on the other end)


Major ICs and Parts for the PSU

  1. XL4015E (buck converter MOSFET & controller)
  2. ACS712-05B (current sensor)
  3. CH552G (E8051 MCU with Arduino compatibility)
  4. CH224k (20V PD trigger chip)
  5. Some mosfet, LDO, Opamps
  6. A bunch of tiny resistors and LEDs
  7. A PCB (1.6mm, color is optional)

The full list and PCB files can be found on my Github repo over here

https://github.com/tobychui/PD-Adjustable-DC-Power-Supply

Design & Send PCB to Print

Screenshot 2025-02-16 124754.png
Screenshot 2025-02-16 124811.png
Screenshot 2025-02-16 124827.png
Screenshot 2025-02-16 124843.png
overall.png

First, you might want to send the PCB to print. The PCB files can be found over here

https://github.com/tobychui/PD-Adjustable-DC-Power-Supply/tree/main/PCB

I am printing it with 1.6mm thickness and in white color just to make it easier to debug. But you can pick any color you want.

Usually, when designing a PCB, people will start with a circuit diagram of some sort, but since this project is quite simple and I am busy unpacking my stuffs, so I just hand drawn the circuit diagram with MS paint (see the last attached screenshot) and start the PCB design. It turns out quite well though?

Design & Printing the Case

Screenshot 2025-02-16 125143.png
Screenshot 2025-02-16 125212.png
Screenshot 2025-02-16 125154.png

After sending the PCB to print, you can start working on the case as the PCB printing is gonna take a while. After some 3D modeling and test-fitting, I created the v3 of the case (note the case versioning differs from the PCB).

After the design is done, you can start printing it with your preferred printer. I am using white PLA here but I guess if you got a 3D printer that can print ABS, that would be better for this application.

Assemble & Test the PCB

473270336_10223904128265949_1128264611539900217_n.jpg
Screenshot 2025-02-16 125800.png
Screenshot 2025-02-16 125928.png

After the PCB arrived, you can start assembling the PCB and populate it with SMD parts. As my youtube video shown, I prefer populating the board from the type C side to the output side. But it really depends on your tool and your preferences.

After populating the board, you can test if the parts are properly soldered with the following steps

  1. Plug your 60W PD power supply into the upper type C port (The one closer to the CH224K chip), if the white LED lights up, it means it is triggering correctly.
  2. Double check the trigger voltage by measuring the voltage at the VBUS and GND test pads as shown in the above screenshot. If the triggering is OK, you should be getting 20V here.
  3. Next, check if the 5V line are properly powered by the 78M05 LDO. The test pad location is shown on the other screenshot above. It should be next to the lower type C port and should be getting 5V when measured
  4. If both voltages are correct, you are ready to proceed to next step.

Install the PCB on the Base Plate

473031038_10223904718640708_3655494794044127794_n.jpg
473190478_10223904718840713_6150413144210484774_n.jpg
473072832_10223904719200722_5721464970343025540_n.jpg

There are 2 holes on the 3D printed base plate for the screw in terminal of the output jack. You can first bent the metal tab on the connector and screw in the terminal / jack to the 3D printed base.

Next, slide in the PCB into the gap between the metal tab connecting to jack and the 3D printed base as shown in the photo above.

Then, solder the tap directly on the PCB while trying your best to align the screw holes with the bottom plate. Sometime inserting a few long M2 screws into two of the screw holes on the base, poke through the PCB might help stabilize the location of the PCB while soldering the jack.

Afterward, you should get an assembled unit of the lower half of the power supply as shown in the above photo. Now, insert the OLED module into the 4 pin I2C connector and start flashing the firmware.

Install the Top Cover

DSC00285.JPG
DSC00336.jpg

The next step is install the top cover. The top cover can be screw in place with the bottom assembly with 6 M2 x 10 screws. It should look like what the above photo show after everything is correctly installed.

Flashing the Firmware

Screenshot 2025-02-16 130437.png
20250216_105008.JPG

You can get the firmware source code over my Github repo

https://github.com/tobychui/PD-Adjustable-DC-Power-Supply/tree/main/firmware


In simple words, you will need the Ch55xduino board definition installed before flashing it. See more about ch55xduino and Arduino IDE install guide here.

https://github.com/DeqingSun/ch55xduino


Flashing steps are pretty straight forward.

  1. Insert the PSU to your computer via the lower type C port (the one closer to the OLED module),
  2. Select the correct virtual COM port (or use USB mode upload, if your chip do not have bootloader / firmware pre-installed)
  3. Click "Upload"

After that, you should see the screen start refreshing and showing up real-time voltage / current data.

(Optional) Weight It!

473266934_10223904719480729_3086241677465084302_n.jpg

As my goal is to build a light weight, pocket sized power supply, I am curious to know the weight of it. So I put it on a kitchen scale and magic, it only weight 70 grams! Even with the PD power brick and cables it still weight less than 250 grams which is great for carrying around or even shipping it via postal services.


Your Pocket PD Power Supply Is Completed!

DSC00344.jpg
DSC00293.jpg
DSC00296.jpg
DSC00310.jpg
DSC00326.jpg
DSC00336.jpg
DSC00359.jpg

Now you got yourself a working PD powered pocket sized power supply for your next electronic projects!