Published: July 16, 2026

Intelligent microprocessor system for diagnostics and balancing of rechargeable batteries of various electrochemical types

Saken Jarkeshev1
Asfandiyar Orynbay2
Nurgul Karymsakova3
Saltanat Yusupova4
Yerlan Eleukulov5
Yerkebulan Nurgizat6
1, 2, 3, 4, 5, 6Department of Instrumentation Engineering, Almaty University of Power Engineering and Telecommunications (AUES), Almaty, Kazakhstan
3Mukhametzhan Tynyshbayev ALT University, Head of the Department of Аutomation and Control, Almaty, Kazakhstan
Corresponding Author:
Saken Jarkeshev
Views 12
Reads 3
Downloads 24

Abstract

Contemporary energy storage deployments increasingly incorporate heterogeneous cell chemistries within a single installation, yet most commercial battery management circuits remain optimized for a single electrochemical type. This paper describes a microprocessor-controlled platform capable of autonomous diagnostics and charge equalization across four battery technologies: lithium-ion NMC, lithium iron phosphate (LiFePO₄), nickel-metal hydride (NiMH), and lead-acid. The measurement front-end is a 16-bit delta-sigma converter delivering 46 μV resolution and ±1.4 mV per-cell accuracy, interfaced to an STM32F446RE ARM Cortex-M4 processor at 180 MHz. Equalization combines resistive dissipation for voltage spreads below 50 mV with a switched-capacitor network achieving above 90 % energy-transfer efficiency for larger disparities. State-of-charge tracking couples’ coulomb integration with an adaptive extended Kalman observer, maintaining accuracy within ±3 % even from a 40 % seed-error initialization. Benchtop trials on four-cell series packs of each chemistry recorded inter-cell convergence to ±5 mV within 22 min, SOC root-mean-square error below 3 %, and correct automatic chemistry classification across all laboratory sessions. The novelty of the proposed system is not in the individual use of battery diagnostics or cell balancing, which are well-established topics, but in their integration into a single microprocessor-based multi-chemistry platform capable of automatic electrochemical-type identification, chemistry-specific parameter loading, adaptive SOC/SOH estimation, and hybrid passive-active balancing. This distinguishes the proposed approach from conventional BMS solutions optimized for only one battery chemistry.

Intelligent microprocessor system for diagnostics and balancing of rechargeable batteries of various electrochemical types

Highlights

  • A unified microprocessor-based BMS platform was developed for Li-ion NMC, LiFePO₄, NiMH, and lead-acid batteries.
  • The system performs automatic battery chemistry identification and loads chemistry-specific protection, SOC, SOH, and balancing parameters.
  • Experimental validation showed correct chemistry identification, SOC RMSE below 3 %, and voltage balancing from 120 mV to ±5 mV in 22 minutes.

1. Introduction

Rechargeable electrochemical cells have become an essential enabling technology for the electrification of transportation, consumer electronics, and grid-connected stationary storage. Their safe and efficient operation depends on a dedicated supervisory circuit – the battery management system (BMS) that continuously monitors cell voltages, pack current, and temperature while enforcing charge-control and fault-protection boundaries [1]. BMS engineering occupies the intersection of power electronics, real-time embedded computing, and electrochemical modelling, positioning it among the more demanding sub-disciplines within modern power systems research.

A comprehensive BMS executes several interrelated tasks concurrently. It estimates the state-of-charge (SOC), expressing remaining usable energy as a fraction of rated capacity, and the state-of-health (SOH), characterizing cumulative performance deterioration relative to the factory specification. These estimates drive both the fault-protection layer and the cell equalization hardware, closing a supervisory loop that extends service life and preserves available pack capacity [2].

Commercially deployed battery chemistries span a wide electrochemical space. NMC lithium-ion cells achieve gravimetric energy densities of 150-250 Wh/kg and sustain 800-1 500 deep cycles, establishing them as the primary choice for passenger electric vehicles and portable equipment. LiFePO₄ cells accept reduced energy density (90-120 Wh/kg) in exchange for markedly superior intrinsic thermal stability and cycle lives reaching 2 000-7 000 cycles, a trade-off that favors stationary and commercial vehicle platforms [3].

Nickel-metal hydride and lead-acid batteries remain relevant in hybrid drivetrains and UPS applications owing to lower cost and established operational reliability [4].

Managing an installation with multiple chemistries requires a BMS capable of autonomous reconfiguration. The proposed platform addresses this need through automatic chemistry identification and start-up parameter selection [5].

Although battery diagnostics, SOC estimation, SOH assessment and cell balancing have been widely studied, most existing BMS solutions address these tasks for a predefined electrochemical system and fixed operating thresholds. In practical distributed energy-storage installations, however, different battery chemistries may coexist or be replaced during maintenance, which creates a need for a controller that can autonomously identify the battery type and reconfigure its diagnostic, protection and balancing parameters. This gap is particularly important for low-cost embedded BMS platforms, where diagnostic accuracy, computational simplicity and balancing efficiency must be achieved simultaneously.

The main contributions of this study are as follows. First, a unified microprocessor-based BMS architecture is proposed for four electrochemical technologies: Li-ion NMC, LiFePO4, NiMH and lead-acid. Second, an automatic chemistry-identification procedure is integrated with the start-up configuration of voltage, current, temperature, SOC and SOH thresholds. Third, a hybrid balancing strategy is implemented, where passive balancing is used for small voltage deviations and switched-capacitor active balancing is applied for larger deviations. Fourth, the platform is experimentally validated on four-cell packs of each chemistry, demonstrating voltage convergence to ±5 mV within 22 min, SOC RMSE below 3 %, and correct chemistry classification in all laboratory sessions.

2. System architecture and hardware design

The proposed hardware is structured in four vertically layered tiers: signal acquisition, computation and control, energy management, and external communication [6].

2.1. Measurement layer

Cell voltages are digitized by a 16-bit delta-sigma converter in multiplexed mode, scanning all series cells sequentially. The converter delivers 46 μV quantization resolution and ±1.4 mV worst-case linearity error – sufficient to resolve sub-10 mV gradients that initiate equalization in lithium-based cells [7]. Bidirectional current is sensed via a precision 1 mΩ shunt driving an instrumentation amplifier with gain error below 0.1 %. NTC thermistors (B-constant 3 950 K) are positioned at one per three cells and additionally on the switching transistors of the active balancing module where local heating is highest [8].

2.2. Control and computing layer

The processing core is an STM32F446RE (ARM Cortex-M4) clocked at 180 MHz via a phase-locked loop, with a single-precision floating-point unit completing a multiply-accumulate in a single pipeline cycle. The device provides 512 kB of flash for firmware and per-chemistry calibration tables, and 128 kB of SRAM for real-time state structures. All protection thresholds – overvoltage, undervoltage, overcurrent, and overtemperature – are stored in non-volatile memory and loaded at start-up following chemistry identification [9]. State estimation approaches applicable to this microprocessor architecture are surveyed in [10].

Table 1Electrochemical characteristics of the four battery technologies supported by the system

Parameter
Li-ion (NMC)
LiFePO₄
NiMH
Lead-acid
Nominal voltage, V/cell
3.6-3.7
3.2
1.2
2.0
Energy density, Wh/kg
150-250
90-120
60-120
30-50
Cycle life, cycles
800-1 500
2 000-7 000
500-1 000
300-500
Charge voltage, V/cell
4.20
3.65
1.45
2.40
Cut-off voltage, V/cell
3.00
2.50
1.00
1.75
Self-discharge, %/month
2-3
1-3
15-20
3-5

2.3. Chemistry-dependent reconfiguration logic

A key functional element of the proposed BMS is the chemistry-dependent reconfiguration logic implemented at the firmware level of the STM32F446RE microcontroller. Unlike conventional fixed-chemistry BMS boards, where protection thresholds, balancing limits and SOC/SOH model parameters are selected during the design stage, the proposed platform performs an automatic start-up identification procedure and reconfigures its diagnostic and balancing parameters according to the detected electrochemical type. This function is especially important for modular storage systems, laboratory battery testbeds and maintenance environments where battery packs of different chemistries may be connected to the same diagnostic unit.

The reconfiguration procedure is executed immediately after connection of the battery pack and before enabling charge, discharge or balancing commands. At the first stage, the microcontroller samples all cell voltages through the 16-bit measurement front-end and calculates the average per-cell open-circuit voltage, maximum cell voltage, minimum cell voltage and inter-cell voltage spread. These values are compared with predefined electrochemical voltage windows stored in non-volatile memory. The initial decision is based on nominal voltage ranges, while charge-voltage and cut-off-voltage limits are used as additional confirmation criteria. For example, lithium-ion NMC cells are associated with a nominal voltage of 3.6-3.7 V and a charge limit of 4.20 V per cell, while LiFePO4, NiMH and lead-acid cells have different nominal and protection boundaries. Therefore, the same measurement hardware can distinguish the connected battery chemistry and select the appropriate operational profile.

After successful chemistry identification, the firmware loads the corresponding configuration profile. This profile includes overvoltage and undervoltage limits, maximum allowable charge and discharge conditions, temperature protection boundaries, SOC estimation parameters, SOH baseline resistance values, and balancing-mode constraints. The loaded parameters are then used by the diagnostic algorithms and the balancing controller. In this way, the identification result is not only used for classification, but directly changes the behaviour of the BMS during operation.

The reconfiguration process can be represented as the following sequence:

Step 1: measure open-circuit voltages of all connected cells.

Step 2: calculate average per-cell voltage and inter-cell voltage spread.

Step 3: compare measured values with chemistry-specific voltage windows.

Step 4: identify the most probable electrochemical type.

Step 5: load the corresponding protection, SOC, SOH and balancing parameters.

Step 6: enable diagnostic and balancing operation only after successful validation.

If the measured voltage profile falls outside all predefined windows or overlaps between two possible chemistries, the system enters a safe waiting mode. In this mode, balancing and charge-control commands are blocked, and the measurement procedure is repeated after a stabilization delay. This prevents the incorrect use of lithium-oriented protection thresholds for aqueous or lead-acid batteries and reduces the risk of unsafe operation caused by wrong chemistry selection.

The main configuration groups activated after chemistry identification are summarized in Table 2.

Table 2Chemistry-dependent configuration parameters loaded by the STM32 firmware

Parameter group
Function in the BMS
Chemistry-dependent configuration
Voltage protection limits
Prevents overcharge and deep discharge
Charge voltage, cut-off voltage and nominal operating range are selected according to NMC, LiFePO4, NiMH or lead-acid chemistry
SOC estimation parameters
Supports accurate charge-state calculation
Nominal capacity, OCV-SOC reference curve and EKF correction parameters are loaded for the detected chemistry
SOH baseline values
Tracks degradation and internal resistance growth
Initial resistance and capacity reference values are selected according to the battery type
Balancing-mode constraints
Selects passive or active equalization strategy
Passive mode is preferred for small voltage spreads and selected chemistries; active switched-capacitor balancing is enabled for larger voltage deviations
Fault-handling thresholds
Ensures safe operation under abnormal conditions
Overcurrent, overtemperature and voltage-deviation limits are adapted to the detected chemistry

This firmware-level reconfiguration is one of the main distinguishing features of the proposed system. The novelty of the approach is not the use of voltage measurement, SOC estimation or balancing as separate functions, since these are established BMS tasks. The novelty lies in combining automatic chemistry identification, chemistry-specific parameter loading, adaptive SOC/SOH diagnostics and hybrid balancing within one microprocessor-controlled platform. As a result, the same hardware can operate with lithium-ion NMC, LiFePO4, NiMH and lead-acid batteries without manual retuning of control parameters.

3. Diagnostic algorithms

3.1. State of charge estimation

The SOC estimator employs a two-layer architecture. The lower layer performs coulomb counting by numerically integrating the measured cell current:

1
SOC(t) = SOC(t) - (1/Qnom×  I(τ) dτ,

where SOCt0 is the initial charge state, Qnom is nominal cell capacity in ampere-hours, and Iτ is the signed instantaneous current with discharge negative. Coulomb integration is susceptible to sensor-offset accumulation over time, necessitating periodic correction by a higher-level observer [11, 12].

The correction layer is an adaptive extended Kalman filter (EKF) linearised around a second-order Randles equivalent-circuit model. The filter updates its error-covariance using the normalized innovation at each step, preventing divergence as cell parameters shift with temperature or ageing. The state vector encompasses the SOC and two RC-branch polarization voltages. The combined estimator-maintained SOC error within ±3 % even from a 40 % seed-error initialization – a condition representative of a cold-start or replacement event [13].

3.2. State of health assessment

Cell degradation is tracked through two indicators. The first is the ohmic series resistance R₀, extracted from the instantaneous voltage step following a controlled current pulse. A sustained upward drift in R₀ beyond a chemistry-specific baseline reliably precedes capacity loss; once the threshold is exceeded, the firmware raises a degradation flag and narrows the usable SOC window accordingly [14].

The second indicator is the directly measured discharge capacity, obtained by coulomb-integrating a reference cycle at C/5 rate. Supplementary information is collected by superimposing small sinusoidal perturbations over 0.1 Hz to 1 kHz during rest intervals; the resulting partial Nyquist arc is matched against chemistry-specific degradation templates to identify the dominant ageing mechanism [15].

4. Cell balancing strategy

Voltage equalisation uses a dual-mode circuit whose operating point is selected each balancing cycle by comparing the peak inter-cell difference against a 50 mV boundary, with the chemistry identifier loaded at start-up determining additional mode constraints [16].

4.1. Passive balancing module

For inter-cell spreads below 50 mV, the passive circuit is activated. A dedicated N-channel MOSFET connects a wire-wound resistor across each cell; the resistor draws approximately 200 mA at the maximum cell voltage. Gate drive uses a PWM signal whose duty cycle scales proportionally with each cell's deviation from the pack average, tapering the equalization current as the voltage gap narrows [17]. This dissipative mode is reserved for lead-acid and NiMH cells, where resistive loss is acceptable given the comparatively modest per-cell stored energy.

4.2. Active balancing module

Spreads at or above 50 mV engages the switched-capacitor redistribution network. A 220 μF flying capacitor is alternately charged from the stronger cell and discharged into the weaker neighbor via four MOSFET pairs driven by the STM32 timer at 50 kHz. Energy drawn from the higher-voltage cell is delivered to the lower-voltage cell rather than dissipated, with measured net transfer efficiency reaching 91.3 % in laboratory characterization [18]. For lithium-chemistry packs, this topology reduces equalization time from the 6-12 h typical of resistive methods to under 30 min from a 120-mV initial spread. A quantitative comparison is provided in Table 3.

Table 3Performance comparison of passive and active equalization circuits

Parameter
Passive balancing
Active balancing
Balancing current
100-200 mA
1-6 A
Energy efficiency
~0 % (heat dissipated)
> 90 %
Equalisation time (4-cell)
6-12 h
< 30 min
Activation threshold
< 50 mV spread
≥ 50 mV spread
Circuit complexity
Low
High
Preferred chemistry
Lead-acid, NiMH
Li-ion, LiFePO4

5. Experimental results and discussion

Benchtop validation was performed on four independent four-cell series packs, one per chemistry. Test cells were Samsung INR21700-50E for NMC (5 000 mAh, 3.6 V), EVE LF105 prismatic for LiFePO4 (105 Ah, 3.2 V), Panasonic HHR-650D for NiMH (6 500 mAh, 1.2 V), and Yuasa NP7-12 for lead-acid (7 Ah, 2.0 V). Before each sequence, a pre-charge routine established four distinct SOC levels within each pack to create a defined initial voltage spread for equalization characterization.

Table 4 presents per-cell terminal voltages recorded during a representative NMC active-balancing session. Starting from a 120-mV spread (3.730 V to 3.850 V), the switched-capacitor circuit converged all four cells to within ±5 mV after 22 min – consistent with the design specification.

Table 4Per-cell terminal voltage during active equalization of the NMC 4S pack (initial spread 120 mV)

Time, min
Cell 1, V
Cell 2, V
Cell 3, V
Cell 4, V
0
3.850
3.790
3.730
3.820
5
3.830
3.800
3.770
3.820
10
3.820
3.800
3.790
3.810
15
3.810
3.800
3.800
3.810
22
3.805
3.800
3.800
3.805

SOC estimation accuracy was assessed over 50 consecutive charge-discharge cycles per chemistry. The coulomb-counted charge accumulated at C/5 rate served as the ground truth; the Kalman-estimated SOC was logged every second and the RMSE was computed across all samples. Each run started from a deliberately introduced 30 % SOC seed error to exercise the filter convergence under an adversarial initialization. Table 5 summarizes the results.

Table 5SOC estimation metrics for the adaptive EKF across four chemistries (50-cycle evaluation)

Chemistry
SOC RMSE, %
Max Error, %
Convergence, s
Li-ion (NMC)
1.8
3.1
45
LiFePO4
2.4
4.2
60
NiMH
2.1
3.8
55
Lead-acid
2.9
4.9
75

NMC yielded the lowest RMSE (1.8 %) owing to its well-defined voltage-SOC slope, which provides strong correction signals to the Kalman update. The flat open-circuit-voltage plateau of LiFePO4 between 20 % and 80 % SOC reduces filter observability in that interval, raising RMSE to 2.4 %, in agreement with published findings for this chemistry [19]. Lead-acid cells showed the greatest estimation difficulty (RMSE 2.9 %), attributable to pronounced charge-discharge voltage hysteresis and strong sensitivity of open-circuit voltage to electrolyte stratification and temperature. Despite this, the achieved accuracy remains within tolerances acceptable for practical storage applications [20]. Accelerated ageing trials spanning 200 full cycles on the NMC pack confirmed that the SOH module correctly registered a 12 % reduction in usable capacity and an 18 % increase in ohmic resistance. Firmware-extracted resistance values agreed with potentiation EIS reference measurements to within ± 5 % throughout the ageing sequence. Automatic chemistry identification was evaluated over ten randomized connection sessions per module type; the open-circuit voltage profiling algorithm classified every session correctly, demonstrating that the defined voltage-threshold boundaries reliably separate all four chemistries even under partial discharge conditions.

The obtained results demonstrate that the proposed architecture provides a practical solution to the problem of multi-chemistry battery management. The scientific novelty is expressed in the integration of chemistry identification, adaptive SOC/SOH estimation and hybrid balancing within a single embedded control loop. From an engineering perspective, this reduces the need for separate BMS designs for each electrochemical type and supports modular energy-storage systems in which battery modules may be replaced or combined during operation. The experimental results support this claim: all tested chemistries were correctly identified, the SOC RMSE remained below 3 %, and active balancing reduced the voltage spread to ±5 mV within 22 min.

6. Conclusions

This study presented a reconfigurable microprocessor-based BMS platform for diagnostics and balancing of rechargeable batteries of different electrochemical types. Unlike conventional BMS solutions designed for a fixed chemistry, the proposed system integrates automatic chemistry identification, chemistry-specific parameter loading, adaptive SOC/SOH estimation and hybrid passive-active balancing in a single embedded architecture. This integrated multi-chemistry capability represents the main novelty of the work.

Active equalization converged inter-cell voltages to within ±5 mV in under 22 min from a 120 mV initial spread, reducing equalization time by more than 95 % relative to resistive-only operation. The adaptive EKF maintained SOC RMSE below 3 % for every chemistry tested, and the internal-resistance SOH monitor agreed with EIS reference measurements to within ±5 % over a 200-cycle ageing sequence. All laboratory chemistry-identification sessions were classified correctly, confirming robustness of the voltage-threshold approach under realistic conditions.

Future work will focus on scaling the cell count, improving SOH prediction through data-driven methods, and enabling wireless telemetry for distributed installations.

References

  • M. A. Hannan, M. S. H. Lipu, A. Hussain, and A. Mohamed, “A review of lithium-ion battery state of charge estimation and management system in electric vehicle applications: challenges and recommendations,” Renewable and Sustainable Energy Reviews, Vol. 78, pp. 834–854, 2017, https://doi.org/10.1016/j.rser.2017.05.001
  • A. Barré, B. Deguilhem, S. Grolleau, M. Gérard, F. Suard, and D. Riu, “A review on lithium-ion battery ageing mechanisms and estimations for automotive applications,” Journal of Power Sources, Vol. 241, pp. 680–689, Nov. 2013, https://doi.org/10.1016/j.jpowsour.2013.05.040
  • Y. Nishi, “Lithium ion secondary batteries; past 10 years and the future,” Journal of Power Sources, Vol. 100, No. 1-2, pp. 101–106, 2001, https://doi.org/10.1016/s0378-7753(01)00887-4
  • D. Linden and T. B. Reddy, Handbook of batteries. New York, USA: McGraw-Hill, 2011.
  • Ankit N. Brahmbhatt, “Effective cell balancing methods for electric vehicle applications: a review,” Journal of Electrical Systems, Vol. 20, No. 9s, pp. 3343–3353, Jun. 2024, https://doi.org/10.52783/jes.9210
  • “Industrial battery management system (BMS).” Application Note AN5419, STMicroelectronics. https://www.st.com (accessed 2025).
  • “BQ76952 3-series to 16-series battery monitor and protector.” Datasheet SLUSCK2, Texas Instruments, 2023, https://www.ti.com
  • “An engineer’s guide to current sensing.” Application Note SLYY154A, Texas Instruments, 2023, https://www.ti.com.
  • “STM32F446xC/E reference manual.” RM0390 Rev. 8, Stmicroelectronics, 2023, https://www.st.com.
  • R. Xiong, J. Cao, Q. Yu, H. He, and F. Sun, “Critical review on the battery state of charge estimation methods for electric vehicles,” IEEE Access, Vol. 6, pp. 1832–1843, Jan. 2018, https://doi.org/10.1109/access.2017.2780258
  • T. Huria, M. Ceraolo, J. Gazzarri, and R. Jackey, “Simplified extended Kalman filter observer for SOC estimation of commercial power-oriented LFP lithium battery cells,” in SAE Technical Paper Series, Vol. 1, 2013, https://doi.org/10.4271/2013-01-1544
  • “Coulomb counting and state of charge estimation,” Application Note R01AN6614EJ0100, Renesas Electronics, 2023.
  • G. L. Plett, “Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs,” Journal of Power Sources, Vol. 134, No. 2, pp. 277–292, 2004, https://doi.org/10.1016/j.jpowsour.2004.02.033
  • H. Rauf, M. Khalid, and N. Arshad, “Machine learning in state of health and remaining useful life estimation: theoretical and technological development in battery degradation modelling,” Renewable and Sustainable Energy Reviews, Vol. 156, p. 111903, Mar. 2022, https://doi.org/10.1016/j.rser.2021.111903
  • E. Barsoukov and J. R. Macdonald, Impedance spectroscopy: theory, experiment, and applications. Hoboken, NJ, USA: Wiley, 2018.
  • “Fundamental understanding of battery management system – part 2: balancing.” Application Note DS00003560, Microchip Technology, 2023, https://www.microchip.com.
  • S. Ci, N. Lin, and D. Wu, “Reconfigurable battery techniques and systems: a survey,” IEEE Access, Vol. 4, pp. 1175–1189, Jan. 2016, https://doi.org/10.1109/access.2016.2545338
  • B. Jiang, “Active cell balancing algorithms in lithium-ion battery,” Chalmers University of Technology, Gothenburg, Sweden, 2020.
  • W. Waag, C. Fleischer, and D. U. Sauer, “Critical review of the methods for monitoring of lithium-ion batteries in electric and hybrid vehicles,” Journal of Power Sources, Vol. 258, pp. 321–339, Jul. 2014, https://doi.org/10.1016/j.jpowsour.2014.02.064

About this article

Received
April 14, 2026
Accepted
June 2, 2026
Published
July 16, 2026
SUBJECTS
Materials and measurements in engineering
Keywords
battery management system
cell balancing
state of charge estimation
state of health assessment
microprocessor diagnostics
multi-chemistry battery platform
Acknowledgements

The authors have not disclosed any funding.

Data Availability

The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.

Conflict of interest

Dr. Yerkebulan Nurgizat, Prof. Nurgul Karymsakova are scientific committee members of the 77th International Conference on Vibroengineering and were not involved in the editorial review and/or the decision to publish this article.