Batteries, DC/DC Converters
Lithium-ion batteries have become the standard power source for most portable and embedded devices today from smartphones and laptops to IoT sensors, robots, and ESP32 or STM32 development boards. They are compact, lightweight, and offer high energy density, but they also require proper handling.
Unlike regular disposable batteries, Li-ion cells operate within a narrow voltage range and are sensitive to charge and discharge conditions. Power management mistakes can lead not only to unstable microcontroller operation, but also to rapid battery degradation or even hazardous situations.
In this article, we’ll explore how Li-ion batteries work, their key parameters, and how to properly charge and integrate them into power supply circuits for electronic projects.
Key Parameters of Li-Ion Batteries
1) Nominal Voltage
The nominal voltage of a Li-ion battery is typically 3.6–3.7 V and is specified as the average operating voltage of the cell. It is important to understand that this is not a fixed voltage, but rather a conventional value that describes the battery’s behavior across most of its discharge range.
In reality, the voltage of a Li-ion cell constantly changes: a fully charged battery is about 4.2 V, around 3.7 V in the middle of its discharge cycle, and drops to approximately 3.0 V when nearly depleted.
This means a microcontroller is never powered by a perfectly stable 3.7 V — the supply voltage always varies depending on the state of charge and the load current. That is why voltage regulators or DC-DC converters are typically used in Li-ion-based circuits to provide stable power to the microcontroller regardless of battery condition.
2) Capacity
The capacity of a Li-ion battery indicates how much electric charge it can deliver and is usually measured in milliampere-hours (mAh) or ampere-hours (Ah).
For example, a 3000 mAh battery can theoretically supply 3000 mA for one hour or 300 mA for ten hours under ideal conditions. In practice, actual runtime depends on factors such as load current, temperature, discharge rate, and battery aging.
3) Energy
The energy parameter reflects how much actual work a battery can perform and is measured in watt-hours (Wh).
Unlike capacity in mAh, which accounts only for current, energy also takes voltage into consideration. It is calculated as:
Wh = V × Ah
For example, a Li-ion cell with a nominal voltage of 3.7 V and a capacity of 3 Ah has an energy of approximately 11.1 Wh.
4) Maximum Discharge Current
The maximum discharge current specifies the amount of current the battery can deliver continuously and safely without overheating or experiencing accelerated degradation.
Datasheets typically list two values:
- Continuous discharge current
- Pulse (peak) current
For example, if a battery is rated at Continuous: 10 A and Pulse: 20 A, this means it can safely deliver 10 A continuously and up to 20 A for short periods.
5) C-rate (Current-to-Capacity Ratio)
C-rate is a way to express charge or discharge current relative to the battery’s capacity.
A rate of 1C corresponds to a current equal to the nominal capacity of the cell. For example, for a 3000 mAh (3 Ah) battery:
- 1C equals 3 A
- 0.5C equals 1.5 A
- 2C equals 6A
If the specifications state that the maximum discharge rate is 2C, it means the battery can safely deliver a current equal to twice its capacity in amperes.
A few words about discharge nonlinearity. Li-ion batteries do not discharge evenly — the terminal voltage follows a characteristic curve rather than decreasing linearly over time.
Typically, the process looks like this: right after charging, the voltage quickly drops from 4.2 V to around 3.9 V. This is followed by a long plateau phase, where the voltage remains relatively stable at about 3.6–3.7 V. Near the end of the discharge cycle, the voltage rapidly falls again down to the critical level of around 3.0 V.
Because of this behavior, voltage cannot be directly interpreted as a precise percentage of remaining charge. During the plateau phase, the battery can deliver a significant portion of its stored energy while the voltage changes very little.
Temperature also plays an important role. As you know, in cold conditions a battery discharges faster due to the slowdown of chemical reactions inside the cell. At higher temperatures, chemical reactions accelerate, which may temporarily improve performance — but it also speeds up battery aging and reduces overall lifespan.
Types of Li-Ion Batteries
Cylindrical Cells

The typical nominal voltage of these batteries is 3.7 V.
The designation 18650 stands for 18 mm in diameter and 65 mm in length.
Inside the cell, there is an electrolyte, and the casing is made of metal.
They typically support between 300 and 1000 charge–discharge cycles, depending on operating conditions and quality.
Prismatic (Flat) Cells

Flat Li-ion batteries (Prismatic and Pouch) have a nominal voltage of 3.6–3.7 V, capacities typically ranging from 500 mAh to 10,000 mAh, an energy density of 200–250 Wh/kg, and a maximum discharge current of 1–20 A depending on the model. Their mechanical strength is lower compared to cylindrical cells.
There are many other battery shapes depending on specific application requirements, but these two types are the most common.
Chargers
For 18650-type batteries, the TP4056 module is a convenient charging solution.

Specifications:
- Input: 5 V USB
- Output: 4.2 V, up to 1 A (adjustable)
- Designed to charge a single battery at a time.
- 4 terminals: Connect B+ / B- to the battery. If you need to power a circuit simultaneously, connect the OUT+ / OUT- terminals. In this case, the external circuit will run from the charging battery.
Battery Connection Schemes
As with most batteries, there are two main connection schemes: parallel and series. Each type has its own advantages and disadvantages, but series connections are most commonly used. Let’s look at both.
Parallel Connection
In a parallel connection, all the positive terminals are connected together, and all the negative terminals are connected together. In this configuration, the voltage remains the same as a single cell (for example, 3.7 V for Li-ion), while the total capacity and allowable discharge current are summed (two 3000 mAh cells → 6000 mAh). This increases the overall runtime.
It is important to connect only batteries that are identical in type, capacity, and state of charge; otherwise, large balancing currents can flow between them, which may be dangerous.
- Voltage: same as a single cell
- Capacity (runtime): higher
- Maximum current: higher
Series Connection
In a series connection, the positive terminal of one cell is connected to the negative terminal of the next, forming a “chain.” In this setup, the voltages add up (2 × 3.7 V – 7.4 V; 4 × 3.7 V -14.8 V), while the capacity (mAh) and maximum discharge current remain the same as a single cell.
The same current flows through all cells, so the system is limited by the weakest cell. For Li-ion batteries, a BMS (Battery Management System) with balancing is essential to prevent overcharging or over-discharging of individual cells.
Protection and Balancing
Battery balancing is the process of equalizing the voltage of individual cells in a series pack (2S, 3S, 4S, etc.) so that none of them overcharges or over-discharges before the others.
Why it’s needed:
In a series chain, the same current flows through all cells, but small differences in capacity and internal resistance can cause one cell to reach 4.2 V before the others during charging, or drop below 3.0 V during discharge. This is dangerous for Li-ion cells and shortens their lifespan.
Ready-made BMS modules (2S, 3S, 4S) are available; they monitor cell voltages and provide protection for your battery pack.
DC/DC Converters
A DC/DC converter is used to transform an input DC voltage into the required stable voltage for a circuit or load. It can either step the voltage down (buck) or step it up (boost), while regulating power and current with minimal losses.
This ensures stable operation of microcontrollers, motors, LEDs, and other devices regardless of fluctuations in the input voltage for example, from a battery.
There are three main types of DC/DC converters.
- Buck (Step-Down) Converter
For example: 12 V – 5 V.
Its operating principle is based on delivering energy to the load in short pulses through an inductor, while regulating the average output voltage by adjusting the duty cycle. - Boost (Step-Up) Converter
For example: 3 V – 5 V.
It works by storing energy in an inductor and then adding it to the input voltage when switching, controlling the output by adjusting the duty cycle. - Buck-Boost Converter
This is a combined topology that can both step down and step up the voltage. It stabilizes the output by controlling energy storage in the inductor and adjusting the PWM duty cycle, allowing it to either increase or decrease the voltage relative to the input.
Main Components of a DC/DC Converter:
- Switch (usually a MOSFET)
- Inductor (choke)
- Diode (or a synchronous MOSFET)
- Output capacitor
- Input capacitor
- Controller (PWM controller)
- Feedback circuit (voltage divider)
Galvanic isolation is sometimes added to protect the circuit.
Converters can be of two types: with a fixed output voltage or with an adjustable output voltage. In adjustable versions, the voltage is typically set using a trimmer potentiometer.
A few words about current.
If we use a step-down (buck) converter, the input current will be higher than the output current. This can be calculated using the formula P = U × I.
For example, suppose we need 12 V and 12 W at the output, while the input voltage is 3 V.
At the input:
I = P / U = 12 W / 3 V = 4 A
At the output:
I = 12 W / 12 V = 1 A
In addition, there are always power losses during conversion. On average, losses are around 10%, depending on the converter design and operating conditions.
Lithium-ion batteries have become the standard power source for modern portable and embedded devices due to their high energy density, compact size, and light weight. However, they require proper handling: maintaining the allowable voltage range, following correct charge–discharge modes, and monitoring temperature.
For safe and stable operation of multi-cell battery packs, BMS modules with balancing are used. Balancing equalizes the voltage of individual cells and protects them from overcharging, over-discharging, and short circuits.
To ensure that microcontrollers and electronic circuits receive a stable voltage regardless of the battery’s state of charge, DC/DC converters are used — including buck, boost, and buck-boost types. Using an inductor, switching element, and PWM controller, they regulate the average output voltage.
Together, BMS and DC/DC converters provide safe, efficient, and long-term power for electronic projects.