# LM2596 buck converter: setting the voltage safely

> How to set and use an LM2596 buck converter safely: output adjustment, current limits, heat, input protection and powering robots from a 12 V battery.

Canonical: https://roboticsengineering.in/components/lm2596-buck-converter/ | Published: 2026-10-27 | Updated: 2026-10-27

**The LM2596 buck module is a ₹70–₹160 adjustable step-down converter that turns a 7.4–12 V robot battery into a steady 5 V rail — but only if you set the output with a multimeter before anything is connected to it.** It is the cheapest way to give an ESP32, a Pico or a servo its own supply, and the easiest way to destroy a board.

The board has no detents on its trimmer and no reverse-polarity protection. This guide covers the adjustment routine, what the 3 A figure really means, the ripple that upsets sensors, and when a different converter is the honest answer.

## Key specifications

| Input voltage | 4.5–40 V |
| --- | --- |
| Output voltage | 1.23–37 V adjustable |
| Rated current | 3 A with heatsink, about 2 A realistic |
| Switching frequency | 150 kHz |
| Efficiency | typically 75–85% at 12 V to 5 V |
| Input headroom | about 1.5–2 V above output |
| Ripple | tens of millivolts, higher at full load |
| Protection | current limit and thermal shutdown only |
| Reverse polarity | not protected |
| Adjustment | multi-turn trimmer, usually clockwise to raise |
| Board size | about 43 × 21 mm |

**Substitute:** An MP1584EN module for a smaller footprint, or an XL4015 for 5 A loads.

## What it does

The module is a non-isolated step-down, or buck, switching regulator built around the LM2596S-ADJ. A switch, an inductor and a Schottky diode chop the input and average it down. A trimmer sets the feedback point, so the output is adjustable from about 1.23 V to 37 V from an input of 4.5–40 V, at a 150 kHz switching frequency and a 3 A chip rating.

Three limits follow. The input must sit roughly 1.5–2 V above the output, so a 5 V rail from a nearly flat 6 V pack will sag. It cannot boost, so one 3.7 V cell cannot make 5 V. And input and output share a ground, so there is no isolation between battery and logic.

## Set the output before you connect anything

1. Connect only the input: battery or bench supply to IN+ and IN−. Leave OUT disconnected.
2. Clip a multimeter across OUT+ and OUT−, set to DC volts, and watch the display rather than the screw.
3. Turn the trimmer with a small insulated screwdriver. Clockwise usually raises the voltage, but multi-turn modules may need ten turns.
4. Stop at 5.0–5.1 V for a logic rail, or 6.0 V for a servo rail. Do not force the trimmer past its end stops.
5. Power-cycle, confirm the setting survived, then connect the load and measure again at the load end of the wires.

A module set to 12 V will destroy an ESP32 faster than you can open the serial monitor. Mark the voltage on the board with a paint pen and recheck it after the robot has been in a bag; a knock on the trimmer moves it.

| Load | Input | Set output to | Note |
| --- | --- | --- | --- |
| ESP32 or Arduino logic | 7.4–12 V | 5.0–5.1 V | Feed the 5 V pin, never the 3.3 V pin |
| Servo rail | 7.4–12 V | 6.0 V | SG90 and MG996R are rated 4.8–6 V |
| Raspberry Pi 4 or 5 | 7.4–12 V | 5.1 V | These boards want 3 A or more; the module will run hot |
| 3.3 V sensor bus | 7.4–12 V | 5 V, then an LDO | A linear second stage removes most of the ripple |

*Measure at the load, not at the module. Thin jumpers drop tens of millivolts per amp and make a correct setting look wrong.*

## Wiring and the common ground

- **IN+:** battery positive through the main switch and a 2–3 A fuse. The module has neither.
- **IN−:** battery negative, which is also the robot’s common ground.
- **OUT+:** the 5 V pin of the controller, or VSYS on a Pico. Never feed 5 V into a 3.3 V pin.
- **OUT−:** the same ground as the motor driver, joined at one point.
- **Capacitors:** 100–470 µF at the input for long battery leads, and 100 µF plus 100 nF at the load.
- **Separation:** keep the inductor and input loop away from sensor wiring, the camera ribbon and the antenna.

Motors never run from this board. They run from the battery through the motor driver; the buck supplies logic only. A missing ground joint looks like a software fault: the controller boots from USB, then resets when the buck is connected because the return current is crawling through a thin jumper.

## The 3 A label and heat

Three amps is the chip’s rating with a proper heatsink and a genuine part. The common blue module has no heatsink, a small inductor and a diode of uncertain margin, so 1.5–2 A continuous is a more honest working figure. Efficiency at 12 V to 5 V is typically 75–85%, so a 2 A load turns roughly 2 W into heat on a board the size of a postage stamp.

- **Touch test:** if you cannot hold a finger on the chip for a few seconds, it is too hot to bury in a plastic chassis.
- **Derate:** plan for half the label in still air, and add a heatsink or airflow above 1 A.
- **Clone quality:** counterfeit chips, undersized inductors and ordinary diodes in place of Schottky parts are common at this price.

Above 2 A, a 5 A XL4015 module is the better buy.

## Ripple and sensitive loads

A switching converter outputs a DC level with a sawtooth on top, typically tens of millivolts and larger at full load. That is harmless for a motor driver’s logic inputs and noticeable everywhere else: ADC readings jitter, ultrasonic sensors return odd values, and servos twitch. The fault usually appears only when the motors run, as the battery sags.

- Add 100 µF and 100 nF at the load, not only at the module.
- Shorten the output wires and twist the pair.
- Power analog sensors through a small LDO after the buck, or from USB while you calibrate.

## When to use something else

- **Boost or buck-boost:** a single cell to 5 V needs an MT3608; if the 2S pack will fall below 5 V, a buck-boost holds the rail through the whole discharge.
- **Charging:** a buck is a voltage source, not a charger. Use a CC/CV charger and a protected pack.
- **Tiny loads:** a linear regulator is simpler and quieter below about 200 mA with a small voltage difference.
- **High current:** move to a module with a heatsink rather than trusting the label on a 3 A board.

The wider power picture, including grounds and brownouts, is in [how to power a robot](https://roboticsengineering.in/how-to-power-a-robot/). For the battery side, the [18650 pack guide](https://roboticsengineering.in/components/18650-battery-pack/) covers protection and the [robot battery guide](https://roboticsengineering.in/robot-battery-guide/) explains pack sizing. Price the build with the [project cost calculator](https://roboticsengineering.in/robotics-project-cost-calculator/).

## Common questions

**Can I use the LM2596 to charge an 18650 cell?**

No. It holds a constant voltage and has no charge termination. Use a dedicated charger with CC/CV behaviour and a protection board.

**Why does my ESP32 reset when the motors start?**

Usually supply sag or a ground loop, not the code. Measure the 5 V rail at the ESP32 while the motors run; if it dips below about 4.7 V, the buck or the battery is the problem.

**The output reads 5 V on the multimeter but the board still misbehaves.**

A multimeter averages. Switching ripple and short dips do not show up. Add decoupling at the load and check with an oscilloscope if you can.

## Sources and further reading

Battery University, [BU-205: Types of lithium-ion](https://batteryuniversity.com/article/bu-205-types-of-lithium-ion), for how the 2S pack behind the converter behaves. Arduino, [language reference](https://docs.arduino.cc/language-reference/), for the `analogRead` and `map` functions used to monitor a divided rail.

Last reviewed: October 2026. Specifications checked against the Texas Instruments LM2596 datasheet and common module documentation. Not bench-tested by this site. Prices are Indian retail ranges; clones vary.
