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. ›LM2596 buck converter

Component guide · Beginner · 4 min read

LM2596 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 LM2596 buck converter isLM2596 buck converter pinoutWiring the LM2596 buck converterExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

The 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. Turn the blue trimmer to set the output while measuring with a multimeter. It is rated 3 A but runs cool only up to about 2 A; input must be at least 1.5 to 2 V above the output.

Key specs at a glance

Input
4.5 to 40 V DC
Output
1.25 to 35 V, adjustable
Current
3 A peak, about 2 A continuous without extra cooling
Efficiency
Up to about 90 percent
Switching
150 kHz
Dropout
Input must be 1.5 to 2 V above output
01

What the LM2596 buck converter is

The LM2596 is a buck converter: instead of burning extra voltage as heat like a linear regulator, it switches quickly and stores energy in an inductor. Going from 12 V to 5 V at 2 A it wastes about 2 W, where a 7805 would waste 14 W.

It is the standard way to run Arduino, ESP32, sensors or servos from a 12 V adapter, a car battery or a LiPo pack.

02

LM2596 buck converter pinout

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

PinFunction
IN+Input positive, 4.5 to 40 V
IN−Input ground
OUT+Regulated output positive
OUT−Output ground (same as IN−)
TrimmerMulti-turn pot that sets the output voltage
PinFunction
IN+
Input positive, 4.5 to 40 V
IN−
Input ground
OUT+
Regulated output positive
OUT−
Output ground (same as IN−)
Trimmer
Multi-turn pot that sets the output voltage
03

Wiring the LM2596 buck converter

Set the voltage before connecting the board. Feed 5.0 V into the 5V pin of an Uno or the 5V/VIN pin of an ESP32 dev board, or set 7 to 9 V and use the Uno barrel jack.

LM2596 buck converter pinArduino UnoESP32
IN+ / IN−12 V adapter + / −12 V adapter + / −
OUT+5V pin (set to 5.0 V)5V / VIN pin (set to 5.0 V)
OUT−GNDGND
IN+ / IN−
Arduino Uno:
12 V adapter + / −
ESP32:
12 V adapter + / −
OUT+
Arduino Uno:
5V pin (set to 5.0 V)
ESP32:
5V / VIN pin (set to 5.0 V)
OUT−
Arduino Uno:
GND
ESP32:
GND
04

Example code

There is nothing to program on the module itself. This sketch is a quick way to log the output while a load is connected.

Check the output voltage with an Arduino (divider on A0) · Arduino C++Verify & upload in Electrolark
// 10k from OUT+ to A0, 10k from A0 to GND: A0 sees half the output
void setup() { Serial.begin(9600); }

void loop() {
  float v = analogRead(A0) * 5.0 / 1023.0 * 2.0;
  Serial.print("Converter output: ");
  Serial.print(v, 2);
  Serial.println(" V");
  delay(500);
}
05

Setup and tuning

Setting the voltage

connect only the input and a multimeter on the output. Turn the trimmer anticlockwise to lower the voltage (many turns may be needed), then connect the load and recheck.

Headroom

with 7 V in you can get about 5 V out, not 6.5 V.

Heat

above 2 A add a small heatsink or choose the XL4015.

Reverse polarity

the module has no protection; double-check + and − before switching on.

Design maths

the buck converter calculator and power supply sizing help pick ratings.

06

What you need

Shop this list4 of 5 found in our store · ₹473

  • LM2596 adjustable buck converter module: the converter this guide coversLM2596 Adjustable Buck Converter Module₹59
  • DC power adapter (5.5x2.1 mm): a separate supply for the motorsDC Power Adapter (5.5x2.1mm)₹188
  • Digital multimeter: to set and check output voltageDigital Multimeter₹177
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • Dupont jumper wires: for the signal connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
07

Alternatives and when to choose them

  • ✓XL4015: 5 A class with a voltmeter on some versions.
  • ✓MT3608: when you need to step voltage up, not down.
  • ✓AMS1117: tiny linear 3.3 V or 5 V regulator for light loads.
08

Try it: Buck converter design calculator

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

09

Common mistakes to avoid

  • !Connecting the load before setting the voltage, which can feed 12 V into a 5 V board.
  • !Reversing the input polarity.
  • !Expecting 3 A continuous without cooling.
  • !Using it when the input is only slightly above the needed output.
10

Frequently asked questions

How do I adjust the LM2596 output voltage?

Turn the trimmer while measuring the output with a multimeter. Anticlockwise usually lowers the voltage; it is a multi-turn pot, so keep turning.

Can I power a Raspberry Pi with it?

For a Pi 3 or Pi 4 at light load, yes if set to 5.1 V. For a Pi 5 under load, use a 5 A converter or official supply.

What is the minimum input voltage?

About 1.5 to 2 V above the output you want, and at least 4.5 V.

Why is the output voltage not changing?

The trimmer is multi-turn. Keep turning, and check the input is high enough above the target.

Does it have short-circuit protection?

The LM2596 has current limiting and thermal shutdown, but the module has no reverse polarity protection.

Can it charge a battery?

It has no current limit you can set. Use a charger module, or a buck converter with constant-current control such as the XL4015 CC/CV.

Parts for this guide

  • LM2596 Adjustable Buck Converter Module
    ₹59View
  • DC Power Adapter (5.5x2.1mm)
    ₹188View
  • Digital Multimeter
    ₹177View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop DC-DC Converters

Calculators

Buck converter design calculatorPower supply sizing calculatorLinear regulator heat 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 & BatteriesComparisonBeginnerVoltage RegulatorsA voltage regulator holds its output steady, such as 5 V or 3.3 V, while the input varies.4 min read · Power & BatteriesHow-toBeginnerHow to Power an Arduino or ESP32 from BatteriesFor an Arduino Uno or Nano, feed 7 to 12 V into VIN or the barrel jack (6 x AA works well), or regulated 5 V into the 5V pin or USB.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 & Batteries

Sources

  • LM2596 SIMPLE SWITCHER step-down voltage regulator datasheet (Texas Instruments)

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 LM2596 buck converter isLM2596 buck converter pinoutWiring the LM2596 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 guide3 items · ₹424

LM2596 Adjustable Buck Converter Module · DC Power Adapter (5.5x2.1mm) · Digital Multimeter

Run itChange the inputs and watch the output
2.50 VA0 sees
Serial monitor9600 baud
Converter output: 5.00 V

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