Introduction: CC/CV Power Supply

Power supply is one of the most important tool on your workbench, but they are too expensive (like >50€ for the 30v 5 amps version).
Today I want to make a good and cheap power supply, it will not be precise like what you buy, but it will cost less than 20€.

This power supply can be used in different cases:

  • is a CC/CV that mean constant current/costant voltage so is perfect to charge lithium battery and almost any type of battery, but make attention when you do that, it can be very dangerous in case you wrong to set voltage or if the battery are damaged, so please, don't do this if you are not an expert.
  • generic power supply up to 18 v and 4 amps (in my case, depending on wich power supply you will choose)
  • you can power your new circuit with the current limitation, so if something went wrong you don't broke everything

Step 1: Component List

  • xl4015, step down 5A cc/cv (with a little heatsink)
  • generic step down to 12 v for the fan
  • 12v fan
  • 2 10 k potentiometer (with their knob and bolts)
  • 2 banana connector
  • lcd voltmeter ammeter 100 v 10 A (with the relative connector)
  • ac input connector
  • ac switch (bigger one)
  • dc switch
  • T connector (i don't know if the name is correct, but is the connector used or speaker cable)
  • project box
  • power supply, mine is from a used laptop charger, the output is around 18 v and 4 amps (~70 watt), remember, when you choose you power supply, that the xl4015 have the limit of max 5 amps and 70 watt of output power.
  • some wire


  • xt60 connector
  • 1 green led with it's relative resistor (if you want you can add also one red led connected to the 220 v)

Step 2: Tools List

For this project you will need:
-wire (different gauge)
-precision knife
-soldering iron

Step 3: Prepare the Xl4015

First of all make sure that the xl4015 and all the other component works perfectly. After that we can desolder the potentiometers and solder 6 cable (3 for each potentiometer). Then I recommend to install a small heatsink.

Step 4: Make Hole in the Project Box.

I take a piece of paper and I draw the component layout of the panel. Then I use every tools that I have to make the hole and after that I insert In place the component.

Also I need un input so I make two hole on one side for the ac input connector and the switch as you see in the photo (make sure that the input connector is centered, not like mine).

I also make some holes for the fan and the ventilation.

Step 5: Wiring

Then I start to wiring everything like in the wiring diagram.

I connect the ac input to the switch and then to the power supply input. The otput is connected directly to the xl4015 input with his screw terminal. On the xl4015 there are two hole on each side of the screw terminal that is also for the input, from here start two pairs of wires, one pair is to power the lcd meter and the other goes to the step down converter used for the 12 volt fan. I connect the potentiometer to the two pairs of cables of the board (make sure of the orientation because it will determine the direction of the rotation) . After that I connect the fan and set the output (of his relatives step down) to around 10 v (to prevent it from being to much noisy). The negative output of the xl4015 is in series with the meter current shunt (the black one is the input of the shunt and the red is the output).

Then the positive output of the xl4015 is connected with the voltage sense wire of the meter and from here I connect a red cable (this is the adjustable output voltage) in series with a switch to controll the output. The output negative and positive are finally connected to the banana connector and to the T connector.

Step 6: End of the Project, Some Tip and Adivice

Now you only need to screw in place the front panel and the project is finished.

My tips and advice are:

  • make sure that the lcd meter has double precision when you order it (not like mine)
  • make sure that the potentiometer are connected in the right position
  • for safety reason is a good idea to use NO (normally open) thermal switch on the main input (ac for example), so if something wents wrong it will disconnect the circuit until the temperature goes down (I think that the 60 degrees version is perfect for this purpose)
  • you can use another thermal switch NC (normally closed) to controll the fan, so if the temperature is too high the fan will start to cool down everything and it will reduce the noisy when the temperature is low (I think that the 40 degrees version is perfect)
  • if you use a metal box, but remember absolutely to ground the case to avoid any risky if you use the mains voltage (for example 230v ac) in your box, and be careful to work with such high voltage
  • you can protect the input (ac) and the output (adjustable dc voltage) of the project with some fuse, it will depend on you power supply capabilities.
  • if you want you can add some led to see if the project is on or off
  • in the future I will ad a 7s battery monitor to controll the battery when they are charged with this supply and the xt60 connector to connect directly the battery
  • use smaller step down converter for the fan (like the mini converter), it's also less expensive

If you have any question just tell me in the comments and I will be grateful to answer.

Thank you for your attention and I hope you enjoyed this tutorial, we will see the next time!