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:
| Input | Output | Load | Input current needed |
|---|---|---|---|
| 3.7 V | 5 V | 0.5 A | about 0.8 A |
| 3.7 V | 5 V | 1 A | about 1.6 A |
| 3.0 V (cell nearly empty) | 5 V | 1 A | about 2.0 A |
| 3.7 V | 9 V | 0.5 A | about 1.4 A |
| 3.7 V | 12 V | 0.3 A | about 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.
- 1Connect the battery to IN+ and IN-, with the polarity checked twice. Leave the output unconnected.
- 2Put a multimeter across OUT+ and OUT-.
- 3Turn the trimmer slowly with a small screwdriver. On most boards clockwise raises the voltage, but watch the meter to confirm.
- 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.
- 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
| Symptom | Likely cause | Fix |
|---|---|---|
| Output roughly equals the input | Trimmer is set below the input voltage | Turn the trimmer to raise the output, watching the meter |
| Output sags or the board resets under load | The source cannot supply the higher input current, or the wires are thin | Use a stronger source, shorter and thicker wires, and a larger capacitor on the input |
| Module gets hot | High current at a large step-up ratio | Reduce the load or the ratio |
| Noisy sensor or ADC readings | Switching ripple at 1.2 MHz | Add 100 µF and 100 nF across the load, and keep analog sensors on a filtered supply |
| No output at all | Reversed polarity damage, or the input is below about 2 V | Check 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 pin | STM32 Blue Pill pin | Note |
|---|---|---|
| IN+ / IN- | Battery / low-voltage source | 2-24V input, not connected to the Blue Pill |
| OUT+ | 5V pin | Trim to ~5.0-5.2V under load before connecting |
| OUT- | GND |
Swipe sideways to see every column →
- 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
18650 Holder
Single-cell 18650 holder for portable project power.
AMS1117 33
Fixed 3.3V linear regulator for powering logic-level components.
CN3065
Solar-friendly single-cell Li-ion charger. 4.2 V, 500 mA out of the box.
LM2596
Adjustable buck converter for efficiently stepping down higher voltages to project logic levels.
TP4056
Single-cell Li-ion charging module with protection — the standard for USB-powered lithium charging.
Related Guides & Projects
STM32 Low-Power Modes: Sleep, Stop, and Standby Explained (With Working Code)
A practical guide to STM32's three-tier low-power system — Sleep, Stop, and Standby — with working STM32duino code, measured current draw on a Blue Pill, and a battery-powered project example.
STM32 Blue Pill Pinout: Every GPIO, ADC, and Alternate Function Explained
A complete STM32F103C8T6 Blue Pill pinout reference: every GPIO port, ADC channel, timer, and communication bus mapped, plus the 5V-tolerance and clone-board considerations that affect wiring decisions.
STM32 Black Pill Pinout: Every GPIO, ADC, and Peripheral Explained
Complete STM32 Black Pill (STM32F411CEU6) pinout reference: GPIO ports, 12-bit ADC, timers/PWM, USART, SPI, I2C, and the 3.3V-only pins to watch out for.
STM32 Nucleo Pinout: Arduino Headers, Morpho Connectors, and GPIO Explained
Complete STM32 Nucleo pinout reference: Arduino-compatible headers vs ST Morpho connectors, the built-in ST-LINK debugger, ADC voltage limits, and every peripheral pin mapped.