DIY Mini Lab Power Supply




Introduction: DIY Mini Lab Power Supply

About: I am a DIY hobbyist by passion and Power Engineer by profession. Most of my works are related to Solar Energy and Arduino. Apart from Electronics I love 3D printing, Woodworking and to make crafts from used …

A bench power supply is extremely useful for electronics hobbyists, but they can be expensive when purchased from the market. In this Instructable, I will show you, how to make a mini-lab power supply with a limited budget. It is a great DIY project for beginners as well as anyone interested in Electronics.

The Power Supply is based on XL4015 DC-DC buck converter module. This module can provide an adjustable output-voltage from 1.4V, up to the input voltage and current output from 0mA to 5A. It only requires only a DC power supply with a voltage range between 12-30V. Here I have used a 24V/3A DC adapter.

The inspiration for this project is from Chordless Lab Power Supply

The power supply can be used for the following purposes:

1. Variable Power Supply

2. Battery Charger

3. Constant Current LED Driver

4. Solar Charger Controller


1. Input voltage range:5-36VDC

2. Output voltage range:1.25-32VDC adjustable

3. Output current: 0-5A Output power: 75W

4. Output ripple: 50mV (max)

5. In-built thermal shutdown and short circuit protection

Full Video Tutorial:


Components Used:

1. XL4015 Buck Converter ( Amazon / Banggood)

2. Volt-Amp LED display ( Amazon / Banggood)

3. 2 x 10k Precision Potentiometer ( Amazon / Banggood)

4. 2 x Binding Posts ( Amazon / Banggood)

5. DC Jack (5.5mm x 2.1mm) ( Amazon / Banggood)

6. 2 x Rocker switch ( Amazon / Banggood )

7. Fuse Holder ( Amazon / Banggood)

8. Fuse ( Amazon / Banggood )

9. Heat Sink ( Amazon / Banggood )

10. 20AWG Wires ( Amazon / Banggood)

11. Heatshrink Tube ( Amazon / Banggood)

12. 12-30V DC Power supply ( Amazon / Banggood)

Tools Used:

1. Soldering Iron ( Amazon / Banggood )

2. Wire Cutter / Stripper ( Amazon / Banggood)

3. 3D printer ( Amazon / Banggood )

4. Hot Air Blower ( Amazon / Banggood)

Step 1: How It Works ?

The heart of the circuit is based on XL4015 DC-DC buck converter module. The circuit can be divided into the following sections:

1. Input:

The input DC power to the XL4015 is supplied through a DC Jack. A fuse is connected in series between the DC jack and XL4015 module input terminal ( IN+). The fuse is used to protect the circuit from the accidental short circuit.


The output terminal of the XL4015 module is connected to the two binding posts through a rocker switch. You can connect your load to these binding posts. The switch is used because you can adjust the voltage and current value without disconnecting the load.

3. Display Unit:

A LED Volt-Amp display is used to display the output voltage and current. It is very useful because you can see the voltage and current values during the adjustment.

The power supply for the display is connected to the input terminal of the XL4015 module through a rocker switch. The switch is used because you can turn off the display unit once you adjust the voltage and current value. This is especially when you will use the power supply for battery charging.

4. External Potentiometer:

Two 10 Kilo-Ohm precision potentiometers are used in place of the onboard trimpot for fine adjustment of voltage and current.

Note: The converter is rated for 75W, but if you plan to use 75W of power over longer periods, you will need the external cooling fan to dissipate the heat.

Step 2: Prepare the DC Jack and Fuse

Solder a red and black wire (20AWG) to the DC Jack.Before soldering use a small amount of flux to the terminals. Then insulate the soldering joint by using heat-shrink tubing.

Similarly, solder a red wire to the one terminal of the fuse holder.

Step 3: Prepare the Rocker Switches and Binding Posts

There are two rocker switches used in this project, one is used for Volt-Amp display and another is for output.

Solder the positive terminal wire ( thin red wire) of the display unit to the one terminal of the rocker switch and a small piece of red wire( 24AWG) to another terminal.

Similarly, connect the red binding post to the one end of the rocker switch and a piece of red wire( 20AWG) to another terminal.

Insulate the soldering connections by using heat-shrink tubing.

Step 4: Adding the External ​Potentiometers

Desolder the two small potentiometers from the XL4015 buck converter module. Solder three wires to each of the two multi-turn precision potentiometers you will use, and solder these wires to where the small trimpots were on the PCB. During connection be sure you are connecting to the right pin.

I have used 24AWG colored wires for connecting the external potentiometers.

Wire Colour ------> Pin No

Red ------> 1

Yellow ------> 2

Black ------> 3

Step 5: 3D Printed Enclosure Design

The enclosure design is based on an awesome design "parametric box" from Thingiverse. I have downloaded the design files and customized them on OpenSCAD and Fusion 360 as per my requirements.

Similarly, I have customized the potentiometer knobs by using the design " Customizable Knob! "

Download the .STL files from Thingiverse

Step 6: 3D Printing the Enclosure

I have used my Creality CR-10 printer and 1.75 mm Orange and Grey PLA filaments to print the parts.

My settings are:

1. Print Speed: 60 mm/s

2. Layer Height: 0.2mm ( 0.3 also works well)

3. Fill Density: 25%

4. Extruder Temperature: 200 deg C

5. Bed Temp: 65 deg C

After printing the front and back panels, I have highlighted the text and symbols with a permanent marker. The front part of the potentiometer knob is painted blue by using acrylic color.

Step 7: Make the Circuit

Make the circuit by following the schematic diagram given in the above picture.

Join the red wires from the fuse holder and the rocker switch ( display unit ) and then connect them to the IN+ terminal of the XL4015 module. Join the black wires from the DC jack and the display unit and then connect them to the IN- terminal of the XL4015 module.

Join the red wire from the rocker switch (red binding post ) and the yellow wire from Display and then connect them to the Out+ terminal of the XL4015 module.

Connect the black wire of the Display to the Out- of the XL4015 and the red wire to the black binding post. This will make all the current flowing through the output binding posts also pass through the ampere meter of the display, so it can measure and display the current.

Step 8: Attach a Heat Sink to XL4015 IC

To dissipate the heat generated from XL4015 IC, attach a small heat sink to it.

I have used an 8.5 x 8.5 mm heat sink.

Step 9: Assembling

Once the circuit is wired up correctly, you can mount it in the 3D printed enclosure. Screw the XL4015 module to the bottom of the box using 4 short M2 bolts.

The binding posts and potentiometers are fastened onto the front-panel. The DC Jack and the fuse holders are fastened to the back panel.

You can apply a small amount of hot glue on the inside of the panel) to secure the components in their place.

At last close the top cover by using 4 M2 screws. Try not to screw them in too tight, because they'll lose their grip on the plastic pretty easily.

Step 10: Mount the Fuse

After assembling the enclosure, you have to mount the desired rating fuse into the fuse holder.

Unscrew the fuse holder, insert the glass fuse and then secure it again.

The fuse rating shall be 1.56 times the maximum current rating. For 5A current. 8A fuse is perfect.

Step 11: Use As Variable Power Supply

Connect the output from SMPS / DC adapter to the input DC Jack. I have used a 230V AC - 24V DC /3A adapter.

Then connect the load to the binding post, be sure the polarity is correct. ( Red is positive and Black is Negative ).

First, adjust the “voltage potentiometer” so that the output voltage reaches the value you want.

Turn on the output switch and then raise the current slowly by adjusting the “current potentiometer” until it reaches the desired value.

Here I have connected a DC motor as a load to demonstrate the feature.

Step 12: Use As a Battery Charger

Before using this feature, you must know the battery float charge voltage and current value. You can easily get it from the battery datasheet.

Example: Charging a 3.7V / 2600mAh 18650 battery. The float voltage is 4.2V and the maximum charging current is 2600mA (1C)

Connect the 18650 battery to the binding post.

Adjust the “Voltage potentiometer” so that the output voltage reaches the float voltage.

Then, turn on the output switch and adjust the charging current.

Step 13: Use As a Solar Charge Controller

Connect the output from Solar Panel to the DC input at the back panel.

Connect the battery to the binding post.

Adjust the “Voltage potentiometer” so that the output voltage reaches the float voltage.

Then, turn on the output switch and adjust the charging current.

Example: Charging a 12V /7Ah sealed lead-acid battery. The float voltage is 13.5V and the charging current is 700mA (C/10)

Step 14: Use As a Constant Current LED Driver

Connect the LED to the binding post.

Adjust the “voltage potentiometer” so that the output voltage reaches the LED working voltage.

Turn on the output switch, then adjust the current until it reaches the desired value.

Example: Connecting a 1W power LED, working voltage - 3.2V and Current: 350mA

Step 15: Finishing!

I have really satisfied with this small power supply, which is quite handy to use during my project work.I can say it is a budget-friendly and useful project for all electronics lovers.

I have observed these two limitations in my power supply:

1. The module heats up for the higher operating current. I think it requires a cooling fan for dissipating the heat.

2. The current value displayed on the Volt-Amp display module is not so accurate.

If you enjoyed this article, don’t forget to pass it along!

Follow me for more DIY projects and ideas. Thank you !!!

Plastic Contest

Participated in the
Plastic Contest

Be the First to Share


    • Hide It Challenge

      Hide It Challenge
    • Reclaimed Materials Contest

      Reclaimed Materials Contest
    • Laser Challenge

      Laser Challenge



    INSTRUCTABLE IS THE RADDEST SITE EVER along Pinterest my most grotto and valued sight these are my teachers thank you so much


    i am trying to build the 1st. power supply of it's kind I got add something you all no the 2aa batt. flexible end flash light i invented that and 3 years later they came out with it but i used a 9vdc pill bottle 9vdc plug Pease of aluminum foil for reflector as you no every ounce of weight matters , if any one ever walked up mountain the first time my sleeping bag and pillow was to heavy took few time before I went with 55lb.pack rifle ammo but got 3 point spike black tail deer on palmar mountain in puma valley in calf. anyways i used it on a 3 day 3o mile survival trip i currently working on a multi power supply consist of many many options ac/dc amps watts i like to make every thing multi choose devices i build wires no one has and thing not seen before this is tricky one i am on well thank you if anyone got info for me please i can use help as i want to make a 100 to 150,200vdc like 20 to 40 amp adjustable out put for many of my projects I would like to make power supply /charger/off all and every thing that needs power or charging that i play with i not rooky but got learn a lot still so i can use HELP PLEASE


    Tip 12 days ago

    alwayes make sure they give right part that was one of my problems they sent wrong part,s amazon allwase mess is up my spelling bad sorry


    i have made alot or power supply,s and burned alot those 30v ac in and dc out i don,t no why but i put three of them together and all have burned i have sheet of 20 boost converters i am going try then and i have voltage regalator that has adjustable V0lts and Amps go,s up to 80vdc ? i don,t no amps but i like your article


    Question 3 months ago

    Wouldn't the rocker switches for the display and output be rated too low? They're rated for AC power, but we're working with DC power, too high and it would arc and ruin the part, wouldn't it?


    11 months ago on Introduction

    So what you are saying is bow to king Jeff of Amazonia? Great instructable by the way.


    Reply 9 months ago

    No King Jeff is leaving Amazonia. A new King arises tho so no woory


    11 months ago

    I've bought a number (way too many) of different types of DC-DC converters. If there is one thing I can say about them, they are all laughably over-rated for how much power they can handle. All of the ones I've bought are fine with tens of millamps out, but things fall apart after that.

    Having said that, the ones that I have which come with large heat-sinks as a fundamental part of the board are much better, and can handle a reasonable percentage of their stated load. I would recommend that anyone looking to buy a DC-DC convertor board in an application needing more than a few milliamps should only look at ones with large heat sinks. I don't have this specific one, but things that look like this are more likely to give out reasonable power (in my experience):¤cy=CAD&cur_warehouse=CN&createTmp=1&utm_source=googleshopping&utm_medium=cpc_bgs&utm_content=haosen&utm_campaign=haosen-ssc-ca-all-1210&ad_id=485504198106&gclid=Cj0KCQiA5vb-BRCRARIsAJBKc6J1EuQyXYOXM8JLMmL536Ya6jYLGLsZ-heUZkPTaD1cEx5EXn2eiM4aArVgEALw_wcB


    11 months ago



    11 months ago

    You have nice and simple down to an art. This is the sweetest little bench critter I have seen in a while. I think I am going to try and bump it up with a 60vdc 400watt supply. Some of my projects are a bit power greedy. I have all but a few pieces all ready so I will attempt to get the rest and build this thing. Thank you for the fun.


    11 months ago

    Very well done! Particularly like the simple yet very informative explanations of why and how to calculate what you need to know! Thank you!


    11 months ago

    I would recommend to place LED in front panel, for current mode indication (it is on board). This helps me a lot. For heat dissipation you can add heat sink to opposite board side. Some Al or Cu square about 10X12mm size, thickness about 2-4mm trough soft insulating thermal pad to board. Directly in opposite side of main chip. On this small plate you can add some bigger heatsink. Small square needed only to not short board pins by main heatsink. Board has thermal vias under chip, so heatsink from this side will work much better than on top of chip.