Sunteți pe pagina 1din 55

School of Electrical, Electronic and Computer Engineering

Group Design Project:


Title:

State-of-Charge (SOC) Calculation for Automotive


Battery Management System (BMS)

Authors

Uchenna C. Adimmadu
HerveManara
KibromFitsum
Erwin WJ Choy

Monitors

Prof. Nick Cowern


Dr. Patrick Briddon

Academic Year: 2011-2012


SUBMITTED IN SUPPORT OF THE DEGREE OF:

ELECTRICAL &ELECTRONIC/ELECTRONIC ENGINEERING (MEng)


TABLE OF CONTENTS
Table of Figures ...................................................................................................................................................... 4

List of Tables ........................................................................................................................................................... 5

Acronyms ................................................................................................................................................................ 6

Abstract .................................................................................................................................................................. 7

Introduction ............................................................................................................................................................ 8

1.1 Project background ............................................................................................................................. 8

1.1.1 Lithium ion batteries ...................................................................................................................... 8

1.1.2 Battery management systems....................................................................................................... 11

1.2 Problem Identification& Project Scope .......................................................................................... 13

1.3 Aim and Objective............................................................................................................................. 14

1.4 ROAD MAP OF THIS PROJECT .................................................................................................. 14

Software Acknowledgment .............................................................................................................................. 15

Project plan AS GANTT chart.......................................................................................................................... 16

Design Methodology (Software) ........................................................................................................................... 17

2.1 Introduction:...................................................................................................................................... 17

2.2 State of Charge Calculation ............................................................................................................. 18

2.2.1 Phase 1 (ADC): .............................................................................................................................. 20

2.2.2 Phase 2 (I2C):................................................................................................................................. 28

Design Methodology (Hardware) ......................................................................................................................... 37

3.1 INTRODUCTION ............................................................................................................................. 37

3.2 HARDWARE of battery management circuit ..................................................................................... 37

3.2.1 MASTER and Display BOARDS ................................................................................................ 37

3.2.2 SLAVE BOARD ............................................................................................................................ 38

Results & Analysis ................................................................................................................................................. 42

4.1 Simulated Results: ............................................................................................................................. 42

4.2 Experimental Results: ....................................................................................................................... 46

Conclusion ............................................................................................................................................................ 51

Future Work:..................................................................................................................................................... 53

P a g e |2
Reference.............................................................................................................................................................. 54

Appendix A1..............................................................................................................Error! Bookmark not defined.

Project Challenges and Limitations Experienced ..................................................Error! Bookmark not defined.

Appendix A2..............................................................................................................Error! Bookmark not defined.

Cost Evaluation .....................................................................................................Error! Bookmark not defined.

Appendix B1 ..............................................................................................................Error! Bookmark not defined.

Overall Schematic Diagram...................................................................................Error! Bookmark not defined.

Appendix B2 ..............................................................................................................Error! Bookmark not defined.

Schematic for Slave Board ....................................................................................Error! Bookmark not defined.

Appendix C1 ..............................................................................................................Error! Bookmark not defined.

Master Board ........................................................................................................Error! Bookmark not defined.

Appendix C2 ..............................................................................................................Error! Bookmark not defined.

Display Board ........................................................................................................Error! Bookmark not defined.

Appendix C3 ..............................................................................................................Error! Bookmark not defined.

Slave Board ...........................................................................................................Error! Bookmark not defined.

Appendix C4 ..............................................................................................................Error! Bookmark not defined.

Testing the System................................................................................................Error! Bookmark not defined.

Appendix D1 .............................................................................................................Error! Bookmark not defined.

Program Code-1 ....................................................................................................Error! Bookmark not defined.

P a g e |3
TABLE OF FIGURES
Figure 1-1 Charge stages of Lithium-ion cells ....................................................................................................... 9

Figure 1-2 Four cell battery, charged: balanced (a) and unbalanced (b). .............................................................. 10

Figure 1-3 Four cell battery, discharged: balanced (a) and unbalanced (b). ......................................................... 11

Figure 1-4 BMS's SOCstate indicator................................................................................................................... 12

Figure 1-5 BMS monitoring battery charge and balancing cell voltage ............................................................... 13

Figure 2-1: Architecture of the proposed Battery Management System ........................................................... 18

Figure 2-2: Flowchart for Proposed SOC estimation ........................................................................................... 19

Figure 2-3: Schematic of the voltage divider using resistor R1 and R2 .............................................................. 21

Figure 2-4: Schematic diagram showing how the voltage and current are to be measured ............................. 23

Figure 2-5: Li-Ion discharge characteristics with reference to ambient temperature ....................................... 27

Figure 2-6: Hardware block diagram of the proposed design ............................................................................ 29

Figure 2-7: Schematic showing the connection of the DS1621 and 24c02c EEPROM ........................................ 32

Figure 3-1: Start USB for PIC Board ..................................................................................................................... 37

Figure 4-1: Simulated Schematic for analogue temperature, voltage and current measurements .................. 42

Figure 4-2: Simulation of the designed BMS schematic...................................................................................... 43

Figure 4-3 .............................................................................................................................................................. 45

Figure 4-4: (A) Main screen Display (B) Display when switch 1 is pressed ........................................................ 45

Figure 4-5: (A) Display of the main Screen. (B) Screen Display when Switch 1 is pressed ................................ 47

Figure 4-6: Li-Ion Cell Discharge Characteristics ................................................................................................. 48

Figure 4-7 screen display of the actual LCD ....................................................................................................... 49

Figure 4-8: SOC graphs using both old (left) and new (right) estimation Methods ........................................... 49

Figure 4-9: Li-Ion Cell SOC Graph, comparing both the new and the old methods ........................................... 50

Figure 0-1: Top copper layer view of Designed Master PCB .....................................Error! Bookmark not defined.

Figure 0-2: PCB version of the Master Board ...........................................................Error! Bookmark not defined.

Figure 0-1: Top and Bottom Layer view of PCB ........................................................Error! Bookmark not defined.

Figure 0-2: PCB of the Display board including the LCD ...........................................Error! Bookmark not defined.

Figure 0-1: Testing the reliability of the designed safety measures .........................Error! Bookmark not defined.

Figure 0-2: A messy view from the rigorous testing exercise ...................................Error! Bookmark not defined.

P a g e |4
LIST OF TABLES

Table No Description Page

Table 1.0 Li-Ion Manufacturers Cell Specification……………………………………19

Table 2.0 Comparison of Current Sensing methods [9]………………………………..21

Table 3.0 Specifications for the Li-Ion Cell used……………………………………...41

P a g e |5
ACRONYMS

BMS - Battery Management System

SOC - State of Charge

SOH- State of Health

EV- Electric Vehicle

ERV - Electric Racing Vehicle

HEV- Hybrid Electric Vehicle

EEPROM- Electrically Erasable Programmable Read-Only Memory

PCB - Printed Circuit Board

ADC - Analogue-to-Digital Converter/Conversion

I2C - Inter-Integrated Communication

SDA -Serial Data Line

SCLK –Serial Clock Line

DAS – Data Acquisition System

A/D – Analogue/Digital

LED –Light Emitting Diode

LCD – Liquid Crystal Display

VDC – Direct Current Voltage

ICSP - In Circuit Serial Programming

PIC18F2550 – Microprocessor/Microcontroller

P a g e |6
ABSTRACT

Battery demand for automobile applications has increased dramatically in the last decade.
since being considered as central component in solving pollution problems caused by the
emission of gasoline-powered engines. In the automobile industry, the interest in battery
powered engine has greatly increased due to its advantages on the environmental impact.
However, there has been a constant challenge in the management of the entire battery system
as well as the fuel gauge estimation.

Li-ion Batteries are commonly used as the source of fuel for Electric Vehicles (EV).
Therefore, this paper focuses on the improvement of the State-of-Charge estimation of the
NR8 Formula-student race car. In order to accomplish this, a new Battery Management
System (BMS) that monitors and protects the operation of the battery is proposed and
designed. The designed SOC estimation acts as a fuel gauge system, measuring and
transmitting the information on the battery capacity to the Display Board (Driver) and other
relevant ports.

P a g e |7
CHAPTER 1
INTRODUCTION
The objectives of this chapter are to motivate the project subject and objectives by giving a
fundamental understanding to the battery management system (BMS); create a connection
with the existing literature on the design, operation and performance of the BMS; highlights
of identify problems with the NR8Formula student race car’s existing BMS and formulate a
roadmap of the project (including project Gantt-Chart).

1.1 PROJECT BACKGROUND

1.1.1 LITHIUM ION BATTERIES

The Lithium Ion (Li-Ion) battery technology has grown dramatically fast since early 1970s
when first non-rechargeable lithium batteries became commercially available to consumers.
In the 1991, re-chargeable lithium ion was introduced in the market by the Sony Corporation.
Few years later, Li-Ion has become the market leader in the re-chargeable small format
battery market. Today, Li-Ion is the fastest growing and most promising battery chemistry as
they have the highest energy density, and among the highest power densities, comparing to
any cell commercially available today. Li-Ion battery is capable of producing an amazing
performance, and is the standard choice for many electronics consumers such as mobile
phones; laptop etc. Beyond being electronics consumer’s standard choice, Li-Ion battery has
gained popularity in electric vehicle (EV), hybrid electric vehicle (HEV), aerospace and
renewable applications [1-3].

Li-Ion cells performs incredibly well in comparison with other battery types, but it becomes
intolerant if or when operated outside its safe operating area (SOA). The operation of Li-Ion
cells outside their SOA may result in many detrimental consequences ranging from
bothersome to the hazardous. Usually, the effect of operating Li-Ion cells outside the SOA is
that the cell’s life cycles reduce or simply cells are damages. However in some other situation
where for example when a cell or battery packs is overheated from over-voltage, over-
current, or external temperature heating; this can result in far more dangerous physical
damages such as busting into flames.

P a g e |8
It is understood in [2] that the safe operating area (SOA) of Li-Ion cells is bound by current,
voltage and temperature. This tells that the three parameters listed are fundamental in
prolonging the life span of Li-Ion cells if they are operated according with the manufactures
operating range specified. The life cycles of Li-Ion cells are therefore determined by the
number of charging and discharging cycles of the cells with respect to the voltage, current,
and temperature charging and discharging rate.

From charging viewpoint, Li-Ion cells are charging process is subdivided into four stages
according to the Battery University studies as presented in Figure 1. It is important to
mention that most Li-Ion cells have nominal voltage of 3.6V/cell and are allowed for
charging at 4.2V/cell maximum.

Figure 1-1 Charge stages of Lithium-ion cells

The Li-Ion cell is primarily charged by applying constant current (CC) to the battery, until the
voltage limit for each individual cell is reached. Secondly balancing cell voltages in the
battery pack required for accurate state of charge to be obtained or estimated. Lastly, constant
voltage (CV) is applied to equal individual maximum cell voltage in the battery pack, as the
current decreases exponentially to its minimum at full charge rate.

P a g e |9
Balancing Li-Ion cell voltage in the battery pack is an important thing to do for avoiding
over-charging or over-discharging any cell within a battery pack. This is to improve and
maintain battery’s maximum performances and also its reliability. In practice, when a high
voltage battery with many cells connected in series is charged, voltage distribution among
individual cells is usually unbalanced. An example of the effect of unbalanced cell is given in
[2] which are illustrated in Figure 1.2 and Figure 1.3 for cell over-charging and over-
discharging case respectively.

Figure 1-2 Four cell battery, charged: balanced (a) and unbalanced (b).

Considering the charged case for battery with four cells in series fully charged under both
balanced and unbalanced situation as shown in Figure 1.2 (a) and (b); if the charger has a
perfect balancing circuit, then the cell voltage in the pack is expected to be equally balanced
as found in Figure 1-2 (a). However, in most cases this is not a reality. In reality, one or
couple cell in the battery pack get charged more than others and become over-charged above
the manufacture’s maximum charge rate. This increases the risk for thermal runaway
occurring in that particular cell; example cell 2 (from the top in Figure 1-2 (b)) has a potential
risk causing thermal runaway due to being overly charged.

P a g e | 10
Figure 1-3 Four cell battery, discharged: balanced (a) and unbalanced (b).

Similarly when discharging battery, the discharge voltage level of each cell in the battery is
unequal as a result in being unbalance charged. The least charged cell during the charging
process become the most discharged and exceeding the maximum discharge rate i.e. over-
discharged. Although other cell’s discharge level remain within the safe operating area; the
overall performance of the battery will be affected as cell 4 is over-discharged and could be
damaged if discharged further (we consider example in figure 1-3 (b)). This is why it is
important that Battery Management System, BMS monitors batteries to prevent any cell in a
high voltage battery (i.e. Electric Vehicle, Electric Racing vehicle (ERV), etc.) from both
over-charging and over-discharging.

1.1.2 BATTERY MANAGEMENT SYSTEMS

Battery management systems are generally defined according to their particular designed
functions. This means that BMS has no unique definition designated to it. However among
different definition that BMS may be described, there is one common word which ensembles
all possible definition of the BMS; and that is “battery protection”. The position functions
which may feature in any BMS are:

 Motoring the battery;


 Protecting the battery;
 Estimating the battery’s state;
 Maximising the battery’s performance;
 Reporting any hazards in the battery state to users and/or external devices.

P a g e | 11
Without going into much general details, this project focuses on BMS function for electric
vehicles (EV); more precisely Electric Racing vehicle (ERV).

The functions of a BMS in a hybrid electric vehicle (HEV) and electric vehicle (EV) are
complicated. They include monitoring the conditions of individual cells which make up the
battery, maintaining all the cells within their operating limits, protecting the cells from out-
of-tolerance conditions, compensating for any imbalances in cell parameters within the
battery chain, providing information about the State of Charge (SOC), State of Health (SOH),
and Remaining Useful Life (RUL) of the battery, providing the optimum charging algorithm
for charging the cells, responding to changes in the vehicle operating mode and so on [4-5].

The objective of the BMS application in electric vehicle may defer to that of Electric Racing
vehicle (ERV) in the way that the State of Health (SOH) of the battery seems to be less of
interest for the electric race car; which is not the case for EV. This is because for electric race
car, crew are much interest in winning the race and/or breaking the record. Therefore power
demand is much higher and is (power) used in more brutal way comparing to normal
environmental EV. For ERV, accurate and truthful estimation of State of Charge (SOC) is the
most interest for ensuring battery never operates in the lower part of Safe Operating Area
(SOA) as shown below (Figure1-4).

Figure 1-4 BMS's SOC indicator

P a g e | 12
Consider unbalanced charging case of the battery discussed under “lithium battery”
subsection; battery management system may also include a balancing circuit which is served
to balance cell voltage in the pack to improve battery performances as shown in figure 1-5.

Figure 1-5 BMS monitoring battery charge and balancing cell voltage

1.2 PROBLEM IDENTIFICATION& PROJECT SCOPE

After a brief discussion with the Mechanical Students in the NR8 team, a list of possible
improvements was drafted:

1) The BMS system taken from the team was written in Assembly Language. This
language is slower in terms of processing speed. It is difficult to read and improve on
as not many members have background knowledge on Assembly Language. It is
suggested that the language be changed to C/C++. This higher-level language is easier
to interpret and processes faster.

2) PIC16F886 was used as the Master’s microprocessor. This microprocessor has


smaller memory space and lower processing power. PIC18F2550 was suggested to
replace PIC16F886.

3) The slave chips were connected serially with one PIC12F683 monitoring each
individual battery. This makes obtaining of the battery information slow and difficult.
For example if we would like the information from battery six, the Master would have
to read from the first battery to the sixth battery. The master would then have to wait

P a g e | 13
for the information to be passed to the last slave chip before the data can be received
finally. A form of multiplexing circuit to monitor each individual cell was suggested
to allow faster obtaining of the relevant data from the batteries.

4) With the change of components, the PCB layout will have to change to accommodate
the components.

1.3 AIM AND OBJECTIVE

The Aims and Objectives of this project are as follows:

1) Research and understand existing BMS system which are available in the market
2) Design and implement an improved BMS system
a. Better warning system
b. Able to monitor individual battery pack (4 cells)
c. Written in C language which is easier to understand
d. Using PIC18F2550 which has better processing power and has better accuracy
in ADC conversion
e. Able to do SOC calculation using not only voltage, current and temperature.
3) Test and compare the results obtained from the improved system to the old system
provided by the Mechanical Students
4) Designing PCBs which incorporates all improved subsystems (Master, Slave and
Display)

1.4 ROAD MAP OF THIS PROJECT

This paper will be divided into the following sections:

 Chapter 1: Introduction and Project specification would be defined here


 Chapter 2: The software design methodology using ADC and I2C would be discussed
 Chapter 3: The software schematic design will be realised using hardware implementation
 Chapter 4: The results and analysis of the software and hardware would be presented
 Chapter 5: The paper would be concluded and possible future works would be suggested

P a g e | 14
Table 1 Contribution table

Uchenna C Kibrom Ngongo H Erwin WJ


Adimmadu Fitsum Manara Choy
Chapter 1 Small Large Medium
Phase 1(ADC)
Large Small
Chapter 2
Phase 2(I2C)
Medium Large

Chapter 3 Large Large Small

Chapter 4 Large

Chapter 5 Medium Medium Medium Medium

SOFTWARE ACKNOWLEDGMENT

The software used in this project has been played a significant factor in its succession and
demonstration in this document.

Below is the list of software used,

Proteus ISIS - a simulation program for both high and low-level micro-
controller code in the context of a mixed-mode SPICE circuit simulation. It
was used in design of the overall structure of battery management system.

Proteus ARES –This is software package within Proteus Professional which


is used to design PCB board from the ProteusISIS schematic design.

DESIGN SPARK – is a long established product and combines ease of use


with powerful editing tools. It was also used to model schematic capture for
both simulation and PCB design to the system.

Mikro-C is a microprocessor based C language compiler optimised for the


restricted and specialised environment of embedded microcontrollers. This
used to program the microprocessor used in this project.

P a g e | 15
PROJECT PLAN AS GANTT CHART

Table 1 shows the project plan with the expected time slots and adjacent to this, the actual time slots
of the project. The expected schedule was determined at the start of the project and is based upon
estimation of time requirements and assumptions of component delivery times.

Task Legend:

1) Background research on existing BMS systems, battery monitoring and protection


2) Understanding the system & codes provided
3) Ordering of components, design & development of novel system (programming & hardware component mounting)
4) Implementation of both hardware and software
5) Integration of subsystem (Dependant on other subsystems and task 4)
6) Report writing and presentation preparation

Deliverables Legend:

1) First draft of report


2) Final draft of report
3) Presentation

Table 2 - Project Plan illustrated as a Gantt chart

The project started smoothly until the mechanical team asked the master PCB to return and also not
providing enough information regarding the previous system. As a result, it was delayed to make a
decision to start a new project which starts from scratch using different language from the previous
system.

P a g e | 16
CHAPTER 2
DESIGN METHODOLOGY (SOFTWARE)

2.1 INTRODUCTION:

An important parameter of a Battery Monitoring System (BMS) is the estimation of the State-
of-chrage (SOC) of individual cells that make up the battery. The Li-ion battery used for the
Electric Racing vehicle (ERV), as regards this project, is made up of 96 cells. These cells are
arranged in series to provide a maximum voltage of over 400 V and a peak load current
above 300 Amperes!!

Practically, there are numerous factors that affect the performance or SOC estimation of a
cell, such as: - usage capacity, temperature, charge/dishcharge rate, cell ageing, self
discharge, charge/dischrage cycles, hysteresis, charge/discharge linearity, etc. Given the
inevitable occurence of these dybamic factors in the automative application, high accuracy in
SOC calculations have often proven a though challenge. Reasearchers constantly working
hard to provide methods to improve the accuracy of the battery SOC by using complex
algorithms, or even a look-up table usch as the one used in [6]. In [7], methods such as the
Fuzzy Logic, Neural Network and Kalman Filter are few of the commonly used algorithms
that were mentioned.

In order to keep things simple, yet within an acceptable error percentage, the SOC estimation
for the ERV’s battery will use the following measuremnts to significantly improve
calcualtion accuracy.

1. Voltage measurement (used in the previous system).


2. Coulomb counting (not used in previous system).
3. Temperature measurement (not used in previous system).
4. Dischrage rate (not used in previous system)

The effective combination of the four parameters above could see the SOC error percentage
fall from 35% to less than 7%. The current BMS installed in the ERV, provided the battery

17
SOC by using the voltage measurements only. Although this is common practice in few
electric vehicles such as the golf buggy car, it still isn’t reliable as errors could go as high as
47% [8].

2.2 STATE OF CHARGE CALCULATION

The picture shown in Figure 2-1 illustrates the simplified block diagram representation of the
proposed entire Battery Management System.

Figure 2-1: Architecture of the proposed Battery Management System

In order to actualize the proposed system in Figure 2-1, a software algorithm is designed as
shown in Figure 2-2. The flowchart sequence diagram is an overview of how the software
program is to achieve data acquisition by the use of dedicated functions.

18
Figure 2-2: Flowchart for Proposed SOC estimation

19
The software design approach for the proposed system is divided into two phases. This is
required so as to improve the robustness of the system and produce accurate SOC estimate.
The first phase, which is the BMS prototype, will involve data acquisition by the use of the
microprocessor’s I/O analogue pins. The second phase (final PCB) will ensure
communication between the master, slave and EEPROM using designated the I2C data bus.

2.2.1 PHASE 1 (ADC):

This phase involves the design of the prototype version of the BMS. This will involve
designing and programming of the PIC18F2550 which is used as the microprocessor. The
objective is to measure the voltage, temperature and load current from a single cell and then
from a battery pack of 4 cells connected in series and then calculate the SOC of the battery.

The specifications of the non-rechargeable Li-Ion battery used for this stage are shown in
Table1.

Table 3: Manufacturers Cell Specification

Parameters Standard Specifications


1 Nominal capacity 1200 mAh
2 Nominal voltage 3.7 V
3 Discharge cut-off voltage 2.5 V
4 Max current (constant charge) 0.2C
5 Max current (constant discharge) 0.2C
6 Operating temperature ranger Discharge -20 ℃ ~ +60 ℃
Charge 0 ℃ ~ +45 ℃

2.2.1.1 VOLTAGE MEASUREMENT

Since this design is for a 4-cell battery pack, the maximum pack voltage should be 16.8 V
(4.2 V x 4). This is well above the acceptable input voltage (5.1V) of the microprocessor’s
A/D pins. Therefore, the voltage is reduced by using voltage divider resistors as displayed in
Figure 2-3. A 5.1 V zener diode is used as a safety measure to prevent the microprocessor
from detecting voltages higher than the specified limit of 5.1 V.

20
Vin

R1

Vout
AN2

BATT1
10k 16.8V
R2
D1
10k BV=5.1

Figure 2-3: Schematic of the voltage divider using resistor R1 and R2

AN2 is connected to the analogue pin AN2 of the PIC18F2550. By the use of the voltage
divider rule, 𝑉𝑜𝑢𝑡 is calculated using equation (1).

𝑅2
𝑉𝑜𝑢𝑡 = × 𝑉𝑖𝑛 (1)
(𝑅2 + 𝑅1 )

Let 𝑅2 = 4.7𝐾Ω, 𝑉𝑜𝑢𝑡 = 5𝑉

4700
Therefore 𝑉𝑜𝑢𝑡 = 5𝑉 = (4700+𝑅 ) × 16.8𝑉
1

23500 + 5𝑅2 = 78960

5𝑅2 = 78960 − 23500 = 55460

𝑅2 = 11,092Ω

A resistor of 11 KΩ can be used in place of the calculated 𝑅2 since the calculated resistance
isn’t a standard value. This configuration will limit the output voltage 𝑉𝑜𝑢𝑡 to 5.03V when the
maximum pack voltage of 16.8 V is reached.

The microprocessor can provide 10-bit ADC (Analogue-to-Digital Converter). This results in
a resolution which is calculated in equation (2). Using this value, equation (4) provides a
formula that can be used to interpret the analogue voltage in digital form.

𝑉𝑟𝑒𝑓 5
𝑉𝑟𝑒𝑠 = 10
=
2 1024
= 0.0049 (2)

𝑉𝑜𝑢𝑡 = 0.0049 × 𝐴𝑁2 (3)

21
𝑅2
But, 𝑉𝑜𝑢𝑡 = (𝑅 × 𝑉𝑖𝑛 = 0.3 × 𝑉𝑖𝑛
2 +𝑅1 )

So, 0.3𝑉𝑖𝑛 = 0.0049 × 𝐴𝑁2

𝑉𝑖𝑛 = 0.0163 × AN2 (4)

AN2 is the analogue voltage detected at analogue port AN2. The actual voltage of the battery
can be calculated using equation 4. However, meticulous calibration is imperative because
the resistors tolerances are subjective to change.

2.2.1.2 COULOMB COUNTING

This technique can only be accomplished if the load current at any given time is accurately
sensed by the microprocessor. Therefore, load-current measurement is inevitable for the
proposed SOC estimation.

Table 1 compares the three commonly used current measuring techniques. They all offer
analogue output voltage proportional to the measured current.

Table 4: Comparison of Current Sensing methods [9]

From the comparison shown in Table 1, it is clear that the suitable options for current
measurement are the Shunt resistor or the Hall-Effect Sensor. Although the shunt resistor
increases the power loss of the system and provides no isolation whatsoever, it is the
preferred method for measuring the load current because it is simple, cost-effective, straight

22
forward and ideal for low current-measurement below 20 Amperes. The ERV engine will
demand very high current (> 200 A) from the battery continuously. Working with such high
current is extremely dangerous and has not permitted in this project for health and safety
reasons. Therefore it is assumed that if the SOC performs well under low current
measurements, it should do the same for the high current measurements, provided the current
measured is accurate enough.

In order to measure current, the shunt resistor (RSENSE) is used to provide a small voltage
drop across its pins. The voltage drop varies proportionately according to the changes in the
load current. A suitable differential amplifier is then used to provide an amplified output
voltage that is proportional to the voltage drop across the shunt resistor. In order to avoid the
disruption on the ground path of the load, unwanted noise and increased Electromagnetic
Interference (EMI), a high-side current shunt measurement is used as shown in Figure 2-4

RSENSE Vin
+88.8
0.03 Amps

R1
4.7K AN2
U3
4
3

RLOAD INA138
BATT1
12%

1K 16.2V
R2
GND

D1
2

5
V+

VCC 11K
BV=5.1

+88.8
1

AN1 Volts

RGAIN
500K
D2 BV=4.7 BMS- STATE OF CHARGE
1N4732A
UCHENNA ADIMMADU

Figure 2-4: Schematic diagram showing how the voltage and current are to be measured

The INA138 is a current shunt monitor that accepts wide temperature range and uses a single
resistor RL for gain set. Its differential input is amplified using a desired gain factor of 100
and the output voltage line AN1 is connected to the analogue input pin AN1 of the
PIC18F2550. The battery cells are rated for the same capacity and are connected in series
ensuring the same amount of current/charge flows through them.

RSENSE is the shunt resistor which creates a voltage drop across pin 4 and pin 3 of the INA138
IC. The higher the resistance of RSENSE the better the accuracy of the measurement but also,
the power loss of the system is increased. Therefore, the 30mΩ is chosen so as to minimise

23
the loss and also to produce acceptable measurement accuracy. This also implies that the
minimum current that can be measured is 10mA. The rated power (Watts) of RSENSE is
carefully considered to accommodate the maximum current used for the testing of the system.
RLOAD on the other hand is the resistive load applied to the battery BAT1. From the provided
data sheet of the INA138 [9], RGAIN is the resistor that is used to set the gain for the internal
differential amplifier. In this case, a 500 KΩ resistor is used and this should set the gain to
100.

Equation (5) can be modified in order to interpret the value of the output voltage (AN1) from
the differential amplifier INA138.

𝑉𝑜𝑢𝑡 = 0.0049 × 𝐴𝑁1 (5)

Equation (6) is provided from the manufacturer’s data sheet of the INA138 IC,

𝑉𝑜𝑢𝑡 = 𝐼𝐿𝑜𝑎𝑑 × 𝑅𝑆𝐸𝑁𝑆𝐸 × 200𝜇𝐴/𝑉 × 𝑅𝐺𝐴𝐼𝑁 (6)

Combining equation (4) and (5) will give:-

0.0049 × 𝐴𝑁1 = 𝐼𝐿𝑜𝑎𝑑 × 0.03 × 200 × 10−6 × 500 × 103 (7)

Therefore the load current ILoad can be calculated using equation (7)

𝐼𝐿𝑜𝑎𝑑 = 𝐴𝑁1 × 0.00163 (8)

The implementation of equation (8) in the microprocessor is done in C language. A new


variable ADC_Amp is used instead of AN1. Also, variable DisplayAmp is defined in the
program to represent the load current ILoadas shown below.

24
2.2.1.3. Temperature Measurement (LM35)

The measurement of ambient or pack temperature for SOC calculation is achieved using the
LM35 in this phase. Possessing an attractive price tag, the LM35 which temperature
measurements in degree Celsius also offers direct connectivity to the microprocessor without
additional external components. The LM35 does not require any external calibration or
trimming to provide typical accuracies of ±1⁄4°C at room temperature and ±3⁄4°C over a full
−55 to +150°C temperature range. By producing a linear output of + 10.0 mV/°C scale factor
the maximum output voltage of 1.5V is attained at the peak temperature of 150°C. Further
details about the LM35 can be found in the data sheet in [10]. The availability of the LM35 in
various IC packages provides delightful flexibility in measuring the temperature of the cell or
that of the battery pack even at remote location. Since the thermostat produces temperature
measurements with reference to the supply voltage, careful measures have been taken to
ensure that the supplied voltage of the LM35 is considerably steady.

The TO-220 package is used for this project to provide practical flexibility for measuring the
temperature of the Li-Ion cells. The schematic showing the connection of the LM35 to the
microprocessor is displayed in Figure.

1 U2
1

27.0 RV5
C6 1K
470uF
2

2
VOUT AN9

3 LM35

As shown in the picture above, a 470uF capacitor is connected between the supply voltage
line and ground to maintain a smooth DC voltage in pin 1 of the LM35. Also, to further
improve the reliability of the measurement, a variable resistor RV5, of 1% tolerance, is

25
connected between the output of the LM35 and the analogue input AN9 of the
microprocessor.

2.2.1.3 SOC CALCULATION

Equation (9), (10) and (11) are used for the estimation of the battery SOC. The temperature
factor and

∆𝑙𝑜𝑎𝑑 𝑐𝑢𝑟𝑟𝑒𝑛𝑡(𝑚𝐴) × 2𝑠
𝐷𝑖𝑠𝑐ℎ𝑎𝑟𝑔𝑖𝑛𝑔 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 (𝑚𝐴ℎ) = (9)
3600𝑠

𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑈𝑠𝑒𝑑(𝑚𝐴ℎ) = 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑈𝑠𝑒𝑑 (𝑚𝐴ℎ) + 𝐷𝑖𝑠𝑐ℎ𝑎𝑟𝑔𝑖𝑛𝑔 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 (𝑚𝐴ℎ) (10)

𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑅𝑒𝑚𝑎𝑖𝑛𝑖𝑛𝑔 (𝑚𝐴ℎ)


= 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑅𝑒𝑚𝑎𝑖𝑛𝑖𝑛𝑔 (𝑚𝐴ℎ) − 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑈𝑠𝑒𝑑 (𝑚𝐴ℎ)
− 𝑇𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 𝐹𝑎𝑐𝑡𝑜𝑟 − 𝐷𝑠𝑖𝑐ℎ𝑎𝑟𝑔𝑒 𝑅𝑎𝑡𝑒 𝐹𝑎𝑐𝑡𝑜𝑟 (11)

Equation (9) assumes the display screen is updated every two second. However, in the
occurrence of a fault the while loop is delay for about 3.5 seconds. The code for this activity
is displayed below.

26
The variable ‘Count’ represents the total amount of time (in seconds) at which the while-loop
is updated. An additional 1.5 seconds delay is introduced when a fault is detected. The count
incrementis equally updated as shown routine below.

The values of the variables TempFact and CurrentFact are defined at any given iteration
based on the pack temperature, ambient temperature and the load current. These values are
carefully assigned with reference to the specifications identified in the data sheet of the
battery manufacturers. The graph in Figure 2-5 depicts the discharge characteristics of the
used Li-Ion cell. From this graph, the TempFact for various temperatures can be evaluated at
the cut-off voltage of 2.75V.

Figure 2-5: Li-Ion discharge characteristics with reference to ambient temperature

𝑇𝑒𝑚𝑝𝐹𝑎𝑐𝑡 = (100 − 𝐷𝑖𝑠𝑐ℎ𝑎𝑟𝑔𝑒 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 (%) 𝑎𝑡 °𝐶) × 𝑅𝑎𝑡𝑒𝑑 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 (𝑚𝐴ℎ) (12)

For example, if the pack temperature is at 0 °C and the discharged capacity (%) is 97% and
the Temperature factor is estimated to be:-

𝑇𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 𝐹𝑎𝑐𝑡𝑜𝑟 = (100 − 90) × 1200 = 36 (13)

Two temperature levels will be introduced between each temperature gap indicated in the
graph shown in Figure 2-5 so as to increase the accuracy of the SOC estimation. Therefore,
between 12 °C and 24 °C a constant value of 18 (36/2) is subtracted from the estimated

27
remaining capacity of the battery. A brief section of the code used to perform this operation is
shown below. The levels can be increased to further improve the SOC accuracy.

2.2.2 PHASE 2 (I 2 C):

This phase involves the design of the BMS for the actual Printed Circuit Board (PCB) that
will be installed on the vehicle. The objective is to obtain the voltage, temperature and load
current from a single cell, which would be followed by taking the said data from a battery
pack of 4 cells connected in series and finally calculate the SOC of the battery pack. Unlike
in Phase 1 where the Master uses the ADC channel to obtain the data, Phase 2 focuses on
using the Inter-Integrated Circuit (I2C) protocol to obtain the relevant data from the slaves
(temperature sensor and voltage sensor), communication between the Master (PIC18f2550)
and slaves interpretation and then to a 2K bit serial EEPROM for temporary storage. The
block diagram illustrating the communication between individual boards is proposed and
displayed in Figure 2-6.

28
Figure 2-6: Hardware block diagram of the proposed design

The Master Board will be designed to have both the DS1621 thermostat and an on-board
external memory IC, EEPROM (0). The slave board will comprise of a multi-channel voltage
measurement device (MAX127 DAS), a pair of DS1621 of which one is used to measure the
ambient temperature of the board (B) and the other temperature of the battery pack (P) and an
EEPROM for storing the obtained data.

As stated in the previous chapter, serial communication between slaves and the master would
take a long time and the problem would be aggravated if there are many slaves. However
with I2C protocol the problem would be greatly alleviated. I2C protocol has the following
advantages [taken from http://www.i2cbus.com/]:

 Only two bus lines are required to establish full-fledged bus (SDA and SCL or SCK).
 Each slave device connected is uniquely addressable using slave addresses
 Can choose a short 7 bit addressing or 10 bit addressing (which can accommodate
large number of devices on the same bus, but less popular).
 No strict baud rate specified since the clock is driven directly by the master.
 True multi-master support with up to 8 masters in a single bus system.
 Very simple protocol which can be emulated by microcontrollers without integrated
I2C peripheral device.
 Inexpensive
 Supports up to 3.4 Mbits/sec transfer speeds.

29
2.2.2.1 VOLTAGE MEASUREMENT (MAX127 DAS)

The following procedure would be carried out to obtain the voltage from the battery
connected to the various channel:

1) A start command is initialized by the microprocessor, followed by the 7 bit address of


the MAX127 in question, and 1 bit write command.
2) Once an ACK (Acknowledge) signal is received from MAX127, the microprocessor
would then select the channel for conversion, and set the upper and lower limits of the
voltage for conversion, which the slave should reply with ACK
3) A stop command would end the write command.
4) A start command would be initialized again, followed by the 7 bit address of the
MAX127 in question, and 1 bit read command.
5) The slave would send the first byte of data which the microprocessor would respond
with ACK. This would be the most significant byte (MSBytes).
6) The slave would then send the next byte which the microprocessor would respond
with NACK. This would be the least significant byte (LSBytes)

The following snippet shows the procedure carried out in software:

The following figure shows the setup of the MAX127 with the microprocessor.

30
2.2.2.2 TEMPERATURE MEASUREMENT

The DS1621 as mentioned earlier is a thermostat that can measure temperature from -55°C to
+125°C with a maximum resolution of 9-bit. A delta-sigma Analogue-to-Digital Converter
(ADC) converts the measured temperature to a digital value that is calibrated in °C. In order
to get the temperature readings from the DS1621 device, the microprocessor will issue a
command through the 2-wire bidirectional port using the I2Cprotocol. SCLK and the
bidirectional data line SDA provide a bidirectional communication between the host
(microcontroller PIC18f2550) and the slave. The commands issued by the master will include
information such as the slave address, read/write command and the selected resolution for the
measured temperature. The data sheet for the DS16S1 can be found in [10] for further details
on the device. The schematic configuration for the temperature measurement is displayed in
Figure 2-7 below.

31
VCC
U2
SW1 2 3
R7 1
SCL TOUT U7
SDA
7 6 1
5k A0 SCK A0
6 5 2
SW2 5
A1
23.5 7
SDA A1
3
R8 A2 WP A2
DS1621 24C02C
2k SW3
R10 U1
2 11
10k RA0/AN0 RC0/T1OSO/T1CKI
R9 3 12
RA1/AN1 RC1/T1OSI/CCP2/UOE
4 13
RA2/AN2/VREF-/CVREF RC2/CCP1
10k 5 15
RA3/AN3/VREF+ RC4/D-/VM
6 16
RA4/T0CKI/C1OUT/RCV RC5/D+/VP
7 17
RA5/AN4/SS/LVDIN/C2OUT RC6/TX/CK
10 18
RA6/OSC2/CLKO RC7/RX/DT/SDO
R2
R1 21
RB0/AN12/INT0/FLT0/SDI/SDA
6K 22
RB1/AN10/INT1/SCK/SCL
6K 23
RB2/AN8/INT2/VMO
24 9
RB3/AN9/CCP2/VPO OSC1/CLKI
25
RB4/AN11/KBI0/CSSPP
26 14
RB5/KBI1/PGM VUSB
27
RB6/KBI2/PGC
28 1
RB7/KBI3/PGD RE3/MCLR/VPP
PIC18F2550

Figure 2-7: Schematic showing the connection of the DS1621 and 24c02c EEPROM

When the data is read from the DS1621, the microcontroller is programmed to immediately
send this data to the allocated EEPROM. Thus, one EEPROM is assigned to each battery
module. During SOC calculation, the microcontroller requests the temperature data directly
from the storage device. The following steps are used by the microcontroller to obtain
temperature readings from the DS1621.

1) A START command is initialized by the microcontroller and then followed by the


address of the specified DS1621 device. The address is one byte in length and consists
of 7-bit slave address and one bit to set the slave to a Read/Write mode.
2) Once the slave’s address matches the one sent by the master, it replies with an
acknowledgement pulse.
3) Next, the microcontroller sends a command to the slave requesting access to a data
register. The slave then replies the host controller with an acknowledge pulse.
4) The host controller sends a new START command, indicating a change in direction of
data transfer. This is also acknowledged by the slave.
5) Finally, the slave transmits the 9-bit temperature value from its data register to the
master. This is not acknowledged by the master rather, a STOP command is used to
indicate the termination of the sequence.
The following lines of code are used to perform the described protocol of data transmission
between the host controller (PIC18F2550) and the Slave.

32
33
2.2.2.3 EEPROM

AT24C02C is chosen to be the EEPROM incorporated into the system. It provides 2048-bits
of serial electrically erasable and programmable read-only memory (EEPROM) organized as
256-words of 8-bits each. As the EEPROM is required to store voltage and temperature data,
of which each is 2 bytes long, the EEPROM would be more than sufficient to support a large
amount of slaves.

The following steps are taken to write into the EEPROM:


1) A start command is issued by the microprocessor which would be followed by the 7
bits EEPROM’s address, and the write command.
2) Once ACK is received, the address for the data to be written to would be sent.
3) The EEPROM would once again send ACK which would trigger the microprocessor
to send a byte of data.
4) Step 3 would be repeated till the microprocessor sends a stop command.

To read from the EEPROM, steps 1 and 2 would be used followed by:
3) A start command is issued again, the 7 bit address of the EEPROM and a read
command.
4) The EEPROM would start sending the byte of data stated at the address sent in step 2
which would be ACK by the microprocessor
5) Step 4 would repeat till the microprocessor sends a stop command.
The snippet of code to show the above procedures is as shown in the following figures.

34
As an example, we would look at the configuration of the MAX127, the AT24C02C and the
microprocessor. The following figure shows the schematic of the microchip reading data
from MAX127, storing into AT24C02C and then reading the data again and displaying them
on the LCD. The I2C debugger is used to examine the cycle of command being passed
between the microprocessor MAX127, and the EEPROM.

35
From the information gathered from the mechanical team in NR8, there would be 96 cells.
This would amount to 24 battery packs and since each MAX127 has 8 channels, 3 slave
subsystems would be needed. Getting information on individual battery cell would be much
easier. For example, the voltage of the 20th battery pack is needed. The microchip would
only have to send the address of the 3rd EEPROM and the address where the data of that
specific battery pack is stored to acquire the required data. This is a much significant
improvement compared to the previous method where the microchip has to send the
command through all 96 chips before receiving the required data.

36
CHAPTER 3
DESIGN METHODOLOGY (HARDWARE)

3.1 INTRODUCTION

The intention of this chapter is to design and build the proposed design a battery management
system that includes monitoring the voltage and the temperature of individual cells in the
battery.

3.2 HARDWARE OF BATTERY MANAGEMENT CIRCUIT

3.2.1 MASTER AND DISPLAY BOARDS

With reference to the theoretical design proposed in Chapter II, the prototype version of the
master board was constructed. This version was built to support the installation of
MikroElektronika Start USB for PIC Board which is shown in Figure 3-1. This is a small
development board featuring Microchip PIC18F2550 device with fast USB 2.0 support. The
option of the USB 2.0 and 5 V power supply voltage provided essential flexibility which
allowed the programming of the device even from remote locations.

Figure 3-1: Start USB for PIC Board

The 20 x 4 LCD socket, EEPROM IC socket and DS1621 IC socket are constructed on the
board to allow direct testing and display of the estimated SOC. The picture identifying

37
significant components of the prototype board, master board and display can be found in
Appendix C. The main purpose of the prototype board is to provide immediate resolution for
the testing of the designed SOC prior to the development of the final PCB. A 90dB Buzzer is
also included in the board to create a loud awareness to the user in the occurrence of a fault.
The master and display boards are also designed to operate with this safety feature. In
addition a flashing red LED is used as an indication of a fault on the master board.

It is also crucial to avoid electrical noise and electromagnetic interference which are usually
present in electrical boards. For this reason the boards have been carefully designed to ensure
that the right components are used and also that the components are place apart at the right
distances.

3.2.2 SLAVE BOARD

The slave board is responsible for monitoring the individual pack’s voltage and temperature
continuously.

A PCB design shows a multiple channel slave electronic board that consist of a MAX127, a
temperature IC (DS1621) and EEPROM as shown in Figure 3.2.

Supply
(5V)
I2C
EEPROM
DS1621

8-Channel I/O

LM317
(Voltage Regulator )

LM35
MAX127(Multiple Channel ) (Temperature Sensor )

Figure 3.2-PCB of Multi-range Slave Circuit

38
The printed slave board is assembled according to the design structure explained in section II
and the schematic design is available in Appendix B2. The slave board is manufactured to
have double layering so that electrical noises would be reduced. The GND copper plate under
the board, which forms one of the layers, improves the decoupling effect. Due to its small
size, it is compact and thus reduces the length of the overall wire connection between the
boards. As a result of having shorter wire connection, it reduces data corruption and power
loss. The developed slave board can be found in Appendix C3.

However, there arises an issue. As temperature is one of the key factors that affect the state of
charge, temperature rise contributed by the heating up of the components would be a major
problem. As LM35 and DS1621 draw about 60 μA from its supply, it has very low self-
heating. Hence the effect will be ignored. Figure 3.9 the schematic diagram of voltage
regulators, whose output current is in excess of 1.5A over a 1.2V to 37V output range.

Figure 7.2- shows LM317 a typical circuit application [11]

The output voltage of LM317 can be calculated as follows;

𝑅2
𝑉𝑂𝑈𝑇 = 1.25 (1 + ) + I𝐴𝐷𝐽 ∗ 𝑅2 … … … … … … … … … (3.1)[11]
𝑅1

The output voltage is set to be 4V in order constraint LM35 of input.

Assumes R2 is 1.8KΩ. Then R1 can be calculated;

𝑅2 1𝐾8Ω
𝑅1 = (𝑉𝑂𝑈𝑇 ) = ( 4𝑉 ) = 820Ω
− 1 − 1
1.25 1.25

39
The power dissipated across the voltage regulated calculated as below;

POWER LM317 = Voltage drop across the voltege regulator ∗ Current … … … . . (3.2)

POWER LM317 = (Input Voltage − Outputvoltage) ∗ Current

POWER LM317 = (5V − 4V) ∗ 14.14m

POWER LM317 = 1V ∗ 17.11mA

POWER LM317 = 17.11mW

The other limiting factor must be considered when chosen precise measurement of
temperature is that type of resistors used and it’s the maximum power dissipation.

So the power dissipated across the R1;

(Voltage drop acrossR1 )2


POWER R1 = … … … … … … … … … … … (3.2)
R1

(4V − 1.25V)2
POWER R1 =
1800Ω

POWER R1 = 1.52mW

The power dissipated across the R2 is calculated;

(Voltage drop acrossR2 )2


POWER R2 =
R2

(1.25V)2
POWER R1 =
680Ω

POWER R1 = 2.3mW

It is essential to locate the junction temperature (TJ) of semiconductor devices as it


recommended that it must be kept below its maximum rated value of 125°C.

Hence the total power dissipated across the power supply can be calculated;

𝑃𝑇𝑂𝑇𝐴𝐿 = PLM317 + 𝑃𝑅1 + 𝑃𝑅2 … … … … … … … (3.4)

40
𝑃𝑇𝑂𝑇𝐴𝐿 = 17.11mW + 1.52mW + 2.3mW

𝑃𝑇𝑂𝑇𝐴𝐿 = 17.93mW

The junction temperature is equal to the total power dissipated in the voltage regulator times
the thermal resistance.

From the manufacture data sheet the thermal resistance is 92°C/W at room temperature.

Junction temperature (ΔT) = Thermal Resistance(R th ) ∗ Power … … .3.6

°C
ΔT = 92 ∗ 17.93mW
W

ΔT = 1.92 °C

Hence the voltage regulator would contribute to an increase of 2°C at normal operation.
Though this value might be small, if however the system is made to run for a long time there
might be an exponential rise in temperature. In addition there would be three slave
subsystems which would also contribute to the temperature rise.

41
CHAPTER 4
RESULTS & ANALYSIS

4.1 SIMULATED RESULTS:

The circuit schematic depicted in Figure 4-1 is used to simulate the proposed design, both
theoretical and software, which was discussed in Phase 1 of Chapter 3.

SW1 LCD2
VCC R7 LM044L
5k
SW2
R8 RV1
2k

37%
U1

VDD
VSS

VEE

RW
RS
R9

D0
D1
D2
D3
D4
D5
D6
D7
E
2 11
RA0/AN0 RC0/T1OSO/T1CKI
10k AN1
3
RA1/AN1 RC1/T1OSI/CCP2/UOE
12 R3 1k

1
2
3

4
5
6

7
8
9
10
11
12
13
14
4 13 10k
AN2 RA2/AN2/VREF-/CVREF RC2/CCP1
5 15
RA3/AN3/VREF+ RC4/D-/VM
6 16
U2 RA4/T0CKI/C1OUT/RCV RC5/D+/VP
1 7 17
RA5/AN4/SS/LVDIN/C2OUT RC6/TX/CK
10 18
OSC2 RA6/OSC2/CLKO RC7/RX/DT/SDO

OSC1

OSC2
21
28.0 RB0/AN12/INT0/FLT0/SDI/SDA
22
RB1/AN10/INT1/SCK/SCL
23 X1
RB2/AN8/INT2/VMO
2 24 9
VOUT RB3/AN9/CCP2/VPO OSC1/CLKI OSC1
25
RB4/AN11/KBI0/CSSPP
26 14

1
RB5/KBI1/PGM VUSB
27
RB6/KBI2/PGC CRYSTAL
3 LM35 28 1 C1 C8
RB7/KBI3/PGD RE3/MCLR/VPP FREQ=8MHz
22pF 22pF
PIC18F2550
2

2
RSENSE Vin
+88.8
0.03 Amps

R1
4.7K AN2
U3
4
3

RLOAD INA138
BATT1
12%

1K 16.2V
R2
GND

D1
2

5
V+

VCC 11K
BV=5.1

+88.8
1

AN1 Volts

RGAIN
500K
D2 BV=4.7 BMS- STATE OF CHARGE
1N4732A
UCHENNA ADIMMADU

Figure 4-1: Simulated Schematic for analogue temperature, voltage and current measurements

The current, voltage and temperature measurements have all been combined as shown in
Figure 4-1. The availability of the 20 x 4 LCD and the microprocessor contributed vastly
towards the decision of using the Proteus Software Design Suite. Once the Hex file is loaded
into the microcontroller, the simulation will display results on the LCD which will be
comparable to the result of an experiment. By so doing, mistakes could be easily avoided or

42
corrected in the program before the hardware development takes place. Thus, avoiding
hardware re-design which would result in increased cost.

Assuming there are four li-ion cells connected in series in a battery pack, the maximum
permissible voltage is at 16.8 V (4.2V x 4). There for the simulation and testing of the
designed program, a 16.2 V battery is connected as shown in Figure 10. To reduce this
voltage to an acceptable value that is suitable for the microprocessors I/O pins, the resistor R1
and R2 are used as a voltage divider. For the current measurement, the INA138 is used to
measure the differential voltage drop across RSENSE. The variable resistor RLOAD is used as the
resistive load of the system. The LM35 analogue thermostat is used in the simulation to
measure the temperature.

By connecting the in-circuit ammeter and voltmeter at the functional locations, the circuit is
simulated. The produced result displayed on the LCD as shown in Figure 4-1 is compared to
the readings from the in-circuit meters.

Figure 4-2: Simulation of the designed BMS schematic

43
As shown on the LCD in Figure 4-2, the simulated results are very satisfactory. Comparing
the readings from the in-circuit meter with that displayed on the LCD, it is clear that both of
them are matching except for very insignificant differences. The voltage going into the
microprocessor I/O pin has been reduced from 16.2 V to 4.84 V. The resistor ratio is
designed in Chapter 3 and the actual pack voltage is recalculated in the program to be 16.25
V. The program also calculates the state of charge of the battery (SOC = 91.87%) by using
the value of the measured voltage only. Equation (14) shows the formula that was used to
calculate this SOC.

𝑚𝑒𝑎𝑠𝑢𝑟𝑒𝑑 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 − 𝑐𝑢𝑡 − 𝑜𝑓𝑓 𝑣𝑜𝑙𝑡𝑎𝑔𝑒


𝑆𝑂𝐶(%) = (14)
0.068

Cut-off voltage per cell = 2.5 V. Therefore for 4 cells in series, 2.5 V x 4 = 10 V

16.25 − 10
𝑆𝑂𝐶(%) = = 91.91% (15)
0.068

Similarly, the schematic is modified to accommodate for 4 li-ion cells connected in series as
depicted in Figure 10. As can be seen, the voltage-divider resistors are used to limit the
voltage from the output of CELL1, CELL2 and CELL3. When switch 1 is pressed the value
of the individual cells are display on the LCD as shown in Figure 4-3. In reference to the
proposed algorithm, the program continuously monitors the AN0 pin of the PIC18F2550 to
check if the switch is pressed or not.

44
24C02C

6
5
7
24C02C

R5

SCK
SDA
WP
1 2
11K
R11

A0
A1
A2
1 2

2
CELL1 11K R6 D1

1
2
3
2
3.52 4.7k BV=5.1

R12
R13 4.7k D2

1
+14.6 CELL2 1 2 BV=5.1

2
Volts 3.75V 11K

1
R14
CELL3 D3
4.7k BV=5.1
3.71V

1
4
3
2
1

CELL4 D4 VCC
J5 LCD2 3.63V BV=5.1 D-
D+

Figure 4-3

Figure 4-4: (A) Main screen Display (B) Display when switch 1 is pressed

As can be seen in Figure 4-4, the software program adheres to the design algorithm proposed
in the beginning of Chapter 2.

45
4.2 EXPERIMENTAL RESULTS:

Before drawing conclusions on the newly designed SOC estimation, it is crucial to analyse its
performance in real-time. Therefore the actual testing of the device is carried out in the
University’s Electronic Laboratory. The picture showing the set-up of the boards, devices and
battery during the actual testing can be seen in Appendix D.

Table 5: Specifications for the Li-Ion Cell used

Parameters Standard Specifications


1 Nominal capacity 1100 mAh
2 Nominal voltage 3.7 V
3 Charge cut-off voltage 4.2 V
4 Discharge cut-off voltage 2.75 V
5 Max current (constant charge) 1C
6 Max current (constant discharge) 1C
7 Operating temperature ranger Discharge -20 ℃ ~ +60 ℃
Charge 0 ℃ ~ +45 ℃

To commence the test the software program was adjusted to suite the specifications of the
new Li-ion cell. The nominal rated capacity of the cell is 1100mAh but after thorough
examination, it was established that the actual capacity has reduce to 1050mAh. This
examination of the cell’s capacity is important because, although the capacity has been
specified by the manufacturers, it does not take into account the permanent discharges which
occurred as a result of overcharging, over-discharging and ageing. The test was carried out by
applying a fixed load to the Cell. To avoid adding to the load, the battery monitoring system
was powered by an external power supply. Hence, the time taken for the cell to completely
discharge from its full-charged voltage (4.2 V) to its cut-off voltage (2.75 V) is recorded. And
by knowing this time and the discharge current applied, the actual capacity was estimated.

Now that the actual capacity is known, the Capacity LEFT variable is set to this value in the
software program as shown in the routine below.

46
Afterwards, the microprocessor is programmed and the hardware configuration is tested to
make sure the all connections are solid and the system performs just as expected from the
simulations. The picture in Figure 4-5 confirms that the system works just as designed.

Figure 4-5: (A) Display of the main Screen. (B) Screen Display when Switch 1 is pressed

As shown in Figure 13, the system is capable of monitoring the individual voltages, load
current, SOC and the ambient temperature of four different cells. This test confirms that the
system performs just as expected. In order to produce a competitive accuracy, the system was
thoroughly and painstakingly calibrated by tweaking the software parameters to correspond
to the actual readings on the voltmeter and ammeter in the laboratory. The best results
produced an acceptable error (%) of about 0.3% (Voltage) and 2% (Current). These errors are
due to the uncontrollable variation in the tolerances of the used resistors and also quantisation
errors introduced by approximations in the analogue-to-digital conversion. From the above
results, in was observed that the first and the last cells depleted faster than the ones in the
middle. Therefore it is good-practice to measure the pack temperature by using either the top
or the bottom cell (preferable the last cell i.e. Cell 4).

47
After confirming that the designed BMS (Hardware & Software) works as expected, the next
experiment is to compare the performance of the newly designed SOC estimation with the old
one. This is done by discharging the cell specified in Table 3 from the peak voltage to the
cut-off voltage by using a known fixed discharge current. The SOC (new and old method) of
the Li-Ion cells is then recorded every 2 minutes.

The graph in Figure 4-6 depicts the discharge characteristics of the battery in real-time. A
variable resistive load is used to produce a constant discharge current of 532mA.

Voltage (V) vs. Time(mins)


4.5 peak
4 Voltage
3.5
3 Cut-off Voltage
2.5
2
1.5
1
0.5
0
0 20 40 60 80 100 120 140 160

Figure 4-6: Li-Ion Cell Discharge Characteristics

The discharge curve of the Li-Ion cell shown in Figure 4-6 illustrates the behaviour of the cell
when it was discharging. As can be seen, the cell slowly discharges around its nominal
voltage of 3.7 V (+/- 0.1 V) and rapidly discharges below 3.58 V. This behaviour observed is
comparable to the general characteristics of Li-Ion cells which prove again that the accuracy
of the designed system is within the standards.

The Li-Ion Cell State-of-Charge calculation, using both the old and new methods is
calculated by the microprocessor. The PIC18F microprocessor is programmed to calculate the
SOC (Old) by using only the measured voltage by applying equation (14). It also calculates a
second SOC (New) by using the calculations and codes expressed in Chapter 3 (Phase 1).
Figure 4-7 shows the screen display from the actual LCD, presenting how the results are
displayed.

48
Figure 4-7 screen display of the actual LCD

The graphs in Figure 4-8 show the recorded results from the microprocessor, given an
ambient temperature of 23.7°C.

Figure 4-8: SOC graphs using both old (left) and new (right) estimation Methods

It can be seen in Figure 4-8, the SOC (old) performs its estimation with reference to the
terminal voltage of the Li-Ion cell. This is apparent because the curve on the graph (SOC%-
OLD) is identical to the curve for the previous graph (in Figure 4-6). Since this SOC
estimation is not derived from the open-loop voltage, it is entirely dependent on the
unreliable fluctuations on the terminal line which is connected directly to the load. Whereas
the SOC (new) produced a linear graph which is directly proportional to the amount of
current (coulomb) that leaves the cell per specified period. In this case, it is believed that the
discharging factors were non-existent in the software program since the ambient temperature
(23°C) and discharge rate (<1C, >0.5C) are all within normal range.

49
Comparing the two graphs together shows the ascendancy of the newly designed SOC
estimation method over the old one as shown in Figure 4-9.

Figure 4-9: Li-Ion Cell SOC Graph, comparing both the new and the old methods

As indicated in the graph in Figure 4-9, a peak error of 45.6% was measured at 118 minutes.
However both SOC estimations shared similarities in their estimated SOC’s between 4.2 V
and 3.8 V. And also, SOC similarities were observed at voltages between 2.75 V and 2.85 V.

The undesirable return for using the voltage-only SOC is the sudden instance when the fuel
gauge (or battery’s remaining capacity) begins to fall rapidly i.e. from 61%. This occurs as a
result of the inaccuracy in the used method of SOC estimation.

50
CHAPTER 5
CONCLUSION

Battery Monitoring Systems are of increasing interest nowadays, particularly in the


automotive industry. Due to the demand to reduce the carbon foot-print produced by internal
combustion engines, the need for electric vehicles cannot be over emphasized.

The project has focused on improving the accuracy of the estimated SOC which relates the
State-of-Health of the vehicles battery. Although the testing of the design is done using few
Li-Ion cells, the result is certainly comparable to multiple numbers of cells. Having
mentioned that, the processing time will increase in proportion to the number of cells
investigated. In most cases, various decisions/compromises were made as a result of
unforeseen limitations and challenges experienced during this project. Please refer to
Appendix X for detailed description. The evaluation of cost, schematic diagrams, program
code and relevant pictures can all be found at their designated Appendixes.

At the beginning of the project, thorough background study and research was essential. The
information relating to this is documented in Chapter 1. In the same chapter, the allocated
time-scale, financial budget and other relevant information about the project is also made
obvious. By the use of a well structure Gantt-chart the objective of the project was
satisfactorily accomplished. Few extra bits which will be discussed later have also been
designed for and demonstrated to improve the robustness of the designed BMS.

The overall project was divided into two main categories, software in Chapter 2 and
hardware in Chapter 3. The project involves building a new system from scratch and as
result of this a novel design algorithm and hierarchy were proposed in Chapter 2. The new
software program is written in ‘C’ which is a very popular programming language for
implementing real-time control or processes. It is more or less the industrial standards for
high-level language for microprocessor. Unlike Basic which is the programming language
used in the previous system, C offers the intimate contact with the hardware components and
produces a faster and more efficient system.

51
Careful measures were taken into consideration in the design of the system in Chapter 2 and
Chapter 3. Additional programming was done to enhance the safety operation of the system
in the event of an over-current and over-voltage. In the occurrence of such, the
microcontroller turns OFF the relevant switches to avoid over discharging or over charging
the Cell outside the specified temperature range and discharge rate. Double layered Printed
Circuit Boards (PCB) were designed and fabricated with thorough consideration to reduce
noise and other distorting factors common in electrical power board.

The performance of the system is evaluated using its accuracy, reliability, manufacturability,
and power.

Accuracy

As shown in the results in Chapter 4, the accuracy of the SOC estimation used in the
previous system has been improved by more than 45%. An error of 3% is estimated for the
current measurements. This is due to the very low resistance and poor temperature coefficient
of the sense resistor. Also, the PIC18f2550 10-bit ADC produces minor error due
approximations. It is possible to increase the accuracy but this is also proportional to cost.

Reliability

The absence of isolation (galvanic) between the slave board and the battery is a future work
to be considered. However, despite the limitations explained in Appendix x, the BMS was
designed to provide robust communications, fault detection and minimised failure mode.

Manufacturability

The total number of components and connections has been reduced compared to the old
system. The new BMS has been designed to fit into allocated compartment and also offers
compatibility for both software and hardware ad-on.

Power

The BMS itself is a load on the batteries. It hasn’t been possible to design the system for
sleep-mode operations. However, components with low power consumptions were used both
on the PCB and on the prototype boards. In the active state, the BMS consumes a maximum
continuous power of 0.35 Watts.

52
FUTURE WORK:

There are needs to further improve the performance and accuracy of the state of charge of
whole system involving

Multi- range multiplexer: If it increases the number of input channels typically ranges from
8 to 12, it will increase the ability of the ADC to acquire the 96 cells voltage to the required
accuracy and less acquisition time. It recommended MAX11068 is the best for this
application.

Isolation: It will be essential to provide optocoupler isolation between the slave board and
the Master board to avoid current leakages which can affect the reliability of the transmitted
data. It will also be important to include galvanic isolation between the slave board/devices
and the battery. This will reduce the stray capacitance and avoid current spikes which could
be as high as 200 Amperes!!

Current Measuring: Due to the high current (>200A) demand from the engine, Hall-Effect
Sensors is recommended which can handle such high current levels.

Cable Arrangement: It is essential to harness the power cables in a very tidy way in order to
reduce electrical noise that will distort the accuracy of the measurements.

53
REFERENCE
[1] Winter, M.; Passerini, S. “Lithium ion batteries as key component for energy storage
in automotive and stationary application” Telecommunications Energy Conference
(INTELEC), 2011 IEEE 33rd InternationalPublication Year: 2011 , Page(s): 1 – 3.

[2] Davide Andrea“Battery Management Systems for Large Lithium-Ion Battery Packs”.

[3] Battery
University“http://batteryuniversity.com/learn/article/is_lithium_ion_the_ideal_battery
“.

[4] Pattipati, B.; Sankavaram, C.; Pattipati, K. “System Identification and Estimation
Framework for Pivotal Automotive Battery Management System Characteristics”
Systems, Man, and Cybernetics, Part C: Applications and Reviews, IEEE
Transactions on Volume: 41 , Issue: 6, Publication Year: 2011 , Page(s): 869 – 884

[5] Pattipati, B.; Pattipati, K.; Christopherson, J.P.; Namburu, S.M.; Prokhorov, D.V.; Liu
Qiao “Automotive Battery Management Systems”AUTOTESTCON, 2008
IEEEDigital Object Identifier: 10.1109/AUTEST.2008.4662684 Publication Year:
2008 , Page(s): 581 – 586.

[6] Hongwen He, Rui Xiong, Jinxin Fan “Evaluation of Lithium-Ion Battery Equivalent
Circuit Models for State of Charge Estimation by an Experimental Approach”ISSN
1996-1073 [Article published: www.mdpi.com/journal/energies]

[7] Charkhgard, M. Farrokhi, M. “State-of-Charge Estimation for Lithium-Ion Batteries


Using Neural Networks and EKF”. IEEE Transactions on: Industrial Electronics,
Date of Publication: Dec. 2010. Pages: 4178 - 4187

[8] Hongwen He, Rui Xiong, Xiaowei Zhang, Fengchun Sun, JinXin Fan. “State-of-
Charge Estimation of the Lithium-Ion Battery Using an Adaptive Extended Kalman

54
Filter Based on an Improved Thevenin Model”. IEEE Transactions on: Vehicular
Technology. Date of Publication: May 2011. Pages: 1461 - 1469

[9] INA138 High-Side Measurement CURRENT SHUNT MONITOR

[Cited online on 19/03/12 @ http://www.ti.com/lit/ds/symlink/ina138.pdf]

[10] Maxim Digital Thermometer and Thermostat

[Cited online on 30/03/12 @ http://atc.ugr.es/~afdiaz/fich/ds1621.pdf]

[11] LM317 Voltage Regulator

[ http://www.alldatasheet.com/datasheet-pdf/pdf/8619/NSC/LM317.html]

55

S-ar putea să vă placă și