CN109950947A - Battery management system based on STM32 - Google Patents
Battery management system based on STM32 Download PDFInfo
- Publication number
- CN109950947A CN109950947A CN201910117169.8A CN201910117169A CN109950947A CN 109950947 A CN109950947 A CN 109950947A CN 201910117169 A CN201910117169 A CN 201910117169A CN 109950947 A CN109950947 A CN 109950947A
- Authority
- CN
- China
- Prior art keywords
- battery
- module
- afe
- master controller
- stm32
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004891 communication Methods 0.000 claims abstract description 30
- 238000000034 method Methods 0.000 claims description 9
- 238000012544 monitoring process Methods 0.000 claims description 9
- 239000004065 semiconductor Substances 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 3
- 238000009529 body temperature measurement Methods 0.000 claims 1
- 230000005611 electricity Effects 0.000 abstract description 10
- 238000007726 management method Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 230000010354 integration Effects 0.000 description 2
- 101000880640 Centruroides elegans Beta-mammal toxin CeII9 Proteins 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000003990 capacitor Substances 0.000 description 1
- 238000011109 contamination Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000035800 maturation Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000035922 thirst Effects 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
- 238000005303 weighing Methods 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E60/00—Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
- Y02E60/10—Energy storage using batteries
Abstract
The invention discloses a kind of battery management systems based on STM32, including master controller, power module, serial communication modular, data memory module, AFE, temperature-measuring module, battery equilibrium drive module;The master controller is connect with serial communication modular, data memory module, AFE respectively;The AFE with temperature-measuring module, battery equilibrium drive module except also connecting in addition to master controller;The power module is master controller, serial communication modular, data memory module power supply;The AFE, temperature-measuring module, battery equilibrium drive module realize self-powered by external cell.The present invention can effectively monitor battery operation state, accurately estimate battery capacity, and pass through main controller controls AFE, so that battery is in charge and discharge, battery pack being capable of balanced discharge, it reduces each battery in battery pack and extends battery life, and play battery optimum working performance because being lost caused by electricity unevenness.
Description
Technical field
The invention belongs to information systems technology field more particularly to a kind of battery management systems based on STM32.
Background technique
By long-term development, traditional resource is increasingly depleted, and people thirst for finer ecological environment.Conventional vehicles
Since noise is big, pollution is high, consumes more, low efficiency, the development of social economy and ecology is seriously constrained.Some technical fields
Maturation makes the appearance of new traffic tool become possibility.Wherein, the carrier being driven by electricity small, free of contamination spy with its noise
Point is favored by masses, and growth momentum is swift and violent.But the cruising ability of electric carrier becomes the great of this field of restriction development
Bottleneck.How certain electricity is obtained and utilized to greatest extent, becomes urgent problem to be solved.
Summary of the invention
Goal of the invention: in view of the above problems, the present invention proposes a kind of battery management system based on STM32, pass through control
AFE realizes monitoring to battery, control and protection, while calculating SOC value of battery by current integration method, obtains accurately
Electricity.
Technical solution: to achieve the purpose of the present invention, the technical scheme adopted by the invention is that: it is a kind of based on STM32's
Battery management system, including master controller, power module, serial communication modular, data memory module, AFE, temperature measure mould
Block, battery equilibrium drive module;The master controller is connect with serial communication modular, data memory module, AFE respectively;It is described
AFE is connect with temperature-measuring module, battery equilibrium drive module;The power module is master controller, serial communication modular, number
It powers according to memory module;The AFE, temperature-measuring module, battery equilibrium drive module realize confession by access external cell
Electricity;The master controller is used for the control of battery voltage balanced and the measuring and calculating of SOC value of battery;The serial communication modular is used for
Master controller and external device communication receive and instruct and send information required by external equipment;The data memory module is used
In storage battery status information;The AFE is for monitoring battery operation state and control battery charge and discharge process;The temperature is surveyed
Amount module is for measuring battery pack temperature;The battery equilibrium drive module is for assisting AFE monitoring battery operation situation and putting down
Weigh cell voltage.
Further, the master controller is STM32F103ZE chip.
Further, the serial communication modular uses MAX3232 chip, and Transistor-Transistor Logic level is converted into 232 signals.
Further, the data memory module using the FLASH of W25Q64 come storing data information, and for being inserted into
The deck of SD card carrys out transfer data information.
Further, the AFE uses bq76940 chip.
Further, the temperature-measuring module uses 10K ohm of NTC resistance.
Further, the power module uses LM5166 chip.
Further, the battery equilibrium drive module constitutes switching circuit using metal-oxide-semiconductor, provides interface and external cell
Connection.
The utility model has the advantages that the present invention can effectively monitor battery operation state, battery capacity is accurately estimated, and pass through master control
Device processed controls AFE so that battery is in charge and discharge, battery pack can balanced discharge, reduce in battery pack each battery because of electricity
It is lost caused by unevenness, extends battery life, and play battery optimum working performance.
Different from the battery management system of commercial type, this system uses the cell tube of high-performance STM32+bq76940
Reason scheme provides data memory module for storing data, facilitates diagnostic system mistake;And increase serial communication modular and its
He communicates equipment, enhances its expansion.
Detailed description of the invention
Fig. 1 is overall structure figure of the invention.
Specific embodiment
Further description of the technical solution of the present invention with reference to the accompanying drawings and examples.
As shown in Figure 1, the battery management system of the present invention based on STM32, including master controller, power module,
Serial communication modular, data memory module, the AFE for monitoring and controlling battery operation, temperature-measuring module, battery equilibrium drive
Dynamic model block.Wherein, master controller is connect with serial communication modular, data memory module, AFE respectively;AFE is removed and master controller
Outside, it is also connect with temperature-measuring module, battery equilibrium drive module;Power module is master controller, serial communication modular, data
Memory module power supply;Serial communication modular is used for master controller and external device communication, receives and instructs and send external equipment institute
It is required that information;Data memory module is used for storage battery status information, including voltage value, current value, battery temperature value, SOC
Value and error diagnosis value;AFE controls battery charge and discharge process for monitoring battery operation state;Temperature-measuring module is used for
Measure battery pack temperature.
AFE uses bq76940 chip, which is a highly integrated AFE(analog front end), and the prison to battery may be implemented
Depending on, control and protection.So-called monitoring refers to electric current, voltage and temperature in its ADC module acquisition battery operation using itself
Degree;So-called control refers to that it connect with battery equilibrium drive module, is realized by controlling the module to electricity each in battery pack
The equilibrium of cell voltage;So-called protection refers to that it has the function of overcurrent electric discharge, short circuit dischange, over-voltage and low-voltage variation.The chip
Itself do not have independently operated ability, it is communicated by I2C agreement with master controller, is received to instruct and send master controller and be wanted
The information asked.In addition, it is also connect by ALERT line and WAKE line between master controller.When the status register of bq76940
When any one position is by set, ALERT line is pulled up, and prompts master controller to have important information needs to check, and according to different feelings
Condition takes corresponding treatment measures;When bq76940 needs to initialize or when from SHIP mode wakeup, master controller draws high WAKE
Line, bq76940 can automatically reset or enter NORMAL mode.
AFE module assumes responsibility for the pivotal player of battery management, passes through battery equilibrium module and battery downstream in systems
Detection foot be connected, be directly connected to NTC resistance, while its upstream passes through I2C communication and ALERT line and WAKE line and master
Controller connection.The AFE uses normal mode, and in this mode, ADC is enabled, and 14 of bq76940 and 16 ADC are called out
It wakes up, the former is responsible for acquiring the voltage AD value and outside batteries temperature AD value at single battery both ends, and the latter is then responsible for acquisition electric current
AD value.On the acquisition mode of electric current AD value, using normal mode, setting CC_EN (bit6) in SYS_CTRL2 register is 1,
CC_ONESHOT (bit5) is 0.In this way, every 250ms, AFE will automatic collection primary voltage data, and SYS_STAT is posted
ALERT line is drawn high in CC_READY (bit7) set in storage, and master controller is reminded to check voltage data.When needing balancing battery
When packet voltage, then the Balance route position 1 of battery pack can will be corresponded in CELLBALx (x=1,2,3) register, reach balanced electricity
Wrap the requirement of interior each cell voltage in pond.
Battery equilibrium drive module constitutes switching circuit using metal-oxide-semiconductor, provides interface and connect with external cell.It main
Function is auxiliary AFE monitoring battery operation situation and equilibrium cell voltage, belongs to AFE peripheral circuit, and one end is connect with AFE,
Other end extraction is connect with battery detection foot.Standard bq76940 is used for battery pack composed by 15 batteries, adopts in the embodiment
The battery pack formed with 12 batteries, therefore need to remove the equalizing circuit of original CELL4, CELL9, CELL14.Cell voltage
It is acquired by VCx (x=0~15) pin, is substantially the voltage value for acquiring capacitor between two neighboring pin.The balance of voltage
And it is controlled by VCx pin, but should be noted that the detection pin of only access single battery cathode can just be beaten
It opens mos pipe and its left side circuit is connected, so as to so that single battery electric discharge, makes current flow through resistance, consume extra electricity.
Transistor-Transistor Logic level is converted into 232 signals using MAX3232 chip by serial communication modular, realizes serial communication function;It should
Chip one end send information to master controller by TX line, receives the information of master controller transmission by RX line, patrols by inside
That collects circuit is converted into 232 signals, then communicates with other equipment.
Temperature-measuring module uses 3 10K ohm of NTC resistance.As the temperature rises, resistance value reduces the resistance.It should
The voltage value of resistance can be converted into AD value by bq76940, and go out resistance value by the formula scales: R=(10000 × V) ÷ (3.3-
V).Wherein, R is NTC resistance value, and V is voltage value, V=(ADC value) × 382 μ V/LSB.Then by tabling look-up, you can get it and resistance value
Corresponding temperature value.
Master controller is mainly used for the control to battery pack electric voltage equalization and the measuring and calculating of SOC value of battery, master controller are adopted
With STM32F103ZE chip.It is connected with AFE, serial communication modular, data memory module, for serial communication modular,
It is communicated using USART;For data memory module, SPI and SDIO pattern communication is used.Moreover, it is desirable on STM32
FatFs file system is transplanted, SPI and SDIO data transmit-receive function is linked into this document system.Text can thus be passed through
Part instruction operates file.This point is particularly significant for the data storage method based on SD card, because of these quilts
The data of storage need to be correctly displayed on computers.Master controller uses current integration method for the measuring and calculating of SOC,
That is:
Wherein, SOC0It is initial voltage value, can be measured by open circuit voltage method.C0It is possessed by battery constant-current discharge
Energy.η is charge and discharge electrostrictive coefficient.Because the every 250ms of AFE, which passes through internal coulomb counter, acquires primary voltage value, therefore t value can be set
It is 250.I refers to the average current value in 250ms, can not directly obtain, which passes through the resulting voltage of coulomb counter
Value is divided by with input resistance resistance value to be obtained.Since there is no judge whether battery needs by collected voltage value by AFE
Then the ability of weighing apparatus issues corresponding control instruction to AFE so needing to judge by master controller.It is specific
Control method is: master controller reads the voltage value of AFE acquisition, calculates the voltage of single battery, judges to need balanced electricity
Pond finally issues to AFE and instructs the balanced cell voltage.
Power module uses LM5166 chip, maintains system worked well.Power module uses LM5166 chip, by battery
Packet 48V voltage is down to 3.3V and works normally for master controller, serial communication modular, data memory module, and single battery is arranged
Less than being forced shutdown for 3V, i.e. 36V total voltage.Guarantee that battery is not discharged for a long time.
Data memory module is using the FLASH of W25Q64 come storing data information, and deck for being inserted into SD card comes
Transfer data information.Wherein, W25Q64 is communicated using SPI communication agreement with master controller;SD card seat uses SDIO agreement and master
Controller communication, data are deposited into SD card, thus can easily directly read data on computers by SD card.
Claims (8)
1. a kind of battery management system based on STM32, which is characterized in that including master controller, power module, serial communication mould
Block, data memory module, AFE, temperature-measuring module, battery equilibrium drive module;
The master controller is connect with serial communication modular, data memory module, AFE respectively;The AFE and temperature measure mould
Block, the connection of battery equilibrium drive module;The power module is master controller, serial communication modular, data memory module power supply;
The AFE, temperature-measuring module, battery equilibrium drive module realize self-powered by access external cell;
The master controller is used for the control of battery voltage balanced and the measuring and calculating of SOC value of battery;The serial communication modular is used
In master controller and external device communication, receives and instruct and send information required by external equipment;The data memory module
For storage battery status information;The AFE is for monitoring battery operation state and control battery charge and discharge process;The temperature
Measurement module is for measuring battery pack temperature;The battery equilibrium drive module is for assisting AFE monitoring battery operation situation simultaneously
Equilibrium cell voltage.
2. the battery management system according to claim 1 based on STM32, which is characterized in that the master controller is
STM32F103ZE chip.
3. the battery management system according to claim 1 based on STM32, which is characterized in that the serial communication modular
Using MAX3232 chip, Transistor-Transistor Logic level is converted into 232 signals.
4. the battery management system according to claim 1 based on STM32, which is characterized in that the data memory module
Deck using the FLASH of W25Q64 come storing data information, and for being inserted into SD card carrys out transfer data information.
5. the battery management system according to claim 1 based on STM32, which is characterized in that the AFE is used
Bq76940 chip.
6. the battery management system according to claim 1 based on STM32, which is characterized in that the temperature-measuring module
Using 10K ohm of NTC resistance.
7. the battery management system according to claim 1 based on STM32, which is characterized in that the power module uses
LM5166 chip.
8. the battery management system according to claim 1 based on STM32, which is characterized in that the battery equilibrium driving
Module constitutes switching circuit using metal-oxide-semiconductor, provides interface and connect with external cell.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910117169.8A CN109950947A (en) | 2019-02-15 | 2019-02-15 | Battery management system based on STM32 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910117169.8A CN109950947A (en) | 2019-02-15 | 2019-02-15 | Battery management system based on STM32 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109950947A true CN109950947A (en) | 2019-06-28 |
Family
ID=67006827
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910117169.8A Pending CN109950947A (en) | 2019-02-15 | 2019-02-15 | Battery management system based on STM32 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109950947A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111668890A (en) * | 2019-12-10 | 2020-09-15 | 摩登汽车有限公司 | Communication method, device and system of power management system, battery and electric vehicle |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120094151A1 (en) * | 2010-10-13 | 2012-04-19 | Samsung Sdi Co., Ltd | Battery management system and method thereof, and power storage apparatus using the same |
JPWO2013061461A1 (en) * | 2011-10-28 | 2015-04-02 | ルネサスエレクトロニクス株式会社 | Battery system |
CN205407331U (en) * | 2016-03-02 | 2016-07-27 | 速珂智能科技(上海)有限公司 | Group battery intelligent management system suitable for new forms of energy car |
CN206195337U (en) * | 2016-10-26 | 2017-05-24 | 东莞启益电器机械有限公司 | Battery package protection control circuit |
CN207396562U (en) * | 2017-04-20 | 2018-05-22 | 深圳市瑞凡新能源科技有限公司 | A kind of correction compensation circuit for improving AFE(analog front end) precision |
-
2019
- 2019-02-15 CN CN201910117169.8A patent/CN109950947A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120094151A1 (en) * | 2010-10-13 | 2012-04-19 | Samsung Sdi Co., Ltd | Battery management system and method thereof, and power storage apparatus using the same |
JPWO2013061461A1 (en) * | 2011-10-28 | 2015-04-02 | ルネサスエレクトロニクス株式会社 | Battery system |
CN205407331U (en) * | 2016-03-02 | 2016-07-27 | 速珂智能科技(上海)有限公司 | Group battery intelligent management system suitable for new forms of energy car |
CN206195337U (en) * | 2016-10-26 | 2017-05-24 | 东莞启益电器机械有限公司 | Battery package protection control circuit |
CN207396562U (en) * | 2017-04-20 | 2018-05-22 | 深圳市瑞凡新能源科技有限公司 | A kind of correction compensation circuit for improving AFE(analog front end) precision |
Non-Patent Citations (2)
Title |
---|
杨洁等: "基于STM32F407+BQ76PL536的电池管理系统设计", 《电源技术》 * |
钟胜蓝等: "基于ISL9208的大容量锂电池组管理系统设计", 《电子元器件应用》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111668890A (en) * | 2019-12-10 | 2020-09-15 | 摩登汽车有限公司 | Communication method, device and system of power management system, battery and electric vehicle |
CN111668890B (en) * | 2019-12-10 | 2022-07-05 | 摩登汽车有限公司 | Communication method, device and system of power management system, battery and electric vehicle |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN206579491U (en) | A kind of low-power consumption Vehicular charger charging system | |
CN101561245A (en) | Bridge strain detection sensor based on wireless sensing network interface | |
CN107128191A (en) | A kind of electric automobile lithium-ion-power cell group voltage synchronous Acquisition Circuit and its control method | |
CN101551282A (en) | Bridge load detecting system based on wireless sensor network | |
CN201122849Y (en) | Dynamic monitoring apparatus for inside DC-DC unit of monitor | |
CN201387366Y (en) | Wireless force measuring device | |
CN109950947A (en) | Battery management system based on STM32 | |
CN212779641U (en) | Temperature measurement circuit and temperature sensor for IO power supply of single chip microcomputer | |
CN112706628B (en) | Awakening system of charging circuit | |
CN105632188B (en) | A kind of ultra-low power consumption wireless geomagnetic type vehicle detector and its control method | |
CN205596357U (en) | Open -air detection device of low -power consumption | |
CN207650368U (en) | A kind of electricity and power consumption management circuit applied to robot | |
CN207664703U (en) | A kind of standby power alarm power supply circuit | |
CN207955543U (en) | A kind of MCU module Low-power-consumptiodormancy dormancy circuit | |
CN113625689B (en) | Vehicle-mounted low-power-consumption CAN (controller area network) awakening system and method thereof | |
CN206573152U (en) | The easy-to-use multichannel low-power consumption sensor information acquisition system based on earphone hole | |
CN108282012A (en) | Cell managing device and system | |
CN207967220U (en) | A kind of temperature patrol inspection circuit suitable for power battery | |
CN204519431U (en) | A kind of medical personal protection clothes | |
CN202916420U (en) | Electric quantity detecting circuit of mobile power supply | |
CN208272059U (en) | From control module and battery management system | |
CN207937447U (en) | Water quality monitoring system based on Internet of Things | |
CN206114048U (en) | Little consumption morning and evening tides liquid level changer | |
CN206193147U (en) | Portable intelligent battery package sampling pencil detecting system | |
CN213243585U (en) | Control circuit and device of buoy |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190628 |
|
RJ01 | Rejection of invention patent application after publication |