Home

Guide no. 18

Lowering, raising or holding steady a voltage that changes: which converter you need, how to adjust it and which numbers to check before buying. With the current and efficiency math already worked out.

By Ada Intelisano · informaticait.it technical team

Download the PDF (A4, 3 pages) Free to print and share, without changes — CC BY-ND 4.0
In short
  • Step-down (buck): output lower than the input, from 12 V to 5 V. Step-up (boost): output higher, from a 3.7 V battery to 5 V. Buck-boost: the input can be above or below the output.
  • Power is not created: in a boost the current drawn from the battery is higher than the current that comes out.
  • There are four numbers to look at: minimum and maximum input voltage, the real output current (not the switch rating), efficiency and heat.
  • An adjustable module is set with no load, using the multimeter, before you connect the board to it.

Which one you need

Which converter you need0033669912121515input voltage (V)output voltage (V)STEP-DOWN(buck)STEP-UP(boost)Li-ion 3.0–4.2 V → 3.3 V: buck-boost12 → 5 V3.7 → 5 Vinformaticait.it

If the input is always higher than the output, a step-down is enough; if it is always lower, a step-up. The in-between case is the lithium battery: it goes from 4.2 V when charged to 3.0 V when flat, so to get a steady 3.3 V it moves from above to below. That is where you need a buck-boost (or a low-dropout LDO, accepting that you lose the last part of the charge).

Step-down: how it works

Step-down (buck) switching regulator12 Vswitchdiodeinductor5 V12 V pulsessteady 5 VThe switch is on only part of the time: energy flows in packets and little is lost.informaticait.it

The switch stays on for part of the period, the duty cycle. In the ideal case Vout = D × Vin: to get 5 V from 12 V it stays on about 42 % of the time. The output current can be higher than the current going in.

Step-up: how it works

Step-up (boost) regulator3.7 Vinductorswitchdiode5 VInput current is higher than output current: power is not created, only converted.informaticait.it

Here the switch connects the inductor to ground: it charges, then when the switch opens its voltage adds to the input voltage and goes through the diode to the output. In the ideal case Vout = Vin ÷ (1 − D): from 3.7 to 5 V the duty cycle is about 26 %.

A confusing word. Texas Instruments also uses “buck-boost” for the circuit that gives a negative output. The modules sold to makers as buck-boost (for example the Pololu S7V8F5) keep the same polarity instead: always check the datasheet.

Working out the current

Output power = Vout × Iout. Power taken at the input = output power ÷ efficiency. So Iin = Vout × Iout ÷ (η × Vin).

Step-down from 12 V to 5 V, 2 A (assuming 85 % efficiency, the order of magnitude given for the LM2596 and XL4015 in their datasheets): the load uses 10 W, the power supply delivers 10 ÷ 0.85 = 11.8 W, that is about 1 A at 12 V; 1.8 W stays in the module as heat.
Step-up from a battery to 5 V, 1 A (same 85 % efficiency): you need 5.9 W. With the battery charged at 3.7 V that is 1.6 A; when it drops to 3.0 V it becomes almost 2 A. This is why a “2 A” boost does not give 2 A at the output: the number is usually the switch limit, which carries the input current plus the inductor ripple.

The adjustable module

A typical adjustable moduleIN+IN−OUT+OUT−trimmer: sets the outputinductorICGeneric drawing: terminal names and positions changebetween modules, read the marking on yours.informaticait.it

Almost all adjustable modules have four terminals (input + and −, output + and −), a chip, an inductor and a trimmer that changes the feedback divider: Vout = Vref × (1 + R2 ÷ R1), with Vref given in the chip datasheet (1.25 V for the XL4015, 0.6 V for the MT3608, 0.8 V for the MP1584).

How to adjust it without breaking anything

  1. Connect only the input supply, no load.
  2. Put the multimeter on the output terminals, set to DC voltage.
  3. Turn the trimmer slowly until you reach the value you need; with a multi-turn trimmer it can take several turns before you see any change.
  4. Switch off, connect the load, switch back on and check again: under load the voltage can drop a little.

Common chips and modules (datasheet figures)

TypeInputOutputCurrentFrequency
LM2596step-downup to 40 V1.2–37 V3 A150 kHz
XL4015step-down8–36 V1.25–32 V5 A180 kHz
MP1584step-down4.5–28 V0.8–25 V3 A100 kHz–1.5 MHz
MT3608step-up2–24 Vup to 28 Vswitch limited to 4 A1.2 MHz
Pololu S7V8F5buck-boost2.7–11.8 Vfixed 5 V0.5 to 1 A depending on voltage—
Pololu U1V10F5step-up0.5–5.5 Vfixed 5 Vswitch 1.2 A—

The MP1584 is marked by the manufacturer as “not recommended for new designs” (replacement: MP2338). The MT3608 datasheet is not published on the manufacturer's website: the figures come from a copy distributed by Olimex.

Things to check before buying

  • Minimum input voltage. Every chip has a threshold below which it shuts down (MP1584: 3.0 V; the XL4015 needs at least 8 V), and a step-down needs some headroom above the output: the LM2596 loses about 1.3 V at 3 A.
  • Real output current. On boost modules the big number on the package is often the switch rating; the output current is lower.
  • Efficiency. It changes with input voltage and load: the Pololu D24V10F5 goes from about 92 % at 9 V to about 84 % at 32 V.
  • Heat. Even at 90 %, a module delivering 20 W dissipates about 2 W: Pololu warns that its regulators can get hot enough to burn you.
  • Polarity. Many modules are not protected against reversed input wires.
  • Spikes at power-on. With long cables and high input voltages, overvoltage spikes can occur: above 20 V Pololu recommends a 33 µF electrolytic capacitor close to the input (D24V10F5).

Common mistakes

What happensWhyFix
Board burned as soon as it is connectedtrimmer left at maximum: the output was almost at the input voltagealways adjust with no load, using the multimeter
The step-up shuts down or the battery “dies” earlycurrent drawn from the battery higher than expected, especially when it is nearly flatredo the math with the battery's minimum voltage
Step-down that does not regulateinput too close to the output or below the chip thresholdchoose a buck-boost or raise the input
ESP32 that resets while transmittingthe converter cannot handle the current peaksa module with more headroom and a capacitor on the output
Noisy analog readingsswitching ripple on the sensors' supplya filter or an LDO after the converter
Use cases. ESP32 or Arduino from a 12 or 24 V power supply: step-down. Lithium battery project with a 5 V module: step-up. 3.3 V sensor from a lithium cell that discharges: buck-boost. Solar panel with variable voltage: check the input range.
Sources: Texas Instruments, SLVA477C (calculating the power stage of a buck), SLVA372D (boost), SNVA559C “Switching regulator fundamentals” · Texas Instruments, LM2596 datasheet (SNVS124G); XLSemi, XL4015 datasheet Rev 2.0; MPS, MP1584 datasheet Rev 1.0 · Aerosemi, MT3608 datasheet (copy distributed by Olimex) · Pololu, product pages for S7V8F5, D24V10F5 and U1V10F5 (data and graphs)

Useful products

Other guides

All our guides →
Loading...
Back to top