Upload
mohammad-awal
View
160
Download
2
Embed Size (px)
Citation preview
International Future Energy Challenge 2007
Final Report
Universal Adapting Battery
Charger
Submitted by
Bangladesh University of Engineering and Technology
Undergraduate Student Team
Faculty Advisor
Dr. A.B.M. Harun-Ur-Rashid
Development of a Universal Adapting Battery Charger
IFEC TEAM, BUET
Abstract
The objective of 2007 Future Energy Challenge is to develop a low cost universal battery
charger for Li-ion, SLA, Ni-Cd and Ni-MH batteries. The battery charger must be energy efficient and
comply with requirements regarding power factor, power loss and module size and shape. In order to
fulfill the objectives as specified by the IEEE committee, a number of schemes were considered. After
careful consideration, the best scheme was chosen and the project has been implemented according
to that scheme. This report discusses the developed circuits of various parts of the proposed scheme
and also the algorithm which is used to control the battery charging process. A hardware prototype
consisting several inputs, outputs and feedbacks is developed, which is able to supply a variable dc
voltage ranging from 2V to 26V, with a maximum charging current of 2A. The algorithm developed so
far is programmed into a micro-controller which automatically detects the connected battery chemistry
and configuration and controls the hardware to charge the given battery. This prototype has
succeeded to charge all kinds of batteries as per requirements of IFEC 2007.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 1
CONTENTS
Pages
1. Introduction………………………………………………………………………………………… 05
2. Battery Information………………………………………………………………………………… 06
2.1. Sealed Lead Acid (SLA) battery……………………………………………………………… 06
2.1.1. Charging………………………………………………………………………………… 06
2.1.2. Discharging……………………………………………………………………………… 08
2.2. Lithium-ion (Li-ion) battery……………………………………………………………………… 08
2.2.1. Charging…………………………………………………………………………………… 08
2.2.2. Discharging……………………………………………………………………………… 09
2.3. Nickel Cadmium (NiCd) Battery………………………………………………………………. 10
2.3.1. Charging………………………………………………………………………………… 10
2.3.2. Discharging……………………………………………………………………………… 11
2.4. Nickel Metal Hydride (NiMH) Battery……………………………………………………… 11
2.4.1. Charging……………………………………………………………………………………… 11
2.4.2. Discharging…………………………………………………………………………………… 12
3. Scheme…………………………………………………………………………………………… 12
4. Switch Mode Power Supply………………………………………………………………………… 13
4.1. Component design………………………………………………………………………………… 17
4.1.1. Transformer Design………………………………………………………………………… 17
4.1.2. MOSFET Selection……………………………………………………………………… 18
4.1.3. Snubber Design……………………………………………………………………………… 18
4.1.4. Feedback Circuit………………………………………………………………………… 18
4.1.5. Microcontroller Selection………………………………………………………………… 19
4.2. Performance Analysis…………………………………………………………………………… 20
4.2.1. Losses………………………………………………………………………………………… 20
4.2.2. No Load Power…………………………………………………………………………… 20
4.3. Previous Approaches……………………………………………………………………………… 20
4.3.1. Performance Comparison Between Approaches………………………………………… 21
5. Charger Circuit…………………………………………………………………………………… 22
5.1. Circuit Description………………………………………………………………………… 23
5.1.1. Buck Converter………………………………………………………………………… 23
5.1.1.1. MOSFET Switching Driver in Buck Converter………………………………. 24
5.1.2. Battery Presence Detection and Polarity Sensing Circuit………………………… 25
5.1.3. H-bridge…………………………………………………………………………… 26
5.1.4. Discharger………………………………………………………………………… 27
5.1.5. Logic Control……………………………………………………………………… 28
5.2. Performance Analysis……………………………………………………………… 29
5.2.1. Proper Charging……………………………………………………………… … 29
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 2
Pages
5.2.2. Power Calculation……………………………………………………………… ….. 32
6. Efficiency………………………………………………………………………………………… 32
7. Method of Battery detection…………………………………………………………………… … 33
7.1. Constant current Charging at 500mA for Approximately 10 Minutes………………… … 33
7.2. Discharging the Battery…………………………………………………………………… 34
8. Working Algorithm……………………………………………………………………………… 39
9. Previous Approaches……………………………………………………………………………. 41
9.1. Chemistry Detection………………………………………………………………………… 41
9.1.1. From β of a Battery………………………………………………………………… 41
9.1.2. SoC Method………………………………………………………………………… 42
9.2. Capacity Measurement…………………………………………………………………… 43
10. Key Innovations………………………………………………………………………………… 43
10.1. Data Logging Hardware…………………………………………………………………… 44
10.2. Data logging Software……………………………………………………………………… 44
11. Cost Analysis……………………………………………………………………………………… 45
12. Summary of Work Done………………………………………………………………………… 46
13. Project Timeline………………………………………………………………………………… 47
14. Project Budget…………………………………………………………………………………… 47
15. Conclusion…………………………………………………………………………………………. 47
16. Team Information………………………………………………………………………………….. 48
17. References………………………………………………………………………………………… 48
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 3
LIST OF FIGURES
Pages
Figure 2.1: Typical charging profile of a Sealed Lead Acid battery……………………………… 07
Figure 2.2: Typical charging profile of a lithium-ion battery……………………………………… 09
Figure 2.3: Typical charging profile of Nickel-Cadmium batteries………………………… 10
Figure 2.4: Typical charging profile of Nickel-Metal Hydride batteries…………………… ............. 11
Figure 3.1: Functional block diagram of the developed scheme for the charger…………………… 12
Figure 4.1: (a) Functional block diagram and (b) Photograph of Switch Mode Power Supply……… 14
Figure 4.2: Circuit diagram of the Switch Mode Power Supply……………………………………… 16
Figure 4.3: Circuit diagram of SMPS built using NCP1651……………………………………… 21
Figure 5.1: (a) Functional block diagram and (b) Photograph of the charger circuit………………… 22
Figure 5.2: Buck converter with driver circuit………………………………………………………… 24
Figure 5.3: Functional block diagram of battery presence detection and polarity
sensing circuit with H- bridge……………………………………………………………… 25
Figure 5.4: Circuit diagram of battery presence detection and polarity sensing
circuit with H-bridge………………………………………………………………………… 26
Figure 5.5: Circuit diagram of the discharger circuit…………………………………………………… 27
Figure 5.6: Functional diagram of the microcontroller section………………………………………… . 28
Figure 5.7: Charging profile of a 3200mAh, 6V Sealed Lead Acid battery………………………… 30
Figure 5.8: Charging profile of a 700mAh 3.7V Li-ion battery……………………………………… 30
Figure 5.9: Charging profile of 600mAh 4.8V NiCd battery………………………………………… 31
Figure 5.10: Charging profile of 2300mAh 4.8V NiMH battery……………………………………… 31
Figure 6.1: Plot of efficiency of the charger circuit and estimated efficiency of the device
at 1A constant output current…………………………………………………………… 32
Figure 7.1: Discharging Characteristics of a 650mAh Li-ion single cell battery………………….. 35
Figure 7.1: Discharging characteristics of a 900mAh Li-ion single cell battery…………………….. 35
Figure 7.2: Discharge characteristics of a 700mAh NiCd two-cell battery…………………………… 36
Figure 7.3: Discharge characteristics of a 4600mAh NiMH two-cell battery……………………… . 36
Figure 7.4: Discharge characteristics of a 3200mAh SLA 3-cell battery………………………… 37
Figure 7.6: Discharge characteristics of a 4500mAh SLA 3-cell battery…………………………… 37
Figure 9.1: beta of the batteries of different chemistries……………………………………………… 41
Figure 7.2: Characteristic curve of different batteries in SOC method……………………………… 42
Figure 10.1: Block Diagram of Data logging hardware………………………………………………… 44
Figure 10.2: Screenshot of BUET IFEC 2007 TEAM of data logging software…………………… 44
Figure 13.1. Project timeline……………………………………………………………………………… 47
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 4
LIST OF TABLES
Pages
Table 4.1: Table of estimated losses in SMPS………………………………………………………… 19
Table 4.2: Measured no load power in SMPS……………………………………………………… 19
Table 5.1. Battery charging process of SLA and Li-ion……………………………………………….. 29
Table 5.2. Battery charging process of NiMH and NiCd…………………………………………… 29
Table 5.3: Power loss in charger circuit when supplying 1A at 22V…………………………………. 32
Table 7.5: Table of tested batteries…………………………………………………………………… 33
Table 7.2: Table of decision in battery chemistry detection…………………………………………… 38
Figure 11.1: Cost estimation of the device……………………………………………………………… 45
Table 12.1: Summary of the achievements…………………………………………………………… 46
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 5
1 Introduction
The portable battery is still considered one of the most important and reliable source for
portable energies. Though the nature of battery applications has changed over the years, new
technologies have ensured that batteries remain a reliable and efficient source for general purposes.
The rechargeable battery is one such development that allows the user to make use of a single
battery over and over again by simply recharging it when the battery charge runs out. These batteries
have saved the user from the hassle of acquiring a stock of batteries for continuous use, since a
single battery may be used repeatedly by simply recharging it after its capacity is finished. This has
decreased the necessity to use the one-time use batteries which are generally discarded after one
single use.
The mass usage of these rechargeable batteries in different applications means that there are
batteries of different types and capacities with varying recharging techniques. It is therefore
convenient for the user if there was one single charger to recharge every kind of battery regardless of
their capacity and type. Hence, the idea of the universal battery charger has come into the fore. This
report discusses the development of a universal adaptive battery charger that will be able to recharge
four different types of batteries of different quantities and capacities. The IFEC Challenge 2007
specifies the universal battery charger that will be able to recharge SLA, Li-ion, Ni-MH and Ni-Cd
batteries up to 24 Voltage and a maximum charging current of 2A. The universal battery charger
developed must also conform to several other stipulations regarding power consumption, size and
economic feasibility. All these requirements were taken into consideration when designing the battery
charger.
The universal battery charger designed by the BUET IFEC 2007 team meets most of the
primary requirements set by the IFEC Committee and fulfills a few of the secondary features. It takes
power from an A.C. supply which may vary from 95-270V rms. It converts it into a 35V fixed DC with a
flyback converter which was implemented by a microcontroller. The maximum output current is
regulated to 2A. This fixed DC voltage is controlled by another microcontroller to adapt to different
voltages of batteries. Some key aspects of the battery charger are mentioned below:
Auto-delectability of connected battery chemistry and configuration.
Charging range from 2-26V battery voltages.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 6
Supports up to 2A charging current.
Cost efficient and portable sized design.
We have been able to add a few extra features of our own:
This circuit may be used as a 0-25V variable DC voltage source with 2A current limiting
capability.
A keypad has been attached by which advanced users may provide battery information for
quicker and more efficient recharging.
Advanced control is enabled by implementation of an LCD-keypad.
2 Battery Information
Several types of rechargeable batteries has been developed till today. These batteries work
on different chemistries and so they show different characteristics. Some batteries can provide very
high load current, whereas some cannot take the strain of high discharge. Batteries like nickel-based
ones show almost constant voltage profile regardless of their state of charge, where Lithium based
batteries have varying voltage according to their state of charge.
The IFEC committee has selected four types of rechargeable battery chemistry for this
project. They are:
1. Sealed Lead Acid
2. Lithium-ion
3. Nickel-Cadmium
4. Nickel-Metal-Hydride
These batteries require different charging procedures and also show different discharging
profiles. Brief descriptions of them are given below:
2.1 Sealed Lead Acid (SLA) battery
2.1.1 Charging
The charging procedure of SLA contains two main stages and an additional third stage. The
stages are as follows:
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 7
i. The first stage applies a ‘constant current charge’, raising the cell voltage to a preset
voltage. After this stage, the battery is charged to about 70%.
ii. The second charge is ‘topping charge’ state. In this state the current is reduced gradually
by applying the preset ‘constant voltage charge’ as the cell is being saturated. Full charge
is attained the current has dropped to 3% of the rated current or has leveled off.
iii. The additional third stage, the ‘float charge’ state, is applied to compensate for the self
discharge. Correct settings of the voltage limits are critical and range from 2.30V to 2.45V.
The voltage and current profile of a typical SLA battery charging are given in figure 2.1.
Some important factors regarding this charging should be taken in consideration:
A high voltage limit (above 2.40V per cell) produces good battery performance but shortens
the service life due to permanent grid corrosion on the positive plate.
A low voltage limit (below 2.40V per cell) is safe if charged at a higher temperature but the
cell is subject to sulfation on the negative plate.
The charging current should be set between 10% and 30% of the rated capacity.
Figure 2.1: Typical charging profile of a Sealed Lead Acid battery.
Voltage/cell
Charge/current
0.4
1.6
1.2
0.8
Stage 2 Constant voltage. Constant 2.4V charge
Stage 1 Constant Current
Stage 3 Float Charge (2.25 V)
2.5
2.0
1.5
1.0
0.5
3 6 9 12
Cu
rren
t (A
)
Vo
ltag
e (
V)
Time (hrs)
2
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 8
2.1.2 Discharging
Most batteries are rated at 5-hour discharge or 0.2C; some may be even rated at slow 20-
hour discharge.
Deep discharging is discouraged as it shortens battery life.
Performs well on high pulse currents when discharge rates well in excess of 1C can be
drawn.
The battery can be discharged to a minimum 1.75V per cell, but it is discouraged to push the
voltage below 2.1V.
2.2 Lithium-ion (Li-ion) Battery
2.2.1 Charging
Like SLAs, lithium-ion batteries require a charging method containing three stages- two main,
one additional.
Stage 1 of the charging uses a constant current until 4.2V per cell is achieved. The charge
level at this point is about 70%.
Stage 2 maintains a constant voltage while the charging current is gradually reduced. Full
charge is attained after the voltage has reached the threshold and the current has dropped to
3% of the rated current or has leveled off.
Occasionally a topping charge is used, but in most cases it is omitted to guard against
overcharging.
The voltage and current profile of a typical li-ion battery charging are given in figure 2.2.
Lithium-ion batteries require special attentions in some factors:
Overcharging is disastrous in case of Li ion batteries. If charged above 4.30V, the cell causes
plating of metallic lithium on the anode; the cathode material becomes an oxidizing agent,
loses stability and releases oxygen. Eventually the cell is heated up, and if left unattended,
the cell could vent with flame.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 9
A standard li-ion battery pack contains a protection circuit built in it. This limits the peak
voltage of each cell during charge and prevents the cell voltage from dropping too low on
discharge.
The battery should be partially charged during storage.
Most cells are charged to 4.20 volts with a tolerance of 0.05V per cell. Charging only to
4.10V reduces the capacity by 10% but provides a longer service life.
The maximum charge current on most packs are is limited to between 1C and 2C.
2.2.2 Discharging
Maximum discharging current in most cells is limited to 1C or 2C.
Should not be discharged below 2.5V per cell.
If the cells have dwelled at 1.5V per cell and lower for a few days, recharge should be
avoided.
Time (hrs)
Figure 2.2: Typical charging profile of a lithium-ion battery.
Charge current
Voltage/cell
2 1 3
Stage 1 Max. charge current is applied until the cell voltage limit is reached.
Stage 2 Max. cell voltage is reached. Charge current starts to drop as full charge is approached.
0.25/1
0.5/2
0.75/3
1.25/5
1.00/4
Cu
rren
t/V
olt
ag
e
(A/V
)
Terminate charge when current < 3% of rated current
.…….…
.…….…
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 10
2.3 Nickel-Cadmium (NiCd) Battery
2.3.1 Charging
Nickel-Cadmium requires constant current charging unlike SLA and Li-ion batteries. The
voltage profile of a typical NiCd battery charging are given in figure 2.3.
Factors to be considered are:
Prefers fast charge to slow charge (as opposed to other chemistries) and pulse charge to DC
charge.
Overall charge efficiency is about 90% if fast charged at 1C. On a 0.1C overnight charge, the
efficiency drops to about 70%.
Interspersing discharge pulses between charge pulses (commonly referred to as burp or
reverse load charging) improves the charge acceptance.
Full-charge can be detected observing a voltage drop at full charge (negative delta V) after
reaching a peak voltage ranged between 1.35V and 1.55V per cell.
Figure 2.3: Typical charging profile of Nickel-Cadmium batteries.
0 50 100
1.30
1.34
1.38
1.42
1.46
1.50
State of Charge (%)
Vo
ltag
e (
V)
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 11
2.3.2 Discharging
Allows deep discharging to the contrary of other battery chemistries.
Suffers from memory effect; if not periodically full discharged (once a month), large crystals
form on the cell plates reducing performance.
Relatively high self discharge.
2.4 Nickel-Metal Hydride (NiMH) Battery
2.4.1 Charging
Like NiCd batteries, NiMH batteries require constant current charging. They also show almost
same charging voltage profile as NiCd batteries. The voltage profile of a typical NiCd battery charging
are given in figure 2.4.
Factors to keep in mind are:
NiMH battery prefers fast charge to slow charge.
At a C-rate of 0.1-0.3C, the voltage profile fail to exhibit defined characteristics to measure the
full charge state accurately and full charge detection becomes difficult if not impossible.
Figure 2.4: Typical charging profile of Nickel-Metal Hydride batteries.
0 50 100
1.30
1.34
1.38
1.42
1.46
1.50
State of Charge (%)
Vo
ltag
e (
V)
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 12
Trickle charge settings are critical to avoid overcharge.
Produces a very small voltage drop (8mV-16mV) at full charge.
Making the charger too sensitive may terminate the fast charge halfway through the charge
due to voltage fluctuations and electrical noise. Full charge detection is possible by observing
negative delta V after reaching a peak voltage ranging from 1.35-1.5V per cell.
The battery is less prone to memory.
NiMH battery cannot absorb overcharge.
2.4.2 Discharging
Cycling under heavy load reduces battery life.
NiMH battery requires full discharge once every three months to prevent memory effect.
3 Scheme
The scheme for “Universal Adapting Battery Charger” consists of both hardware and software
portions. The functional block diagram for the hardware potion of the charger is given in figure 3.1.
EMI
FILTER
MICROCONTROLLER
ATMega32
~
SWITCH
MODE
POWER
SUPPLY
(WITH
FLYBACK
CONVERTER)
PULSE WIDTH
MODULATED
BUCK
REGULATOR
AND
ASSOCIATED
DRIVE
CIRCUITRY
H-BRIDGE INVERTER
WITH CHARGER-
DISCHARGER SELECT
SWITCH
DISCHARGER
Charger-Discharger
Select
Command
AC Power
Supply
Isolated-Ground
35V Dc
Battery to be charged
Polarity
Setup
Command
Presence
and
Polarity
FeedbackPWM
Voltage
Feedback
Current
Feedback
Discharger
Pulse
+ -
Figure 3.1: Functional block diagram of the developed scheme for the charger device.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 13
The device mainly comprises of two part:
a. Switch Mode Power Supply (SMPS),
b. Charger circuit.
The high voltage AC is given input to the SMPS through an EMI filter and rectified to provide
a pulsating DC voltage for the flyback converter to generate a regulated 35V DC for the charger. This
converter has another purpose. It is used for power factor control. The converter has a over voltage,
under voltage and over current protection by means of the feedback circuit, which also has an error
amplifier for regulating the DC output voltage.
The 35V DC output from the Flyback converter is used to drive the charger circuit. This is
done by the DC-DC Buck converter.
The microcontroller controls the output voltage of the Buck converter and varies the duty
cycle according to the measured voltage and current of the battery as per requirement of the battery
chemistry. The Analog to Digital Converters (ADCs) integrated in the microcontroller senses the
voltage and charging current.
A discharger circuit is built in order to allow pulse discharge of the battery to generate a
discharging profile. Also, the pulse discharge between charge pulses is good for NiCd batteries and
not harmful for other chemistries.
An algorithm based on both charging and discharging characteristics to detect the battery
chemistry, no. of cells and capacity is programmed into the microcontroller. The algorithm uses any
one of the above profiles which comes first to give a certain decision about the battery.
Initially the charger starts to charge all the batteries in constant current (CC) mode, which is
common for all battery types using 500mA charging current. Once the microcontroller identifies the
battery properly, it is charged accordingly.
4 Switch Mode Power Supply
The SMPS converts the ac line voltage into a dc voltage which is to be used by the charger.
Th SMPS serves a dual purpose- generation of a regulated low voltage DC from the high voltage AC
input .
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 14
As the SMPS based on the NCP1651 did not satisfy one of the primary requirements- support
for 48Hz to 440Hz ac line frequency, the controller IC was replaced by a microcontoller ATmega8 by
Atmel, with startup circuitry. This new design is slightly modified version of the converter based on
NCP1651 described in previous report. Almost all the circuit required for the NCP1651 was removed,
except the ac line voltage divider and the current sensing resistance. Every other things like- high
frequency transformer, feedback circuits, snubber circuits remain same, as they would be required in
any controller. The functional block diagram of the SMPS is given in figure 4.1.
(a)
Figure 4.1: (a) Functional block diagram and (b) Photogrph of Switch Mode Power Supply
EMI
FILTER
BRIDGE
RECTIFIER
FLYBACK
CONVERTER
STARTUP ATMega8
RECTIFIER
AND FILTER
OPTOCOUPLER
AUXILIARY
~VOLATAGE
SENSE
PWM
FEEDBACK CIRCUIT WITH
OV, UV AND OC
PROTECTION WITH
ERROR AMPLIFIER
MAIN (35VDC)
TO
CHARGER
PR
IMA
RY SE
CO
ND
AR
Y
AU
X 1
AU
X 2
HIGH
VOLTAGE
SIDE
LOW
VOLTAGE
SIDE
LEGEND
OV = Overvoltage
UV = Undervoltage
OC = Overcurrent
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 15
The AC line voltage is passed through the EMI filter and the bridge rectifier converts the AC
voltage into a pulsating DC voltage. This voltage is converted to a lower voltage by a voltage divider
and one of the ADC channels is used to measure this voltage. The duty cycle of the converter is
changed in such a way that when the pulsed DC voltage peaks, the duty cycle is minimum and when
the pulsed DC voltage is minimum the duty cycle is maximum. In this way a constant voltage is
achieved at the output. However this voltage sensing is not enough to produce a regulated DC
voltage at the converter output. To obtain a regulated DC output a feedback circuit with over voltage,
under voltage and over current protection is used. There is also an error amplifier in this feedback
circuit, which is used in regulating the output voltage. And optocoupler is used for interface the two
isolated circuits.
In the high voltage side, there is also a startup circuit, which is used to provide the
microcontroller power during a brief period. After the microcontroller has started it can power itself
through the auxiliary winding. The circuit is designed in such a way that the startup circuit will be
inactive after the microcontroller gets power from the auxiliary winding.
For the microcontroller and other ICs in the low voltage side another auxilliary windng is used
to generate a lower voltage, which is then regulated by linear regulators.
The complete circuit diagram of the converter is given in figure 4.2.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 16
C19
1n
12
CHOKE
L
1324
- +
D1
BRIDGE2
1
3
4
U4
7805/TOVIN
1V
OU
T3
GND2
J2
1A FUSE
12
U5
7812/TOVIN
1V
OU
T3
GND2
D12
1N4748
J4
XF
12345
109876
J1
AC
12
C1
.68u
1 2
C3
.68u
1 2
R10
10k
2
1
R1
56k
21
R2
56k
21
R3
1.8k
21
R4
56k
21
R5
56k
21
D2
12V
Q1
BUT11AF
D11
MUR160
C4
100u
C15
100u
D3
22V
D13
1N4748
C5
100u
C6
470u
C18
470u
C16
100u
C17
470u
C7
470p
12
R6
82k
21
R7
82k
21
D5
MUR160
M1
2SK1358
R8
.1
21
D4
1N4734
C10
18p1
2
C11
1n
1
2
C9
18p1
2
PROGRAMMER
J3
1 2 3 4 5 6
X1
16MEG
12
J5
OUT
123
D6
MUR160
C2
.68u
1 2R9
1k
2
1
C8
1n
1 2
U2
ATMega8
1234567891011121314
19 20 21 22 23 24 25 26 27 2815 16 17 18
D7
FCU10B60
C12
1500u
U3A
LM324/ON
+3
-2
V+4
V-11
OU
T1
U3B
LM324/ON
+5
-6
V+4
V-11
OU
T7
U3C
LM324/ON
+10
-9
V+4
V-11
OU
T8
U3D
LM324/ON
+12
-13
V+4
V-11
OU
T14
R11
10k
2 1
D8
D1N4148
D9
D1N4148
R12
10k
2 1
R13
220
2 1
R14
220
2 1
R15
1k
2 1
R20
5.6k
2
1
D10
D1N4148
R21
3.9k
2
1
C13
1u
1
2
U6
4N35
R16
2.2k
2 1
R17
0.1
2
1
R18
220
2
1
R22
3.3k
2
1
C14
100n
1
2
R23
10k
2 1
R24
3.3k
2 1
U1
78XX/TOVIN
1V
OU
T3
GND2
Figure 4.2: Circuit diagram of the Switch Mode Power Supply
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 17
4.1 Component Design
4.1.1 Transformer Design
For the transformer, a core which is widely available in local market was selected. The turns
were calculated in the following way-
V = Maximum primary voltage = 375V
f= Switching frequency = 100kHz
a= Core cross sectional area = .11in2
B= Flux density in the core = 1Kgauss
N= Number of turns
For safety, turns ratio is increased to 125.
Using the following formula secondary turns were calculated-
Np = Primary turns = 125
Ns = Secondary turns
Vp = Primary minimum voltage = 134.3
Vs = Secondary voltage = 35
For safety, secondary turns were increased to 35.
Similarly auxiliary windings were calculated to have 20 turns. But as they are far from the
center of the core, they were also increased to 35 turns to provide the necessary voltage.
The wires were selected as follows-
Primary - 28 SWG
Secondary - 26 SWG
Auxiliary – 34 SWG
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 18
4.1.2 MOSFET Selection
Vpeak= Maximum voltage across the MOSFET
V0 = Output voltage = 35V
n = transformers turns ratio = 3.6:1
Vspike = Voltage spike due to transformer leakage inductance = 100V (assumed)
For safety, 2SK1358 was selected, which has a maximum drain to source voltage of 800V.
Besides as a microcontroller is used to drive the MOSFET, the threshold voltage of the MOSFET
must be less than 5V. 2SK1358 also fulfills this requirement.
4.1.3 Snubber Design
For snubber circuit design, the following parameteres are required-
The snubber circuit consists of a RC network. The C is calculated-
And R is calculated by
For safery, C was selected 470pF and R was selected two 82k resistance in parallel.
4.1.4 Feedback circuit:
The feedback circuit consists of an optocoupler and four op-amps. The optocoupler is used
for isolation. The LED of the optocoupler is connected to the output of the op-amps and the transistor
is connected in series with a resistance in such a way that the voltage across the transistor is
inversely proportional to the current through the LED. And in the microcontroller it is programmed that
the duty cycle is proportional to the voltage across the transistor. So finally the duty cycle is inversely
proportional to the current through the LED.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 19
The first op-amp is used as a under voltage comparator. Until the output voltage is above
34V, output voltage of this comparator is low; current through the LED is zero, causing the duty cycle
to be maximum.
The second op-amp is used as an error amplifier. It is basically an inverting integrator. The
output voltage of this op-amp depends upon how much the output voltage deviates from 35V. If the
voltage is above 35V then the voltage at the output of this op-amp increases, causing less current to
flow through the optocoupler diode and the duty cycle to decrease, which in turn reduces the output
voltage. If the output voltage is below 35V, then the output of this op-amp decreases, causing more
current to flow through the optocoupler diode and the duty cycle increases, generating more voltage.
The third op-amp is used as an over voltage comparator. If the output voltage is over 36V,
then the output of this op-amp becomes high, decreasing the current through the optocoupler diode to
zero. This causes the duty cycle to be minimum and the output voltage is decreased.
The fourth op-amp is used as an differential amplifier. If the output current becomes than 2.5A
then the output of this op-amp goes high, causing an artificial overvoltage situation by increasing the
voltage at the under voltage comparator‟s non-inverting terminals. This would cause the duty cycle to
be minimum.
By using this circuit, it becomes possible to maintain a regulated 35V DC at the output of the
flyback converter.
4.1.5 Microcontroller selection:
The microcontroller selected fo this converter is Atmega8. This microcontroller is selected for
its low price, smaller size, ADCs and high speed. To use its maximum potential a 16MHz crystal is
used. The 16 bit timer was used for generating the gate pulses for the MOSFET.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 20
4.2 Performance Analysis
4.2.1 Losses:
The estimated losses in loaded condition in the SMPS portion of the device are given in table
4.1.
Input rectifier 1W
MOSFET 4.8W
Output Rectifier .8W
Transformer 6W (estimated)
Snubber .4W
Miscellaneous 1W
Total 14W
Table 4.1: Table of estimated losses in SMPS
Calculated Efficiency = 60/(60+14) = 81%
4.2.2 No load power:
The measured no load power of the SMPS based on ATMega8 is given in table 4.2.
AC line Voltage No load power
95V 0.3W
110V 0.4W
220V 0.8W
Table 4.2: Measured no load power in SMPS
4.3 Previous approaches:
The SMPS was initially built using the flyback converter with power factor control IC NCP1651
by On Semiconductors. The converter gave a stable 31V with a maximum current of 2.5A. The circuit
diagram is given in figure 4.3.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 21
The output voltage of the SMPS was later increased to 35V due to the reason that the charger
prototype needs about 32V to give a output charging voltage of 25.2V, which is required for charging
6 Li-ion cells.
Though the cirucit was quite satisfactory in performance, this circuit does not fulfill the
frequency range support requirement (48-440Hz).
4.3.1 Performance Comparison between the approaches:
As the SMPS was burnt due to an accidental short circuit during the last test with the charger
circuit, real data cannot be provided except the no load power. Efficiency and power factor could not
be measured. However, from the simulations and calculations it may be said that the SMPS based on
the microcontroller would be about 80% efficient, but power factor may not be controlled much. Where
as, the circuit based on NCP1651 was more efficient and also it had very good power factor. So it can
be said that, based on the application, where higher frequency AC source (>60Hz) is required, the
ATmega8 based SMPS should be used and where normal AC source (50/60Hz) is present, NCP1651
based SMPS should be used.
Figure 4.3: Circuit diagram of SMPS built using NCP1651
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 22
5 Chager Circuit
The functional block diagram of the prototype charger is given in Figure 5.1.
35V DC
OUTPUT
DC-DC BUCK
CONVERTER
DRIVER CIRCUIT FOR
MOSFET IN BUCK
CONVERTER
H-BRIDGE
INVERTER
BATTERY
MICROCONTROLLER
KEYPAD LCD UART
DISCHARGER
CURRENT
FEEDBACKVOLTAGE
FEEDBACK
BATTERY
PRESENCE
DETECTION AND
POLARITY
SENSING
SELECTOR
SWITCH
PO
LA
RIT
Y
SE
TU
P
DIS
CH
AR
GE
R
PU
LS
E
PW
M
(a)
(b)
Figure 5.1: (a) Functional block diagram and (b) Photograph of the charger circuit
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 23
The flyback converter supplies a stable 35V DC to the charger circuit which is used to charge
SLA, Li ion, NiCd and NiMH batteries as per chemistry.
The charger is in standby mode initially. If no battery is connected and the prototype is turned
on, a menu appears on the LCD screen to ask for whether the prototype will be used as a power
supply or a battery charger. If a battery is connected and the prototype is turned on, the prototype wait
for 30 seconds and if no key is pressed, it automatically goes to the adaptive-charging mode.
When a battery is connected, the battery presence detection and polarity sensing circuit
automatically detects the presence of the battery and senses its polarity and then sends data signal to
the microcontroller. Based on these signal data, microcontroller configures the h-bridge so that the
positive terminal of the battery is connected to the positive output of the Buck converter.
In the adaptive-charging mode, the charger starts the sequential process of constant current
charging at 500mA of 10mmins and discharging. In this process, the algorithm programmed in the
microcontroller observes some specific parameters in the charging and discharging voltage
characteristics via the ADCs built in the microcontroller and decides the battery chemistry and
according number of cells. After that, the charger charges the batteries constant current mode at
500mA or constant voltage mode as required for the detected chemistry.
5.1 Circuit description
5.1.1 Buck Converter
The Buck DC-DC voltage converter used in the charger is a simple asynchronous Buck DC-
DC converter. The input voltage is 35V. The output voltage is ranged 2-26V. The filter capacitor and
inductor are calculated for 1mV p-p ripple at the output. The maximum current is 2A. The circuit
diagram of this converter is shown in figure 5.2, which includes the drive circuit.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 24
M1 IRF540N
L1
3.9mH
1 2
Q2
BD244Q3
BD244
+C7
1.5m
12GND
BUCK_OUTPUT
D2D1N4148
D3
D1N4148
Q1
Q2N3904
D4
MBR2045CT
R11k
R210k
R310
R4
1k
R51k
R610.
+C6
4.7u
12
+12 VDC
MAIN
PWM C5
100n
1
2
Figure 5.2: Buck converter with driver circuit.
The MOSFET is driven by the driver circuitry. Switching frequency used is 20 kHz. This
frequency was selected specifically so that it would not generate any sound from the mechanical
vibration of the inductor, which was previously observed using lower frequency.
5.1.1.1 MOSFET switching driver in Buck converter
The switching device used here is an N-channel MOSFET, IRF540. It is selected for its low
cost, low on time resistance (<77 milliohms), high current capability (max 23A) and high durability.
The PWM signal from the microcontroller is a digital logic signal of 0-5V which is not sufficient to drive
the MOSFET as its source pin is not in the circuit ground. So a drive circuit is used which takes the
logic level signal as input and produces another signal with higher voltage level of about 0-40V,
without changing the duty cycle of the signal. The driver circuit with the Buck converter is given in
figure 5.2.
In the circuit the signal from the microcontroller is given to a buffer IC. The output of the buffer
IC is connected to the base of the switching transistor Q1. In the positive portion of the PWM signal,
Q1 is turned on and the capacitor C1 is charged to 35V through the diode D1. As D1 is forward
biased, transistor Q2 is turned off. So MOSFET M1 is turned off as there is no voltage at its gate. In
the negative portion of the signal, Q1 is off and the voltage across C1 is 42V resulting the D1 reverse
biased and Q2 turned on. This 42V is passed to the gate of M1 through diode D2 and 10 ohm
resistance and the MOSFET is turned on.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 25
5.1.2 Battery presence detection and polarity sensing
To detect the presence of the battery and change the H-bridge to appropriate connections a
battery presence detection and polarity sensing circuit is used. Functional block diagram as well as
the circuit diagram of the battery presence detection and polarity sensing circuit along with the H-
bridge is given in figures 5.3 and 5.4 respectively. It consists of two optocouplers. The H-bridge is
connected in such a way that the default polarity is BATT1 positive and BATT2 negative. If the battery
is connected in this way, then the presence of the battery is detected by the high voltage generated at
the output of the optocoupler 1. When the battery is connected in the other way, then the presence of
the battery is detected by the high voltage generated at the output of the optocoupler 2. The outputs
of both optocouplers are logically Ored and connected to the active low reset circuit of the
microcontroller. So whenever a battery is connected to the charger, the battery presence is detected
and the microcontroller is turned on, regardless of the polarity.
BUCK OUTPUT
BATTERY
PRESENCE AND
POLARITY
SENSE
CHARGER DISCHARGER
RELAY 3
RELAY 1
RELAY 2
PULSE LOAD
BY MOSFET
SWITCHING
+ -
Figure 5.3: functional block diagram of battery presence detection and polarity sensing circuit
with H-bridge.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 26
D6
D1N4148
D7
D1N4148
M2
IRF540ND8
D1N4148
OPTO_1
OPTO_2
R111k
R121k
BATT_1
RELAY_3GND
GND
BUCK_OUTPUT D5MBR2045CT
R140.1
I_SENSE
R13
100k
GND
U84N35
CHARGER_ENABLE
RELAY_2
GND
RELAY_1
R10
100k
U74N35
BATT_2
+5 V_H-BRIDGE_&_LOGIC
DISCHARGER_IN
GND
C8
100n12
Q4
Q2N3904
Q5
Q2N3904
Q6
Q2N3904
R7
1k
R8
1k
R9
1k
U4
RELAY_SPDT_3
354
12
U5RELAY_SPDT_1
35
412
U6
RELAY_SPDT_2
35
412
Figure 5.4: Circuit diagram of battery presence detection and polarity sensing circuit
with H-bridge.
As the output of the optocoupler 2 is connected to the H-bridge, when the battery is
connected in the opposite polarity, the H-bridge connections are altered. Thus the charger becomes
polarity insensitive.
5.1.3 H-Bridge
One of the primary requirements of this charger is to be polarity insensitive. For this purpose
an H-Bridge IC L298 was used at first. The IC was selected for high current rating (4 A), low
saturation voltage, over temperature protection and high noise immunity. This IC can also handle the
back EMF of motors, which is similar to battery charging application. The IC contains two individual
modules, which were used in parallel to reduce power loss. The battery to be charged was connected
to the output terminals of the H-bridge.
But it was found that this IC consumes about 6 watts power at all output voltages which
degrades the power efficiency of the prototype greatly. So, after considering some alternatives, it was
decided to construct the H-bridge with two SPDT relays. The block diagram of this H-bridge is shown
in Figure 5.3 along with the battery presence detection and polarity sensing circuit.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 27
The relay 1 acts as the source and the relay 2 acts as the sink. The common terminal of the
relay 1 is connected to the output of the Buck converter, the normally closed (NC) terminal to the
BATT1 and the normally open (NO) terminal to BATT2. The common terminal of the relay 2 is
connected to the drain of the Charge Enable MOSFET, NC terminal to the BATT2 and NO terminal to
the BATT1.
The assumed default polarity of the connected battery is BATT1 positive and BATT2
negative. If the battery is connected inversely, then the detection circuit would give a high voltage to
the base of the relay driving transistors causing the relays to be tripped. In this way the positive
terminal of the charger is always connected to the positive terminal of the battery and the negative
terminal of the battery is always connected to the negative terminal of the charger.
5.1.4 Discharger:
In order to detect the battery chemistry, number of cell and capacity, sometimes a discharging
profile is needed. So, a discharger is integrated in the charger prototype which uses discharge pulse
to discharge the batteries at 400mA.
The functional block diagram of the discharger integrated with the charger prototype is shown
in figure 5.3.
I nitially Relay 3 is has its NC contact connected to the presence and polarity of battery
detection circuit. If the algorithm finds it necessary, Relay 3 is tripped so that NO its contact becomes
closed, the charging ciruit is disconnected and discharger is turned on.
R17
1k
Q7
Q2N3904
GND
DISCHARGER_PULSEDISCHARGER_IN
R15
1.5
M3IRF540N
R16
1k
Figure 5.5: Circuit diagram of the discharger circuit
As shown in figure 5.5, with the discharge in is high, the microcontroller sends discharge
pulses. When the pulse is high, the MOSFET is turned on and the battery starts to discharge through
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 28
1.5 ohm resistance. As the battery starts to discharge in a higher rate, the base voltage of the BJT
increases, causing it to lower its collector to emitter voltage, which is also the gate voltage of the
MOSFET. As a result of the lowered gate voltage, the current through the MOSFET decreases,
keeping it in the same value as before. The circuit thus uses a negative feedback to act as a current
sink.
5.1.5 Logic Control
The microcontroller chosen to control the charging process and utilize the algorithms
developed is ATMega32L by ATMEL. The reason for choosing this microcontroller is for its higher
amount of RAM, lower price, availability, speed and above all, free and user friendly programming
hardware and software.
A 4x3 keypad and a 20X4 LCD display are connected for manual control and user friendly
interface. The 16 bit timer in microcontroller is used to produce the PWM signal used in the Buck
converter. The UART (Universal Asynchronous Receiver Transmitter) interface of the microcontroller
is connected to a computer to log the charging voltage, open circuit voltage and charging current in
real time. This system helps to realize the performance of the charger.
A T
M e
g a
3 2
L
Battery Presence
and Polarity
Sense
Manual Selection
from Keypad
Batt 1 Terminal
Voltage Feedback
Batt 2 Terminal
Voltage Feedback
Current Feedback
UART
LCD
Charger Enable
Discharger Pulse
Charger-
Discharger Select
PWM
Polarity Setup
Port B
Pins 1-7
Port D
Pins 16 & 17
Port C
Pins 20 & 21
Port D
Pin 18
Port D
Pin 19
Port C
Pin 28
Port C
Pin 29
Port C
Pin 22-27
Port D
Pin15
Port A
Pins 36-38
(ADCs 4-2)
Port A
Pins 33-35
(ADCs 7-5)
Port A
Pin 39
(ADC 1)
Figure 5.6. Functional diagram of the microcontroller section
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 29
To measure the voltages of the battery, voltage dividers are used so that the voltages to be
measured are converted to low values. The maximum voltage to be measured is 35V. As there are 8
ADCs to be used, 6 of them are used to measure the voltages of the battery terminals. Of the ADCs
for each terminal one ADC measures a voltage range of 0-5V, another measures 5-15V and the last
ADC measures 15-35V. One of the remaining two ADCs, one is used to measure the charging
current. Some capacitors are also connected to the ADC input terminals. These capacitors acts as
filters to suppress the voltage ripples generated from the Buck converter switching at the ADC input
terminals. The values of the capacitors are calculated to be 2uF, for 20 kHz higher cutoff frequency.
5.2 Performance analysis
5.2.1 Proper charging
The charger device is able to perform proper charging of batteries of all the four chemistry as
required by the IFEC2007 committee, which are given in tables 5.1 and 5.2.
Battery Starting
mode
Starting mode
up to
Ending
mode Termination
SLA CC 2.3V/cell CV Ich<Ith
Li-ion CC 4.2V/cell CV Ich<Ith
* CC = Constant Current CV = Constant Voltage Ich = Charging Current Ith = 3% Current
of CC mode
Table 5.3. Battery charging process of SLA and Li-ion
Battery Charging mode Termination
NiMH CC dv/dt<0
NiCd CC dv/dt=0
* CC = Constant Current CV = Constant Voltage
Table 5.4. Battery charging process of NiMH and NiCd
Some sample charging profiles of batteries of different chemistries are given in figures 5.6
through 5.9.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 30
Figure 5.7: Charging profile of a 3200mAh, 6V Sealed Lead Acid battery
Figure 5.8: Charging profile of a 700mAh 3.7V Li-ion battery
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 31
Figure 5.9: Charging profile of 600mAh 4.8V NiCd battery
Figure 5.10: Charging profile of 2300mAh 4.8V NiMH battery
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 32
5.2.2 Power calculation
A calculation of power loss in the charger circuit is given in table 5.3.
Components Loss
Buck MOSFET 0.4W
Reverse Blocking Diode 0.4W
Charger Enable MOSFET 0.4W
Relays 1W
Others 0.1W
Total 2.3W
Table 5.3: Power loss in charger circuit when supplying 1A at 22V.
6 Efficiency
A plot of efficiency of the charger circuit and estimated efficiency of the device is given in
figure 6.1.
Figure 6.1: Plot of efficiency of the charger circuit and estimated efficiency of the
device at 1A constant output current
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 33
7 Method of Battery Detection
As per the project requirements, it is needed to detect 4 types of battery chemistries. They
are: NiMH, NiCd, Li-ion and Sealed Lead Acid (SLA). It has been observed that there is not much
difference in the charging technique for NiMH and NiCd batteries. So they can be treated as same
type. Thus, we have now three major battery types to differentiate: Li, Ni and SLA.
By extensive study of battery charging and discharging characteristics, a technique has been
found to identify the three battery types. The key point in this regard is that, all the experiments and
tests are conducted with the available batteries in local market. A list of mostly locally available local
batteries is given in table 7.1.
Batteries Manufacturers Size
Li-ion Anik, Nokia, Samsung Cell phone batteries
SLA CoolPower, Unicol, Free Tat Holdings _
NiMH Sony, Sanyo, Panasonic AA, AAA
NiCd Sanyo, Cadnica AA, AAA
Table 7.1: Table of tested batteries
Our implemented method for battery detection comprises two steps.
1. Constant current charging at 500mA for approximately 10 minutes.
2. Discharging the battery
7.1 Constant current charging at 500mA for approximately 10 minutes
During Charging for a short span of time (approximately 10 min), there is a possibility of
detecting NiMH or NiCd batteries. This can only be possible when almost full charged battery is given
and after 10 min charging the battery has reached end of charge. At that moment, Open Circuit
voltage of the battery fall below peak voltage by at least 15 mV, we can say it to be Nickel battery. In
this case if the fall of voltage is quite greater than 15mV we need to charge it again using Ni()
subroutine where appropriate termination condition is used to charge Ni batteries.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 34
One more thing that should be noted is overcharging protection of Li batteries should be
provided. For this purpose, continuous checking is done using the voltage range of charged Li
batteries. If it falls in the specified range, the battery may be detected as Li and charging must be
stopped. But using this method does not ensure that it is Li, because Ni battery of different cell
numbers can show the same range of voltage as Li batteries when they are discharged. For this
reason, we have introduced discharging during battery detection process.
7.2 Discharging the battery:
After a constant current charging of 10 min if battery type is undetermined, the battery is
allowed to discharge at 400mA discharging current. The main philosophy behind this discharging
method is that every battery type has distinctive discharging characteristics. If we are able to define
suitable parameters which have different values for different types of batteries, we can easily
distinguish different cell chemistry.
Three parameters are defined namely „N‟, „L‟ and „DV2‟ which would formulate the procedure
for battery detection.
N = MA(DV) × 400 ÷ Vpeak
L = MA(dV ÷ Vpeak) × 5
DV2= MA (DV) × 1000
Here,
DV = Vpeak(t-1) – Vpeak(t)
dV = Vpeak(t) – Vtrough(t)
MA = Moving Average
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 35
At first the discharge characteristics of Li-ion is considered.
From the above discharge curves of two Li-ion batteries having different capacities it is
observed that the relative difference between Vpeak (open circuit voltage) and Vtrough (short circuit
voltage, battery delivering a specific load) remains almost constant.
Figure 7.1: Discharging Characteristics of a 650mAh Li-ion single cell battery.
Figure 7.2: Discharging characteristics of a 900mAh Li-ion single cell battery
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 36
Now the discharge characteristics of Nickel batteries are considered.
Figure 7.3: Discharge characteristics of a 700mAh NiCd two-cell battery
Figure 7.4: Discharge characteristics of a 4600mAh NiMH two-cell battery
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 37
From the above curves, it is clear that both NiCd and NiMH shows almost the same discharge
characteristics. In these cases, the relative difference between Vpeak and Vtrough rises sharply at
discharge point. This phenomenon can be used for both discharge point detection and for detecting
Ni+ battery.
At last, two discharge characteristics of SLA batteries are considered.
Figure 7.5: Discharge characteristics of a 3200mAh SLA 3-cell battery
Figure 7.6: Discharge characteristics of a 4500mAh SLA 3-cell battery
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 38
From the six curves presented earlier, threshold values for N, L and DV2 can easily be
chosen to differentiate the three types of batteries. The ranges of these parameters for different types
of batteries are given in table 7.2.
Condition Decision
N > 1 AND L > 1 Ni
N < 1 AND L > 1 AND DV2 > 2.75 Li-ion
N < 1 AND L < 1 AND DV2 > 2.75 SLA
Table 7.2: Table of decision in battery chemistry detection
The ranges presented in the table are totally exclusive and there is apparently no chance of
overlapping if some initial data are discarded. The only assumption of this approach towards battery
detection is that the battery should consist some charge initially.
This assumption can be bypassed if the battery given for charging is trickle charged at a
constant current for a specific period of time without detecting its chemistry. After a certain time of
charging, we would discharge the battery for a pre-determined time and thus detect its chemistry. If
the battery could not be detected in this time, the battery would be trickle charged for a longer time
than the previous time interval. Then again an attempt would be taken to detect the battery by
discharging.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 39
8 Working Algorithm
Automatic Charging Subroutine
1) Start.
2) Set Cell_Type = 0.
3) Go to Constant_Current_10min() subroutine.
4) If Cell_Type = 0, then Battery type is undecided yet. Go to Discharge() subroutine.
5) If Cell_Type = 4, then the battery is Nickel and it is fully charged. Go to step 11.
6) If Cell_Type = 6, then 10 min more charging is needed without checking that if it is Li and fully
charged. Go to Constant_Current_10min() again.
7) If Cell_Type = 5, then Battery may be BAD and could not be charged. Go to step 9.
8) Else If Cell_Type = 3, then Battery is Ni and some more charging is needed. Go to Ni()
subroutine.
9) Else if Cell_Type = 1, then battery is SLA. Go first to Constant_Current() subroutine and then to
constant_voltage() subroutine.
10) Else If Cell_Type = 2, then battery is Li-ion. Go first to Constant_Current() subroutine and then to
Constant_Voltage() subroutine.
11) how to the LCD "Charging is Finished.Press Any Key to continue."
12) Wait for any key to be pressed.
13) If any key is pressed, jump to main().
14) End.
Constant_Current_10min() Subroutine
1) Start.
2) Go to Charge Mode.
3) Set Initial DUTY according to the charging current of 500mA.
4) Start PWM Buck to make a constant current charging.
5) Check if Battery runtime voltage rises to integer multiple of 4.2V.
6) If yes break the charging.
7) Check if battery open circuit voltage falls below peak voltage by at least 15mV.
8) If Yes then assign Cell_Type = 3 and calculate N_cell = Vpeak/1.4
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 40
9) Check if battery open circuit voltage falls below by at least 8mV per cell.
10) If Yes, assign Cell_Type = 4 and break.
11) Stop PWM Buck
12) End
Discharge() Subroutine
1) Start.
2) Go to Discharge Mode. Set Discharge_current to 400 mA.
3) Record Open Circuit Voltage and Voltage with load alternatingly.
4) Using that values, calculate DV = Vopen_final-Vopen_previous, and dv = Vopen-Vload.
5) Adjust these values by taking moving average, scaling and normalizing by dividing with Vopen.
6) Calculate three deciding parameters - N, L, DV2.
7) If N>1 or L>1 and no. of iteration do not exceed 18 assign Cell_Type=6 and break the loop.
8) If N<1 and L<1 and DV2>2.75, then Cell_Type=1(SLA) and end of Discharge is reached.
9) If N>1 and L>1, then Cell_Type=3(Ni) and end of discharge is reached.
10) If L>1 and N<1 and DV2>2.75, then Cell_Type=2(Li) and end of discharge is reached.
11) End.
Constant_Current() Suroutine
1) Calculate n = ceil (Vtrm/Standard Voltage at discharge point)
2) Set Charging Current to 500mA.
3) Charge the battery in CC mode until runtime voltage reaches Vtrm = n*Standard_Cell_Voltage
(3.7 for Li and for SLA)
4) End
Constant_Voltage() Subroutine
1) Charge in CV mode until charging current falls to 6 percent of the current at CC mode.
2) End
Ni() Subroutine
1) Calculate n= ceil(Vtrm/Standard Voltage of Ni at discharge point)
2) Charge in CC mode and monitor the battery terminal voltage Vtrm
3) Detect the peak Vpeak of Vtrm
4) If Vtrm< Vpeak-0.008*n go to step 5, else go to step 1
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 41
5) End
9 Previous Approaches
Some other approaches for the detection of battery chemistries and capacity have also been
tried. But extensive testing of different batteries has proven these methods failed. Short descriptions
of these other approaches are given below.
9.1 Chemistry detection
9.1.1 From β of a battery
Initially, a detection technique was developed on the quantity „β‟. β stands for the charge
acceptibilty of a battery. it is defined as
where,
Vcharge = Measured voltage across a cell during charging
Vbatt = Open circuit voltage of a cell
Icharge = Charging current
Figure 9.1: beta of the batteries of different chemistries
From different charging profiles plotted in different times, it has been seen that the range of
values of β for different chemistry during almost the whole charging period highly overlaps. This
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 42
eventually leads to faulty detection of chemistry and hence number of cells. A barchart of range of
values of beta of different chemistries is given in figure 9.1.
9.1.2 SoC Method:
As an alternative method of battery detection, the State of Charge (SoC) method was
formulated. In this method, it is assumed that the discharge current of a battery is proportional to the
SoC of the battery and that different capacity battery would have the same characteristic curves if
open circuit voltage is plotted against discharge current. Moreover, different types of batteries should
show distinguishably different Open circuit voltage versus Discharge current plots. A combined
hypothetical plot of three different types of batteries is shown below:
Figure 7.2: Characteristic curve of different batteries in SoC method
It was first assumed that in the final circuit, the battery would be discharged for a certain
period. The acquired data would be matched with the pre-mapped battery characteristic plots and
thus the battery chemistry would be detected by their identical set of curves.
.Experiments on this method carried out. The data from several batteries were mapped and
the feasibility of the method was tested. Finally, this approach did not result in a good manner for
detecting battery types.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 43
9.2 Capacity Measurement:
Several approaches were undertaken to measure the battery capacity. First, it was assumed
that the battery having a high capacity would take proportionately longer time to be charged. It implies
that the dv / dt of high capacity batteries would be lower than batteries of lower capacity.
Here
dt = a small time interval
dv = change in battery open circuit voltage in time „dt‟
From this inverse relation an estimate of battery capacity can be found.
Next, another approach was initiated. In this approach a battery would be first trickle charged
for 20 minutes. Then the battery would be discharged with constant discharge current. Now, if the
battery is of high capacity, it would discharge quickly than a battery with lower capacity. That is, a high
capacity battery would posses a high dv / dt ratio where
dt = a small time interval
dv = change in battery open circuit voltage in the time interval dt
Again from this relations, an estimate of battery capacity could be found.
A similar approach was formulated by changing the definition of „dv‟. It is defined as the
difference of two battery open circuit voltages such that one is the current Vpeak and another is
immediate previous sampled value of Vpeak. That is
dv = Vpeak (t) – Vpeak (t-1)
This case would also result in a high dv / dt for higher capacity batteries which are discharged
after a short period of charging.
10 Key Innovations
A data logging equipment is of prime importance when it comes to obseving voltges and
current for a long period. As in this project, plenty of battery data had to be recorded fo analysis, a
unique data logging equipment was built to record, store and display the data.
The equipment consists of two parts:
1. Hardware
2. Software
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 44
10.1 Data logging hardware
The basic block diagram of the data logging hardware is shown in figure 10.1.
Figure 10.1: Block Diagram of Data logging hardware
First the data from the microcontroller is fed to Universal Adapting Receiver Transmitter
(UART, in this case MAX 232 chip), which transfers data to the computer using serial port. Any of the
serial ports (COMPort 1 or 2) can be used for data transfer.
10.2 Data logging software
Figure 10.2: Screenshot of BUET IFEC 2007 TEAM of data logging software
The software is created using Visual Basic language. It takes reading of battery open circuit
voltage, runtime voltage and charging/discharging current and generates a Microsoft Office Excel
Sheet where these data are stored. In order to get a runtime view of the current and voltage profile, a
graphical interface is also attached.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 45
Before the charger is turned on, the software is provided with battery data such as battery
type, no. of cell and capacity. Thus data for a certain type of battery can be stored and analyzed. The
software may also be defined to select which serial port will be taken as source.
A screenshot of the data logging software is given in figure 10.2.
11 Cost Analysis:
The costs of the components are calculated from the local wholesale price. The cost of the
whole project is given block wise in table 11.1.
SMPS Charger
Block Cost Block Cost
EMI Filter and Bridge
rectifier .75$
Buck converter with
driver 1.2$
Startup .4$ H-bridge 1$
Microcontroller 1.4$ Discharger .6$
MOSFET and Snubber 1$ Microcontroller 2.2$
Transformer .5$ PCB .6$
Feedback .55$ Others 1$
PCB .4$ Total 6.6
Others 1$
Total 6$
Grand Total 12.6$
Figure 11.1: Cost estimation of the device
As all the electrical components are imported in our country, manufacturing cost in high
volume will be significantly lower than given here. If the manufacturing cost in high volume is 80% of
this cost, then the cost is 9.76$. So it may be said that the cost requirement is fulfilled.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 46
12 Summary of the work done
Requirements Status Comments
AC power supply Partially Achieved Different SMPS for different requirement
Charger Achieved With optional requirements
Charging current Achieved With optional requirements
Appropriate charging Achieved
External indications Achieved LCD panel is used, LED can be used for lower cost
Polarity insensitivity Achieved
SC and OC protection Achieved Implemented in SMPS
No load power Not achieved Slightly greater than the requirement
Power drawn after
charge finished Not Applicable No float charge is implemented
Power drawn during
charge Partially Achieved At low output power efficiency is low
Power quality Partially Achieved Microcontroller based SMPS does not fulfill but
NCP1651 based SMPS fulfills this requirement
Manufacturer‟s
recommendation Achieved
Hot pluggable Achieved
Connector Achieved
Display Achieved Through the LCD
Power supply Achieved 12V and Variable voltage with CV and CC mode
Safe indoor use Achieved Battery terminals are isolated from the mains
Cost Achieved 12.2$ in our country, which will be less in others
Table 12.1: Summary of the achievements
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 47
13 Project Timeline
The team submitted their proposal on July 2006. after being selected, they started working
hard for achieving the required goals right away. Except for the occasional breaks such as termfinal
exams, the team worked continuously.
Figure 13.1. Project timeline
A graphical representation of the project time line is given in Figure 13.1.
14 Project Budget
The estimated budget of the project was USD 1000 (70,000 BDT). However, we were able to
complete the total project within a budget of USD 850 (almost 60,000 BDT). A local power
management company Enercon Systems International Limited has provided sponsor for the total
project. BUET has provided the IFEC team with the necessary support and facilities.
15 Conclusion
The BUET IFEC Team has worked tirelessly to complete this project. This has been a
thoroughly challenging and exhilarating experience for all of the students involved in the project. The
team is especially grateful to our faculties and lab coordinators for providing us with the necessary
support and aid. The proposed design fulfills most of the primary requirements specified by the IFEC
Committee as well as some extra features that were developed.
IFEC 2007 Final Report Bangladesh University of Engineering and Technology
Page 48
During the work, the major problem faced was regarding the flyback converter. Due to
unavailability of the NCP 1651 chip hinderd the development of the SMPS. An alternative plan was
adapted which also met the frequency specifications required by IFEC. The scheme using
microcontoller showed encouraging result, but due to an accidental short circuit, final tests could not
be run and it was not possible to submit the SMPS in the final event. But other than this, the project
can be considered as an successful one.
16 Team Information
The IFEC 2007 team from Bangladesh University of Engineering and Technology (BUET)
consists of 16 undergraduate students at present. They are-
Sarkar Rahat Md. Anwar
Ahmed Tashrif Kamal
Md. Shahriar Jahan
Fahmida Shaheen
Samia Nawar Rahman
Raina Rahman
Hasan Md. Faraby
Abdullah Al Helal
A.T.M. Golam Sarwar
Md. Naimul Hasan
Ahmed Zubair
Mahmudur Rahman Siddiqui
Hafiz Imtiaz
Md. Ryyan Khan
Md. Raisul Islam
Yasin Sumon
Faculty advisor Dr. A.B.M. Harun-Ur-Rashid is in constant interaction with the IFEC team
providing valuable suggestions.
17 References
1) www.atmel.com
2) www.onsemi.com
3) www.wikipedia.org
4) www.greenbatteries.com
5) www.smps.us
6) www.batteryuniversity.com