Skip to content
S

Voltage Regulator

Using MT3608 Voltage Regulator with STM32 Blue Pill

What is the MT3608?

What is the MT3608 boost converter?

A boost converter takes a low voltage and produces a higher one. It does this by switching current through a small inductor very quickly (1.2 million times a second here) and collecting the energy at a higher voltage. The MT3608 module wraps that into a board about the size of a postage stamp, with a trimmer to set the output.

The common job is turning one 3.7 V Li-ion cell (3.0 V empty, 4.2 V full) into a steady 5 V for an ESP32 board, an Uno, a display or a sensor. It can also lift a couple of AA cells to 5 V or 9 V.

A boost converter cannot give you something for nothing. If it raises the voltage, it needs more current on the input than it supplies on the output.

Tip

Boost only. If your source voltage is already higher than what you need, the output just follows the input. Use a buck (step-down) converter such as the LM2596 instead. The MT3608 also does not charge batteries. Pair it with a charger like the CN3065 or TP4056.

How much current can you really draw?

The 2 A on the label does not mean 2 A at the output. It is a rating of the chip's internal switch, and the input has to carry more current than the output. The input current is roughly:

Iin = (Vout × Iout) ÷ (Vin × efficiency)

The table below assumes 85 % efficiency, which is realistic for a small module:

InputOutputLoadInput current needed
3.7 V5 V0.5 Aabout 0.8 A
3.7 V5 V1 Aabout 1.6 A
3.0 V (cell nearly empty)5 V1 Aabout 2.0 A
3.7 V9 V0.5 Aabout 1.4 A
3.7 V12 V0.3 Aabout 1.1 A

See the third row. As a battery drains, the voltage falls and the current it must supply for the same load rises. A cell with a weak protection board can cut out right when the demand is highest. For a 5 V board that draws 1 A, size the battery and wiring for 2 A or more of input current.

  1. 1Connect the battery to IN+ and IN-, with the polarity checked twice. Leave the output unconnected.
  2. 2Put a multimeter across OUT+ and OUT-.
  3. 3Turn the trimmer slowly with a small screwdriver. On most boards clockwise raises the voltage, but watch the meter to confirm.
  4. 4Stop at the voltage your board needs: 5.0 to 5.2 V for an ESP32 or Uno 5 V pin, 9 V or 12 V for other loads.
  5. 5Disconnect the battery, connect your board to the output, then power it up and check the voltage again under load.

Warning

Never turn the trimmer while a 3.3 V or 5 V board is connected. A trimmer that loses contact for a moment can let the output jump toward its maximum, which is enough to destroy the board. Always set the voltage on the meter first.

The idle drain

The MT3608 uses about 100 to 200 µA on its own even when nothing is connected (datasheet figure for the chip, and the trimmer network adds a little more). That is small for a project that is always awake, but large for one that sleeps. An ESP32 chip in deep sleep draws about 10 µA, so a boost converter feeding it can use ten times more than the sleeping board.

The module has no way to switch off: the converter stays connected to the battery, and the boost path would still pass the battery voltage through to the output even if it were disabled. For a node that sleeps most of the time, either power it through a low-quiescent regulator, or add a switch in front of the converter.

Troubleshooting

SymptomLikely causeFix
Output roughly equals the inputTrimmer is set below the input voltageTurn the trimmer to raise the output, watching the meter
Output sags or the board resets under loadThe source cannot supply the higher input current, or the wires are thinUse a stronger source, shorter and thicker wires, and a larger capacitor on the input
Module gets hotHigh current at a large step-up ratioReduce the load or the ratio
Noisy sensor or ADC readingsSwitching ripple at 1.2 MHzAdd 100 µF and 100 nF across the load, and keep analog sensors on a filtered supply
No output at allReversed polarity damage, or the input is below about 2 VCheck the polarity and measure the input

Frequently asked questions

Can I power an ESP32 from a single Li-ion cell with it? Yes. Set the output to about 5.1 V and feed the 5V or VIN pin. See the wiring section for your board.

Can it charge a battery? No. It only boosts. Use a charger such as the CN3065 or TP4056 for charging.

Can it step the voltage down? No. Use a buck converter such as the LM2596.

What is the lowest input it works from? The chip is specified from 2 V. For a reliable startup with a load, keep the input a little higher, and remember that the input current rises as the voltage falls.

Setting Up MT3608 with STM32 Blue Pill

Wiring

Component pinSTM32 Blue Pill pinNote
IN+ / IN-Battery / low-voltage source2-24V input, not connected to the Blue Pill
OUT+5V pinTrim to ~5.0-5.2V under load before connecting
OUT-GND

Swipe sideways to see every column →

C++
  • Same calibration-aid approach as the other boards — power the Blue Pill separately while adjusting the trimmer, then move OUT+ to the real 5V pin once it settles.
  • Divider math matches the ESP32 example since both use a 3.3V, 12-bit ADC.
  • Usual Blue Pill Serial-over-USB caveat applies if you don't see output on the native USB port.

Related Components

Related Guides & Projects