Homemade Power Supply with XL4016: How to Build an Adjustable Step-Down Power Supply

Having an adjustable power supply on the workbench is extremely useful for anyone who works with electronics.

At one moment we need 12 V. Then 9 V. In another project, perhaps 5 V or a different voltage to test a particular circuit.

A relatively simple solution is to use a DC-DC converter module and turn it into a homemade adjustable power supply.

In the video in this article, I show a power supply I built using a step-down board based on the XL4016, a switching converter capable of reducing a DC input voltage to a lower output voltage.

The module used is marketed as being capable of supplying high currents, with specifications of up to 9 A appearing on the market. However, there is an important technical detail about this figure that we will look at later.

What Is a Step-Down Converter?

The name itself helps explain it:

step-down = reduce.

If we have, for example:

INPUT
 24 V
   ↓
XL4016
   ↓
OUTPUT
 12 V

we are reducing the voltage.

This type of circuit is also known as a:

buck converter.

The major advantage over a linear regulator is efficiency.

Instead of simply turning a large amount of the voltage difference into heat, the switching converter works by storing and transferring energy through elements such as an inductor, capacitor, and electronic switching.

The XL4016 Is a Switching Regulator

The XL4016 uses PWM and operates at a fixed frequency of approximately 180 kHz. The XLSEMI datasheet describes the component as a high-efficiency, low-ripple DC-DC buck converter.

In very simplified terms:

DC INPUT
    ↓
 SWITCHING
    ↓
 INDUCTOR
    ↓
 FILTERING
    ↓
DC OUTPUT

A control circuit monitors the output and adjusts the switching to maintain the desired voltage.

It Is Not a Power Supply That Increases Voltage

This needs to be clear.

Since we are working with a step-down converter, the output must be lower than the voltage available at the input.

Therefore, if we power the module with:

12 V

we should not expect to obtain:

24 V

at the output.

To increase voltage, we would need another topology, such as a boost converter.

There are also buck-boost modules, capable of both reducing and increasing voltage under certain conditions.

Turning the Module into a Bench Power Supply

The interesting thing is that we can use the ready-made module as the core of the power supply.

The structure looks approximately like this:

DC POWER SUPPLY
      │
      ↓
┌──────────────┐
│    XL4016    │
│              │
│  STEP-DOWN   │
└──────────────┘
       │
       ↓
ADJUSTABLE OUTPUT
       │
       ↓
    CIRCUIT

We can then add the elements that make the setup more practical:

enclosure, binding posts, potentiometers, switch, display, voltmeter/ammeter, and ventilation, depending on the version we want to build.

The Potentiometer Allows You to Adjust the Voltage

Modules based on the XL4016 normally use a potentiometer to adjust the output voltage.

The IC itself operates with a feedback reference of approximately 1.25 V, and an external resistor network determines the regulated voltage.

In practice, for the user, we have:

TURN POTENTIOMETER
        ↓
CHANGE REFERENCE
        ↓
CIRCUIT ADJUSTS PWM
        ↓
CHANGE OUTPUT VOLTAGE

This is what allows the same power supply to be used for different experiments.

Adjust the Voltage Before Connecting Your Circuit

This is a simple rule that prevents many problems.

Imagine that yesterday we used the power supply to power a:

12 V

circuit.

Today we want to connect a:

5 V

module.

If we simply connect the new circuit without checking the power supply, we could apply 12 V to equipment designed for 5 V.

Therefore:

TURN ON THE POWER SUPPLY
          ↓
MEASURE THE OUTPUT
          ↓
ADJUST THE VOLTAGE
          ↓
CHECK AGAIN
          ↓
CONNECT THE LOAD

This small habit can save many components.

A Voltmeter Built into the Power Supply Makes Things Much Easier

We can leave a multimeter permanently connected during testing:

XL4016 ─────── LOAD
   │
   └──── MULTIMETER

But for a power supply that will be used frequently, it is useful to incorporate a small digital panel voltmeter.

This allows us to immediately see the output voltage.

It turns the module into something much closer to a conventional bench power supply.

What About the Famous 9 A Rating of the XL4016 Module?

Here we need to separate two things:

the specification of the XL4016 IC and the specification advertised by the manufacturer/seller of the complete module.

There are commercial modules based on the XL4016 advertised as 9 A, including published tests within this range.

However, a widely available version of the official XL4016 datasheet specifies the component as an 8 A converter, with a typical internal current limit of around 10 A.

Interestingly, there is also a more recent revision of the official XLSEMI datasheet that presents the XL4016 as a 12 A device, with a recommended input range of 8 to 36 V.

This means it is not wise to simply state:

“Any XL4016 board can continuously supply 9 A.”

The Entire Board Must Be Able to Handle the Current

The IC is only one part of the converter.

We also have:

XL4016
  +
INDUCTOR
  +
DIODE
  +
CAPACITORS
  +
PCB TRACES
  +
CONNECTORS
  +
HEAT DISSIPATION

All of these elements need to handle the current.

The datasheet, for example, shows a typical application circuit operating at 5 V / 8 A and efficiency curves up to this current.

Therefore, when a module is advertised as 9 A, this figure should be understood within the specific operating conditions of that board.

Maximum Current Does Not Mean Current Available in Every Situation

Suppose we want:

Vout = 12 V
Iout = 9 A

The output power would be:

P = V × I

P = 12 × 9

P = 108 W

This already represents considerable power for a small board.

The power supply feeding the XL4016 must also be able to provide the required energy.

If we hypothetically have 90% efficiency:

Pinput ≈ 108 / 0.90

Pinput ≈ 120 W

There is no point in using a 30 W input power supply and expecting to continuously draw more than 100 W at the output.

Efficiency Is One of the Major Advantages

The datasheet shows an efficiency of approximately 87% at 12 V → 5 V / 6 A and around 93% at 24 V → 12 V / 6 A, under the specified test conditions.

This is much better than wasting the entire voltage difference in a linear regulator.

Even so:

90% efficiency does not mean there is no heat.

If we have:

100 W input

and:

90 W output

approximately:

10 W

is being lost.

A large part of these losses ultimately appears as heat in the components.

Heat Dissipation Is Still Important

It is common to find XL4016 modules with heat sinks.

They are not there just for appearance.

As we increase the current, components such as the:

IC, diode, and inductor

can become considerably hot.

Therefore, if we intend to work with high currents for extended periods, we need to monitor the temperature.

This topic is directly related to the test we performed in the article about heat sinks and temperature measurement in electronic components.

A Small Fan Can Help

Depending on the setup, we can use:

AIR INTAKE
     ↓
  XL4016
     ↓
VENTILATION
     ↓
 AIR OUTLET

Forced ventilation can reduce the temperature of the heat sinks and other components.

But there is an important rule:

a fan does not correct an electrically undersized circuit.

It is part of thermal management, not a way to turn any module into an unlimited-power supply.

Current Limiting Is Extremely Useful in a Power Supply

Some XL4016 boards marketed as adjustable power supply modules have current control in addition to voltage adjustment.

When available, this feature is very useful for a bench power supply.

We then have two controls:

CV → CONSTANT VOLTAGE
     constant voltage

CC → CONSTANT CURRENT
     constant current

During normal operation, the power supply can work by maintaining the set voltage.

When the load attempts to draw more than the adjusted limit, the current control takes over.

Why Limit Current?

Imagine that we are testing for the first time a circuit that should draw:

100 mA

We can set a limit close to the expected value.

If there is an error and the circuit attempts to draw:

2 A

the current limiting can help prevent damage.

It is an extremely useful feature during:

assembly, maintenance, and prototype development.

Attention: Not Every XL4016 Module Has the Same Features

There are many different boards using this IC.

Some have:

voltage adjustment only.

Others offer:

voltage + current.

Some have a:

display.

Others include:

larger heat sinks or ventilation.

Therefore, we should not conclude that all modules called “XL4016” are electrically identical.

XL4016 primarily identifies the integrated circuit used, not a single standardized board.

What Voltage Can We Obtain?

In a widely available revision of the datasheet, the XL4016 is specified for an input between 8 and 40 V and an adjustable output of approximately 1.25 to 36 V, always respecting the step-down nature of the circuit.

But the complete board may establish different limits.

In addition, a small minimum voltage drop is required between input and output.

Therefore, we should not expect to apply exactly:

12.00 V

at the input and obtain:

12.00 V

perfectly regulated at the output under any load.

For an adjustable power supply, we normally use an input voltage sufficiently higher than the maximum voltage we intend to obtain.

Can I Power It with a Transformer?

Not directly from the transformer’s AC output.

The XL4016 is a:

DC → DC

converter.

If we start with a conventional transformer, we first need:

AC MAINS
   ↓
TRANSFORMER
   ↓
RECTIFICATION
   ↓
FILTERING
   ↓
DC VOLTAGE
   ↓
XL4016
   ↓
ADJUSTABLE DC OUTPUT

In this case, issues involving isolation and mains voltage safety also come into play.

A simpler alternative for many projects is to use a ready-made isolated DC power supply to power the step-down module.

We Can Reuse a DC Power Supply

For example, if we have a suitable:

24 V DC

power supply, we can use it as the input and create an adjustable power supply for lower voltages:

24 V DC
   ↓
XL4016
   ↓
1.25 V ... < 24 V

while respecting the module’s limits and the required margin.

This can be very useful on the workbench.

An Enclosure Makes the Project Much More Practical

Once the circuit is working, we can install it in an enclosure.

On the front panel, we can have:

┌────────────────────────────┐
│                            │
│       12.00 V              │
│                            │
│   VOLTAGE      CURRENT     │
│      ○             ○       │
│                            │
│    +               -       │
│    ●               ●       │
│                            │
└────────────────────────────┘

The board’s original potentiometers can even be replaced or adapted for externally accessible controls, as long as the modification is performed correctly.

This turns a small electronic module into a much more pleasant piece of equipment to use.

Output Binding Posts Also Help

We can install banana binding posts:

RED → positive

BLACK → negative

This allows us to use:

banana cables, alligator clips, or adapters.

For those who frequently perform experiments, this is much more practical than repeatedly screwing wires directly into the board’s terminal block.

A Fuse Is a Simple and Useful Protection

Depending on the construction, we can add appropriate protection at the input.

The fuse should be sized considering:

current, voltage, load type, and power supply characteristics.

It does not replace the converter’s electronic protections, but it can add another layer of protection to the assembly.

The XL4016 internally includes features such as current limiting, thermal protection, and short-circuit protection described by the manufacturer.

Test the Power Supply Before Trusting It

After assembly, it is not enough to simply observe:

“The voltage is showing on the display.”

I would perform a sequence of tests:

NO LOAD
   ↓
MEASURE VOLTAGE

SMALL LOAD
   ↓
MEASURE VOLTAGE AND CURRENT

INCREASE THE LOAD
   ↓
OBSERVE REGULATION

KEEP IT RUNNING
   ↓
MEASURE TEMPERATURE

This helps you discover the actual behavior of your board, rather than relying only on what was written in the seller’s listing.

See the Homemade Power Supply in the Video

In the video below, I show my homemade power supply using an XL4016 step-down board, a very useful solution for the electronics workbench.

The great advantage of this type of project is that we can use a ready-made module to handle the most complex part of the conversion and focus our work on building a tool suited to our needs.

Is It Worth Building a Power Supply with the XL4016?

For an auxiliary bench power supply, I consider it a very interesting solution.

We have:

LOW-COST MODULE
        +
ADJUSTABLE VOLTAGE
        +
GOOD EFFICIENCY
        +
HIGH CURRENT
        +
ENCLOSURE + BINDING POSTS + DISPLAY
        ↓
USEFUL BENCH POWER SUPPLY

But there is an important conclusion:

we should not size the power supply based only on the number of amps written in the module’s advertisement.

If the board is advertised as 9 A, this does not automatically mean that we can continuously demand 9 A at any voltage, temperature, or ventilation condition.

We need to consider the specific board, the input power supply, the power, the components used, and the thermal dissipation.

By doing this, an XL4016-based board can become an extremely useful adjustable power supply for experiments, tests, and electronic projects.

To explore other content about adjustable power supplies, voltage regulators, rectification, filtering, and converters, also visit the Power Supplies section.

Leave a Comment

Your email address will not be published. Required fields are marked *