Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Power & Batteries
  4. ›XL4015 buck converter

Component guide · Beginner · 3 min read

XL4015 buck converter

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the XL4015 buck converter isXL4015 buck converter pinoutWiring the XL4015 buck converterExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

The XL4015 is a step-down converter rated 5 A that turns 8 to 36 V into an adjustable 1.25 to 32 V. It is the next size up from the LM2596, for loads such as LED strips, Raspberry Pi with peripherals or several servos. Set the output with the trimmer and a multimeter, or read it on the built-in voltmeter version.

Key specs at a glance

Input
8 to 36 V DC
Output
1.25 to 32 V, adjustable
Current
5 A peak, about 3 to 4 A continuous with good airflow
Efficiency
Up to about 95 percent
Switching
180 kHz
Versions
Plain module, or with an LED voltmeter display

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1XL4015 5A Buck Converter with Voltmeter₹304
  • Option 2XL4015 Adjustable Buck Converter 5A₹119
01

What the XL4015 buck converter is

The XL4015 works like the LM2596 but with a stronger switch and bigger inductor, so it handles more current with less heat. The voltmeter version has a small display and a button to switch between input and output voltage.

Use it when a build needs more than 2 A at 5 V or 12 V from a higher-voltage battery or supply.

02

XL4015 buck converter pinout

The pins on the XL4015 buck converter and what each one does.

PinFunction
IN+ / IN−Input 8 to 36 V
OUT+ / OUT−Adjustable output
TrimmerSets the output voltage
Display buttonVoltmeter version: shows input or output voltage
PinFunction
IN+ / IN−
Input 8 to 36 V
OUT+ / OUT−
Adjustable output
Trimmer
Sets the output voltage
Display button
Voltmeter version: shows input or output voltage
03

Wiring the XL4015 buck converter

Set the output before connecting the load. Use wires thick enough for the current, for example 0.75 mm2 for 5 A.

XL4015 buck converter pinArduino UnoESP32
IN+ / IN−24 V supply or 3S/4S battery24 V supply or 3S/4S battery
OUT+5V pin (set to 5.0 V)5V pin (set to 5.0 V)
OUT−GNDGND
IN+ / IN−
Arduino Uno:
24 V supply or 3S/4S battery
ESP32:
24 V supply or 3S/4S battery
OUT+
Arduino Uno:
5V pin (set to 5.0 V)
ESP32:
5V pin (set to 5.0 V)
OUT−
Arduino Uno:
GND
ESP32:
GND
04

Example code

The module needs no code. This sketch uses an INA219 to check the real load current, which tells you whether you are within the safe range.

Log output voltage and current with an INA219 · Arduino C++Verify & upload in Electrolark
#include <Adafruit_INA219.h>     // INA219 between OUT+ and the load

Adafruit_INA219 ina;

void setup() {
  Serial.begin(115200);
  ina.begin();
}

void loop() {
  Serial.print(ina.getBusVoltage_V(), 2);  Serial.print(" V  ");
  Serial.print(ina.getCurrent_mA(), 0);    Serial.println(" mA");
  delay(500);
}
05

Setup and tuning

Heat

above 3 A the chip and diode get hot. Add a heatsink and airflow, or derate.

Headroom

keep the input at least 2 V above the output.

Voltmeter calibration

compare the display with a multimeter; cheap displays can be off by 0.1 to 0.2 V.

LED strips

for 12 V strips from a 24 V supply, size the converter with the LED strip power calculator.

06

What you need

Shop this list5 of 5 found in our store · ₹1,106

  • XL4015 5A buck converter with voltmeter: built-in display versionXL4015 5A Buck Converter with Voltmeter₹304
  • XL4015 adjustable buck converter 5A: plain versionXL4015 Adjustable Buck Converter 5A₹119
  • Enclosed SMPS power supply: 12 V or 24 V supply for bigger loadsEnclosed SMPS Power Supply₹257
  • Digital multimeter: to set and check output voltageDigital Multimeter₹177
  • INA219 current and power monitor module: to measure the loadINA219 Current and Power Monitor Module₹249
07

Alternatives and when to choose them

  • ✓LM2596: smaller loads up to about 2 A.
  • ✓DC-DC converters guide: buck, boost and buck-boost modules compared.
  • ✓XL6009: to raise voltage instead.
08

Try it: Buck converter design calculator

Change the values and the diagram and results update as you type.

09

Common mistakes to avoid

  • !Running 5 A continuously without cooling.
  • !Using thin jumper wires on the output.
  • !Setting the voltage after the load is connected.
  • !Feeding less than 8 V in.
10

Frequently asked questions

What is the difference between XL4015 and LM2596?

The XL4015 handles about twice the current with better efficiency. The LM2596 is smaller and fine up to about 2 A.

Can it power a Raspberry Pi 5?

Set to 5.1 V it can supply the current, but voltage at the Pi must stay above 5 V; use short thick wires.

Is there current limiting?

The standard module has internal over-current protection but no adjustable limit. CC/CV versions with two trimmers allow constant current.

How accurate is the voltmeter?

Typically within 0.1 to 0.2 V. Check with a multimeter for critical loads.

Can it run from a car battery?

Yes. 12 to 14.4 V input is in range for outputs up to about 10 V.

Why does the output drop under load?

The input supply cannot deliver enough current, or the input is too close to the output.

Parts for this guide

  • XL4015 5A Buck Converter with Voltmeter
    ₹304View
  • XL4015 Adjustable Buck Converter 5A
    ₹119View
  • Enclosed SMPS Power Supply
    ₹257View
  • Digital Multimeter
    ₹177View
  • INA219 Current and Power Monitor Module
    ₹249View
Shop DC-DC Converters

Calculators

Buck converter design calculatorPower supply sizing calculatorWire gauge calculator

Terms in this guide

Buck converterA DC-DC converter that lowers voltage efficiently, for example 12 V to 5 V.

Keep learning

Component guideBeginnerBuck and Boost ConvertersA DC-DC converter changes one DC voltage to another efficiently by switching current through an inductor.4 min read · Power & BatteriesComponent guideBeginnerLM2596 buck converterThe LM2596 module steps a higher DC voltage down to any voltage between about 1.25 V and 35 V, for example 12 V down to 5 V.4 min read · Power & BatteriesBuying guideBeginnerChoosing a Power SupplyMatch the voltage exactly and choose a current rating at least 20 to 30% above what your project draws.3 min read · Power & BatteriesBuying guideBeginnerLED StripsA plain LED strip has LEDs and resistors in short groups that run from 12 V or 24 V, and you can cut it at marked points.3 min read · Displays & LEDs

Sources

  • XL4015 5A 180KHz 36V buck DC to DC converter datasheet (XLSEMI)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the XL4015 buck converter isXL4015 buck converter pinoutWiring the XL4015 buck converterExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide4 items · ₹987

XL4015 5A Buck Converter with Voltmeter · Enclosed SMPS Power Supply · Digital Multimeter · INA219 Current and Power Monitor Module

Run itChange the inputs and watch the output
Serial monitor115200 baud
11.99 V  498 mA

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question