• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Power Supply Circuits / Modifying XL4015 Buck Converter with an Adjustable Current Limiter

DIY Circuits | Learn Basics | Arduino Coding




Modifying XL4015 Buck Converter with an Adjustable Current Limiter

Last Updated on January 8, 2024 by Swagatam 36 Comments

In this post I have explained a simple way to enhance the the XL4015 DC to DC buck converter with an adjustable current limiter, which seems to be missing in the original module.

About XL4015

The XL4015 is a 180 KHz fixed frequency PWM buck (step-down) DC/DC converter, specially designed for operating a 5 V, 5 Amp load with good efficiency, minimal ripple and exceptional line and load regulation.

Built using very few number of additional parts, the regulator module is easy to work with and consist of built-in frequency compensation along with a fixed-frequency oscillator.

The PWM control circuit features adjustable duty ratio at a constant rate from 0 to 100%. The IC XL4015 also features an in-built over-current protection functionality.

When a short circuit is detected at the output, the operating frequency is instantly lowered from 180 KHz to 48 KHz, causing an immediate drop in the output voltage and current.

The chip has a fully integrated compensation block, without depending on any external components.

XL4015 IC Main Features

  1. Broad 8V to 36V Input Voltage Range
  2. Output voltage is Adjustable from 1.25V to 32V
  3. Maximum Duty Cycle can be as high as 100%
  4. Output Drop-Out is merely 0.3V
  5. Switching Frequency is fixed at 180 kHz
  6. Output current is constant at 5A.
  7. In-built Power MOSFETs ensure high voltage/current optimization
  8. Operating efficiency is very impressive at 96%
  9. Line and load regulation are extremely good
  10. IC features an internally controlled thermal shutdown function
  11. Likewise it also features an in-built current limit function
  12. Needless to say, the chip also includes an output short protection feature.

Major Disadvantage

Although the XL4015 module is loaded with many excellent features a buck converter needs to have, it lacks one major facility.

The module has no arrangement for adjusting the output current to preferred levels, as per the load specifications.

So if you want to charge a Li-Ion battery with a XL4015 module, say at 2 amp rate, you won't be able to do that, due to the above mentioned drawback.

Similarly, if you wanted to drive a 3.3 V LED at 3 amp maximum current rate, you'd be disappointed likewise, since the module is rated at a fixed 5 amp current.

How XL4015 Works

The basic working schmetaic of the XL4015 buck converter is shown below:

The circuit is configured to produce a fixed 5 V at a constant 5 amp current output in response to a supply input of 8 V to 36 V. The input power specifications has to be higher than the output power, meaning the input supply wattage capacity must be higher than 5 V x 5 A = 25 W.

Therefore, if an input supply of 36 V is used, then the input current should be higher than 25 / 36 = 0.7 Amps. If 8 V is used then the input current may be higher than 25 / 8 = 3 Amps, and so forth.

The internal circuitry of the IC XL4015 consists of the basic elements such as an oscillator and an error amp. The well calculated and controlled 180 kHz oscillator frequency is generated at pin3 (SW) for feeding the external buck converter configuration consisting of the diode, inductor, and the capacitor. This enables the buck stage to process the input supply to a precise 5 V, 5 A output.

The pin2 (FB) functions as the input for the error amp feedback. A minimum of 1.25 V input at this pinout is enough to begin the shut down process for the IC.

This pinout can be seen configured with a potential divider R1, R2, which ensures that the output voltage can never go beyond the 5 V range, which then causes a voltage higher than 1.25 V to develop at the FB pin initiating the shut down process for the IC, thereby preventing the output from crossing the 5 V level.

This also implies that the output voltage could be adjusted to other voltage levels, such as 12 V or 15 V, by suitably varying the R1/R2 feedback divider values.

The R1/R2 can be also fixed using the following formula, for getting the desired output voltage:

Vout=1.25 x (1+R2/R1)

Current Limit Adjust

As we can see from the schematic the XL4015 module does not include a current limiting feature which apparently is a major limitation of the module.

However, the module does include a shut down pinout FB that could be configured with an external current limiter circuit, for accomplishing the feature. This could be implemented as indicated in the following diagram:

The RX may be calculated using Ohm's law:

RX = 0.2 / Current Limit

Since the two transistors are wired with a very high gain output, a potential difference of just 0.2 V across RX should be enough to trigger the FB pin of the IC and initiate the current limiting action.

As soon the current tends to exceed the desired limit, causes the required minimum potential to develop across RX causing the NPN to conduct, which in turn triggers the PNP BJT hard. The action supplies the intended the positive DC on the FB pin, initiating the shut-down.

When this happens the output current drops below the set limit, turning OFF the BJTs and restoring the earlier condition, wherein the current yet again begins exceeding the set limit switching ON the BJTs. The cycle keeps repeating, ensuring the current always remains within the set limit.

With this arrangement, the XL4015 becomes equipped with the very useful adjustable output current limit feature.

XL4015 Alternative (Equivalent Circuit)

Although, the XL4015 module is easily available from most online stores, the IC is not manufactured by reputed brands, and may be prone to becoming obsolete anytime.

Therefore, having an alternative 5 V adjustable buck converter circuit using discrete components appears to be a much better option.

The following diagram shows a very efficient 5 V buck converter using the popular TL494 chip:

The example above shows a simple yet extremely handy, precision 5 V buck converter equivalent for the XL4015.

Here, it shows a solar inverter buck converter application, which can be adopted for any other desired DC to DC converter purpose.

The use of TL494 ensures that the design will not get obsolete easily and the replacement for the IC will be readily accessible whenever required.

Here too, an error amp feedback loop determines the output current by setting up the potential divider network built around R8/R9.

The current can be adjusted by tweaking the R13 resistor appropriately.

R13 = 0.2/Max Current Limit

Another great advantage of using the above discretely built buck converter is the output current level, which is not limited to 5 amps, rather could be upgraded to much higher levels simply by upgrading the transistors, the inductor wire thickness and the R13 resistor value.

You'll also like:

  • power supplyLM324 Variable Power Supply Circuit
  • How to Calculate Transformerless Power Supply Circuits
  • Step-Down Adjustable Voltage, Current Regulator Circuit using LM2673
  • full parts listLaboratory Power Supply Circuit

Filed Under: Power Supply Circuits Tagged With: Adjustable, Buck, Converter, Current, Modifying, XL4015

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « DC Shunt Motor Controller Circuit using Variac
Next Post: The Role of Inductor Coil in SMPS »

Reader Interactions

Comments

Tunji Akande says:
October 5, 2024 at 4:41 pm

Hi, how are you doing sir

Sir I have a 40V 20A buck converter, will it be capable for 39.3V 9A input?

Reply
Swagatam says:
October 6, 2024 at 5:54 pm

Hi Tunji,
I am good, thank you!
Yes, that’s perfectly OK. Lower V/I is ok, higher than 40V/20A is not OK.

Reply
Tunji Akande says:
October 6, 2024 at 5:55 pm

Good to hear sir,

But is there a way for me to reduce the voltage before the buck converter?

Reply
Swagatam says:
October 6, 2024 at 6:08 pm

Sure Tunji, here is the regulator circuit which you can try before the buck converter:
https://www.homemade-circuits.com/wp-content/uploads/2021/01/simple-pass-transistor-emitter-follower-volateg-regulator.png
The zener diode decides the maximum output voltage range.
VR1 value can be a 10k preset
R1 can be 1K
T1 can be any 30 amp Darlington transistor

Reply
Tunji Akande says:
October 23, 2024 at 12:05 am

Hi sir,
If I wanted to use IRLZ44N MOSFET transistor in place of Darlington transistor is it possible, and I need pin connection hint(for that circuit you recommended)?

Reply
Swagatam says:
October 23, 2024 at 8:24 am

Hi Tunji,
I guess you are referring to the last circuit, in that case no, MOSFET cannot be used to replace the shown transistor configuration….

Reply
Tunji Akande says:
October 23, 2024 at 10:14 am

I’m actually referring to the circuit below sir, which common 30A transistor can you recommend sir

https://www.homemade-circuits.com/wp-content/uploads/2021/01/simple-pass-transistor-emitter-follower-volateg-regulator.png

Reply
Swagatam says:
October 23, 2024 at 2:52 pm

You can replace the BJT with a MOSFET, but the source side of the MOSFET might drop upto 4V, while the BJT emitter side will drop only 1V.

Reply
Tunji Akande says:
October 23, 2024 at 4:10 pm

OK, thank you so much sir

Reply
Swagatam says:
October 23, 2024 at 5:01 pm

You are welcome Tunji!

Tunji Akande says:
October 6, 2024 at 6:10 pm

Thank you so much sir for the quick response.

Reply
Swagatam says:
October 7, 2024 at 8:28 am

You are welcome Tunji!

Reply
DIY Phil says:
February 6, 2024 at 9:07 pm

Hi. I’m looking at the basic working schematic of the XL4015 buck converter. If I connect an external adjustable voltage to FB pin, say 0 to 10 volts, will the output voltage also change from 1.25 to 11.25 volts (10 + 1.25)? What should be the values of R1 and R2 for such circuit to work? My goal is to adjust the output voltage of the XL4015 via an external voltage source, such as output of an op-amp. Thanks for all your replies.

Reply
Swagatam says:
February 7, 2024 at 9:35 am

Hi, I don’t think the FB will work with a varying voltage since it is designed to cut off at a single fixed threshold, as determined by the values of R1, R2 resistor. The R1, R2 values are adjusted to generate 1.26V at FB when the desired max output voltage threshold is reached.

Reply
DIY Phil says:
February 7, 2024 at 6:59 pm

You are correct. My XL4015 module the same with the one shown in this article just arrived. I tried connecting varying voltage to FB and it just did not work. Anyway, I’m struggling to make an adjustable voltage supply up to 12 volts and capable of about 3 amp wherein the output voltage is controlled by another varying voltage. I bought LM317 and XL4015 modules to tinker with but no success so far.

Reply
Swagatam says:
February 7, 2024 at 7:14 pm

You can do one thing, use an LDR in place of R1, and an LED with a series resistor, with the LM317 output.
Enclose the LED and the LDR inside a light proof box.

Reply
DIY Phil says:
February 7, 2024 at 7:54 pm

I see. Then the brightness of the LED will change the resistance. I will consider that as a last resort. For the XL4015, I actually tried connecting a varying voltage between + output and FB pin and the voltage does change. However the varying control voltage needs to be a floating supply.

Reply
Swagatam says:
February 8, 2024 at 9:14 am

Floating supply, meaning without the ground connected? That sounds strange, not sure how that may be working.

Reply
Bret Tschacher says:
June 19, 2023 at 3:20 am

I have another question. Can a computer power supply be used on the 5v section along with an adjustable Vreg using a bypass transistor section to get a 3.65v to use as a source to top off LiFePo cells to test them before connecting them to build a DIY 12v battery? It seems workable to me.I would just need some way of limiting the charge current safely to not take out the power supply, other wise I would have to purchase a power supply that can be regulated.

Reply
Swagatam says:
June 19, 2023 at 9:29 am

Sorry, I did not understand what you meant by “using a bypass transistor section”? Do you mean an emitter follower transistor configuration to produce the 3.65V?

Reply
Sandiri Manoj Kumar says:
January 5, 2023 at 3:43 pm

XL4015 Alternative (Equivalent Circuit)

In this circuit Q2 base and Emitter is shorting in my circuit.

Reply
Swagatam says:
January 5, 2023 at 4:04 pm

where is Q2 in the above XL4015 circuit?

Reply
Sandiri Manoj Kumar says:
January 5, 2023 at 4:33 pm

In TL494 circuit
Q2 Base and Emitter is shorted, and it is very heat

Reply
Swagatam says:
January 5, 2023 at 5:24 pm

Q2 base emitter is not shorted there’s a 30 ohm resistor.
You can remove that resistor if you want.

The circuit was taken from the datasheet of the IC, so it has to be correct.

Reply
Vlares says:
December 24, 2022 at 6:09 am

Does it use two transistors to reduce the resistance of the Rx resistor?
On one transistor 547, you can also do this by connecting the collector between R1 R2, but then you will need to use more resistance of the resistor Rx, with formula Rx = 0.6 / Current Limit – do I understand correctly?

Reply
Swagatam says:
December 24, 2022 at 10:51 am

The FB pin of the IC needs to be fed with a HIGH logic to initiate a shut down during a high current situation, the PNP transistor converts the NPN conduction into a high signal for the FB pin of the IC.

Reply
Vlares says:
December 28, 2022 at 11:55 pm

Yes exactly. I just previously worked with LM317, where the adjustment is controlled by ground for shutdown. In this case of LX4015, can the Rx and transistor 557 be connected to the output line, so that the emitter and base of the transistor are powered by the Px resistor for current adjustment?

Reply
Swagatam says:
December 29, 2022 at 12:53 pm

OK, yes a single PNP can also work to provide a positive feedback to the IC. The connections would be as given below:

Emitter to the positive output line, collector terminating as the final positive output source.
Base connected to the collector line.

The current limiting resistor can be connected exactly in between the points joining the collector and base of the transistor.

Reply
Petrus Bosman says:
February 2, 2022 at 12:54 pm

The picture of the buck converter above does have adjustable current limiting, so why are you adding it?
I have used these modules many times and they are current adjustable.

Reply
Swagatam says:
February 2, 2022 at 1:31 pm

I have written the article with reference to the schematic of the IC which has no current control feature.

If you are saying that the module has a current control please specify how it is done? Let’s say we want to limit maximum output current to 1 amp, how can we adjust this?

Also please provide a link which specifically mentions about the current control feature of this IC. Please remove the https while providing the link.

Reply
Petrus Bosman says:
February 2, 2022 at 3:19 pm

Hi Swagatam,
Here is the link to an article about this circuit.
Variable adjustable current and voltage buck converter circuit
I have also added a circuit that can control the current for mppt applications, I will post for you soon.
Regards
Petrus Bosman

Reply
Swagatam says:
February 2, 2022 at 4:29 pm

Thank you Petrus for the information,

I guess I posted the wrong module image, I have replaced it now with the module having a single preset, without the current control feature.
So as I mentioned earlier, the above article is intended for XL4015 modules which does not include a current control feature.

Reply
Petrus Bosman says:
February 2, 2022 at 5:32 pm

Thank you sir,
You can post the circuit as I show in the link for the schematic with the current limiting included.
I will post the mppt add on circuit soon.
Regards
Petrus Bosman.

Reply
fouad says:
May 19, 2022 at 5:39 pm

Hei, friend I’m wondering if I could use this article in my study,
could u please give me written permission to use this article
best regard
Fouad

Reply
Swagatam says:
May 19, 2022 at 6:07 pm

Hi Fouad, You can use the above article in your study. You can use this comment as the written permission.

Reply
Swagatam says:
February 2, 2022 at 5:38 pm

No problem Petrus, Actually I removed the previous link because I cannot post other website links. But i will surely post your MPPT design if you provide it to me.

Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

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

Primary Sidebar

circuit simulator image



Subscribe to get New Circuits in your Email



Categories

  • Arduino Projects (93)
  • Audio and Amplifier Projects (133)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (85)
  • Datasheets and Components (109)
  • Electronics Theory (149)
  • Energy from Magnets (27)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (95)
  • Lamps and Lights (159)
  • Meters and Testers (71)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Renewable Energy (12)
  • Security and Alarm (64)
  • Sensors and Detectors (106)
  • SMPS and Converters (34)
  • Solar Controller Circuits (60)
  • Temperature Controllers (43)
  • Timer and Delay Relay (49)
  • Voltage Control and Protection (42)
  • Water Controller (36)
  • Wireless Circuits (30)





Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap



People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin



Recent Comments

  • Swagatam on Arduino 2-Step Programmable Timer Circuit
  • Swagatam on Simple Buck-Boost Converter Circuits Explained
  • Swagatam on IC IR2111 H-Bridge MOSFET, IGBT Driver IC: Full Datasheet, Circuit Diagram
  • Swagatam on Electronic Circuit Projects, Tutorials, and Practical Engineering Solutions
  • Kadir on Simple 3 Phase Inverter Circuit

© 2026 · Swagatam Innovations