Documente Academic
Documente Profesional
Documente Cultură
PICREF-2
INTRODUCTION
PICREF-2 OVERVIEW
Microcontroller Benefits
Flexibility to handle different technologies, voltages and capacities.
Variable Voltage Generation Control
Charge/Discharge Multiple Battery Packs
Windowed A/D for High Resolution
Information contained in this publication is intended through suggestion only and may be superseded by updates. No
representation or warranty is given and no liability is assumed by Microchip Technology Inc. with respect to the accuracy or use of such information, or infringement of patents arising from such use or otherwise. It is the responsibility of
each user to ensure that each Battery Charger is adequately designed, safe, and compatible with all conditions
encountered during its use. Typical parameters can and do vary in different applications. All operating parameters,
including Typicals, must be validated for each customer application by the customer's technical experts. Use of
Microchip's products as critical components in life support systems is not authorized except with express written
approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights.
DS30451C-page 1
PICREF-2
TABLE OF CONTENTS
System Overview ........................................................................................................................................ 3
Hardware Overview .................................................................................................................................... 4
Firmware Overview................................................................................................................................... 10
Test Results - NiCd................................................................................................................................... 24
Test Results - NiMH .................................................................................................................................. 25
PICREF-2 to PC Software Overview........................................................................................................ 26
Design Background.................................................................................................................................. 32
Design Modifications................................................................................................................................ 35
Appendix A: System Specifications ....................................................................................................... 37
Appendix B: Minimum Charger Schematic ............................................................................................ 38
Appendix C: Full Charger Schematic ..................................................................................................... 39
Appendix D: Firmware Listing................................................................................................................. 42
Appendix E: PICREF-2 to PC Protocol ................................................................................................... 43
Appendix F: PCB Layout & Fab Drawing ............................................................................................... 55
Appendix G: Bill of Materials (BOM) ....................................................................................................... 56
Appendix H: Battery Charger Demonstration Unit ................................................................................ 59
ACKNOWLEDGMENTS
TRADEMARKS
DS30451C-page 2
PICREF-2
System Overview
Development Mode
In order to develop the firmware for the PICREF-2 system, a development mode has been included.
This mode supports an RS-232 serial link to a PC for
battery status communication. The PIC16C73A also
contains the embedded charging algorithm and controls the external charging components and buck converter.
Development mode offers real-time debug of charge
termination algorithms. In this mode, charging parameters can be changed on the fly via the microcontroller
software and battery data can be logged.
Stand-Alone Mode
Once the correct charging algorithm has been developed and charge parameters have been determined,
the global constants can to be set for stand-alone
mode. There is no RS-232 communication or discharge
capacity in this mode.
FIGURE 1:
Buck
Converter
Filter
BATTERY 1
CHARGE/
DISCHARGE
DC In
PIC16C7XX
RC1
RS-232
RC6
RC7
RB0
Battery 1 Discharge
Battery 1
5V
RA1
LEDs
RB1
:
RB5
PushButtons
MCLR
RB1
:
RB4
Jumper
Selects
RB7
RA4
RA2
RA5
BATTERY 2
CHARGE/
DISCHARGE
RB6
Battery 2
5V
RA3
RA0
RA2
RA5
CURRENT/
VOLTAGE
SENSE
+
-
Current
Sense
Resistor
+
+
Voltage Reference
DS30451C-page 3
PICREF-2
Hardware Overview
Voltage Regulator
Microcontroller
The PIC16C7XX microcontroller gives the PICREF-2
reference design flexibility. Changes can be made
using software instead of hardware, and charging algorithms can be easily customized to accommodate the
users specific battery packs.
The ability to charge and discharge either a single battery or two batteries of the same type means greater
flexibility.
PWM control of voltage generation (via the buck converter) and A/D monitoring of the voltage means precise control over the voltage used for charging
batteries.
Development mode uses the PIC16C73A microcontroller (Figure 2), which provides more memory and a
USART (RS-232) communications port for development of firmware. Stand-alone mode uses the
PIC16C72 (Figure 3). The PIC16C72 or the
PIC16C73A can be inserted in either 28-pin socket
(U17 or U19).
FIGURE 4:
FIGURE 2:
SIMPLIFIED BUCK
CONVERTER
Vi
PWM
L
Vo
PIC16C73A PINOUT
Co
RB7
27
RB6
RA1/AN1
26
RB5
25
RB4
24
RB3
23
RB2
22
21
RB1
RB0/INT
20
VDD
19
VSS
RA2/AN2
RA3/AN3/VREF
RA4/T0CKI
RA5/AN4/SS
VSS
7
8
OSC1/CLKIN
PIC16C73A
RA0/AN0
MCLR/VPP
OSC2/CLKOUT
10
RC0/T1OSO/T1CKI
11
18
RC7/RX/DT
RC1/T1OSI/CCP2
12
17
RC6/TX/CK
RC2/CCP1
13
16
RC5/SDO
RC3/SCK/SCL
14
15
RC4/SDI/SDA
FIGURE 3:
PIC16C72 PINOUT
RB7
27
RB6
RA1/AN1
26
RB5
RA2/AN2
25
RB4
RA3/AN3/VREF
24
RB3
RA4/T0CKI
23
RB2
RA5/AN4/SS
VSS
7
8
22
21
RB1
RB0/INT
OSC1/CLKIN
PIC16C72
RA0/AN0
MCLR/VPP
20
VDD
OSC2/CLKOUT
10
19
VSS
RC0/T1OSO/T1CKI
11
18
RC7
RC1/T1OSI
12
17
RC6
RC2/CCP1
13
16
RC5/SDO
RC3/SCK/SCL
14
15
RC4/SDI/SDA
DS30451C-page 4
Where:
PWM
Vi
Vo
D
Co
L
PICREF-2
There are two modes in which a buck converter can
operate: (1) continuous, where the current is flowing
continuously, or (2) discontinuous, where the current
drops to zero for a period of time. For heavy current
loads, the converter would be in continuous mode.
Under light load conditions, however, the buck converter current may fall to zero for a period of time.
The use of a fast recovery or Schottky diode is recommended for diode D. Either diode provides the necessary forward voltage and switching speed required. A
fast recovery diode is used in the PICREF-2. A Schottky may be used if lower forward voltage is required.
FIGURE 5:
Diode
Current
ton
T
PWM OUTPUT
ton
T
(2)
where:
Ripple
FIGURE 6:
Co IpkT / 8Vripple
Ipk
= 2 IoMAX
IoMAX
= PWM period
Vripple
(3)
where:
Vi
Vo
Vsat
Ipk
IoMAX
ton
= Input voltage
= Output voltage
= Saturation voltage of transistor
= 2 IoMAX
= Maximum output current
= On time of PWM
(1)
where:
ton
T
Vi
Vo
Vsat
VD
= On time of PWM
= PWM period
= Input voltage
= Output voltage
= Saturation voltage of transistor
= Diode forward-bias voltage drop
This equation is valid for 0 < ton < T. Since the equation
was derived assuming current flow in the inductor, the
special cases of ton = 0 (transistor switch off for T) and
ton = T (transistor switch on for T) are not valid for this
equation.
DS30451C-page 5
PICREF-2
EXAMPLE 1: CALCULATING THE INDUCTOR
VALUE
Using Equation (3), calculate the inductor (L) value for:
Vi
= 13.6V
Vsat = 0.2V
Vo = 7.2V
Ipk
= 2A
Note:
Finally; L = 98.8 mH
If a 7 bit resolution PWM is acceptable, then:
T
Voltage Sense
ton = 15.875 ms
L
= 49.2 mH
Note:
Filter - Optional
The filter circuit is intended to provide additional ripple
suppression at the buck converter output stage
(Figure 7).
The filtering circuit is bypassed by connecting JMPR1-1
to JMPR1-2 (see JUMPERS). To enable the filter circuit, connect JMPR2-1 to JMPR2-2 and JMPR3-1 to
JMPR3-2.
Note:
L3, C3, and C4 provide additional ripple filtering on the output of the buck converter.
They may be populated at the designers
option.
FIGURE 7:
FILTER
L3
Vo
Vi
C3
C4
FIGURE 8:
A/D - WINDOWED
3.33R
DS30451C-page 6
R
4.8V
+
4.0V
8-bit A/D
with
5.86 mV/bit
resolution
PICREF-2
The offset can be adjusted by writing to the digital
potentiometer so the microcontroller can seek out any
battery voltage ranging from 0V to 15.0V. The jumper
settings for operation in windowed mode are:
FIGURE 9:
TEMPERATURE SENSE
CIRCUIT
+5V
10k
To A/D
mC
Note:
Current Sense
The PIC16C7XX performs battery current readings
during the rest period of the charge cycle. This is
accomplished by reading the battery current when the
PWM is low. Reading the battery current during the
active period of the charge cycle (PWM is high) will
result in erroneous operation.
The current sense circuitry works by amplifying and
converting the current through a 0.05 ohm resistor into
a voltage. The maximum current reading with a 0.05
ohm resistor and an amplifier gain of 40 is 2.5A (2.5A x
40 x 0.05 ohms = 5.00V). This translates into a 9.77
mA/bit resolution (2.5A / 256 bits). The current sense
resistor is user replaceable.
Note:
Temperature Sense
The temperature sense is accomplished through a 10k
pull-up resistor ( ). The voltage read corresponds to the
thermistor's value in relation to its 25C value. This
means that at 25C the converted voltage would be
2.5V. The converted voltage decreases as the temperature increases and the thermistor value decreases.
RT (10k at 25C)
A simple lookup table in the software provides the corresponding temperature for the converted voltage. The
temperature sense resistors are selectable.
Note:
Battery Pack
The battery pack provided is comprised of the
KR-1100AEL NiCd Fast Charge Battery Cell. It can be
standard-charged at a 110 mA rate or fast-charged at
up to a 1600 mA rate. The temperature range for charging (either standard or fast) is 0C to 45C. For discharge, the temperature range is -20C to 60C.
Note:
Note:
LEDs
LEDs are provided to indicate the status of the IBC
(Table 1). LED locations on the PICREF-2 are shown in
Figure 11 (D5 through D10).
Steady On
Flashing
BATTERY 1
CHRG (D5)
Battery 1 charging
trickle
charge
BATTERY 1
DISCHRG (D6)
Battery 1
discharging
N/A
BATTERY 2
CHRG (D7)
Battery 2 charging
trickle
charge
BATTERY 2
DISCHRG (D8)
Battery 2
discharging
N/A
ERROR (D9)
Battery error
detected
N/A
POWER (D10)
Power on
N/A
DS30451C-page 7
PICREF-2
Pushbuttons
Jumpers
FIGURE 10:
PushButton
Function
SW1
Reset
SW2
Battery 1 Charge
SW3
Battery 1 Discharge
SW4
Battery 2 Charge
SW5
Battery 2 Discharge
JUMPER CONNECTION
CONDITIONS
PIN 1 PIN 2
JMPRX open
JMPRX closed
JMPRX-1 to JMPRY-1
Jumpers
JMPR1 closed
JMPR2 and JUMPR3 open
JMPR1 open
JMPR2 and JMPR3 closed
JMPR4
Stand-Alone Mode
JMPR5 closed
JMPR6 open
JMPR5 open
JMPR6 open
DS30451C-page 8
PICREF-2
FIGURE 11:
Legend
LED
Pushbutton
Jumper
DS30451C-page 9
PICREF-2
Firmware Overview
A discussion of charge termination types and the battery technologies that use them may be found in the
section Design Background.
Add Li-Ion
Additional Charge Termination Algorithms
Algorithms
The equations in Table 4 were used to translate battery
physical quantities into data.
Zero
DV
Abs V
timed
- temp
- V
Battery Temperature in C =
Battery Temperature (signed, 1C/bit)
x
x
DS30451C-page 10
trickle
x
x
x
PICREF-2
FIGURE 12:
No
Yes
Cell Temperature
Within Charging
Limits?
No
Yes
Settling Time Charge
No
Yes
Yes
No
Charge
Yes
No
Time-Out Error?
Yes
No
No
Charge Complete?
Yes
End Fast Charge
DS30451C-page 11
PICREF-2
Program Flow
The flow of MAIN.C is shown in Figure 13. The main
program starts by initializing the hardware for battery
charger operation. The program then performs an endless loop of checking for communications, sensing battery parameters, performing control functions, and
checking for the TIC counter.
The flow of INIT.C is shown in Figure 14. The function
initializes peripheral features and RAM variables. The
following peripherals are initialized: Timer1, CCP1
(PWM), and A/D converter.
Timer1 is used for the TIC counter. It is initialized so that
an interrupt is generated every 0.1 seconds. This is
used as the frame clock for the battery charger algorithms.
The PWM function is initialized for 25 kHz operation.
The peripheral is enabled and set for 0% duty cycle.
The A/D converter is initialized for conversion clock frequency and is enabled for operation.
In addition to peripherals, the I/O ports are configured
for pushbutton, LED, and serial communications. The
RAM locations are cleared and initialized to support
charger operation. If DEVELOPMENT mode is
selected, I2C and RS-232 communications are initialized.
Discharge Battery 1
(DEVELOPMENT mode only)
Discharge Battery 2
(DEVELOPMENT mode only)
Fast Charge Battery 1
Fast Charge Battery 2
Trickle Charge Battery 1
Trickle Charge Battery 2
Repeat Selected States
Idle
If a state is not selected then its operation is not executed and the function advances to the next state. Each
state must complete execution before the next state
commences.
DS30451C-page 12
PICREF-2
FIGURE 13:
MAIN.C
Start
Initialize
Communicate
Sense
Control
Timer1
Overflow?
No
Yes
Reset Timer1
DS30451C-page 13
PICREF-2
FIGURE 14:
INIT.C
Start
Init Timer1
(TIC Counter)
Init PWM
(Buck Converter)
Init A/D
Converter
Clear RAM
Init Variables
Return
DS30451C-page 14
PICREF-2
FIGURE 15:
COMMAND.C
Start
SW2
Pressed
(B1 Charge)
No
Yes
Enable B1 Charge
No
SW4
Pressed
(B2 Charge)
Yes
Enable B2 Charge
Return
DS30451C-page 15
PICREF-2
FIGURE 16:
SENSE.C
Start
No
TIC Counter =
1.0 sec?
Return
Yes
IVT_SENSE
No
Terminate Flag = TRUE?
Yes
Terminate Charge
No
Sensor Initialization
Complete?
Yes
FAIL_SAFE
Continued
DS30451C-page 16
PICREF-2
FIGURE 16:
SENSE.C (CONT)
Continued
No
Sensor Init Complete
and PWM Control =
TRUE?
Yes
Charge
State
Active?
No
Yes
Perform Charge
No
Trickle Charge State
Selected?
Yes
Swap Batteries
Return
DS30451C-page 17
PICREF-2
FIGURE 17:
INT_SENSE
Start
No
PWM = LOW?
Yes
Disable PWM
Update PWM
Control Counter
Return
DS30451C-page 18
PICREF-2
FIGURE 18:
FAIL_SAFE
Start
No
Fast Charge?
Yes
No
I,V,T Error?
Yes
No
Trickle Charge?
Yes
No
I,V Error?
Yes
Disable Trickle Charge
(Can Recover)
Return
DS30451C-page 19
PICREF-2
FIGURE 19:
CONTROL.C
No
New Command?
Yes
Set States
No
State Selected?
Yes
Yes
State Enabled?
No
Enable State
No
State Complete?
Yes
Advance State
Return
DS30451C-page 20
PICREF-2
User Customization
In order to select between DEVELOPMENT mode and
STAND_ALONE mode, the following modifications
must be made:
Development Mode
Stand-alone Mode
Development Mode
DEVELOPMENT Mode uses the PIC16C73A in conjunction with the PC-Based Development software for
selecting battery charge/discharge parameters. The
description below defines how DEVELOPMENT mode
is enabled and may be customized by the user.
1)
MAIN.C
Stand-Alone Mode
STAND_ALONE Mode uses the PIC16C72 in conjunction with the defined battery parameters to charge the
selected battery packs. The description below defines
how STAND_ALONE mode is enabled and may be customized by the user.
1)
2)
BATTERY.H
INIT.C
COMMAND.C
SENSE.C
CONTROL.C
LIBRARY.C
MAIN.C
2)
BATTERY.H
INIT.C
COMMAND.C
SENSE.C
CONTROL.C
DS30451C-page 21
PICREF-2
7)
LIBRARY.C
DS30451C-page 22
PICREF-2
// STAND_ALONE MODE: 8-bit unsigned, 58.5 mV/bit
#define FAIL_SAFE_TC_TEMP_LO 0x00
// STAND_ALONE MODE: 8-bit signed, 0.5 C/bit
#define FAIL_SAFE_TC_TEMP_HI 0x5A
// STAND_ALONE MODE: 8-bit signed, 0.5 C/bit
#define TERMINATE_ABS_VOLT_HI 0x70
// STAND_ALONE MODE: 8-bit unsigned, 58.5 mV/bit
#define FAIL_SAFE_FC_TIME_OUT 0x0E10
// STAND_ALONE MODE: 16-bit unsigned, 1 second/bit
#define FAIL_SAFE_FC_AMP_HI 0x6E
// STAND_ALONE MODE: 8-bit unsigned, 10 mA/bit
#define FAIL_SAFE_TC_AMP_HI 0x01
// STAND_ALONE MODE: 8-bit unsigned, 10 mA/bit
#define FAIL_SAFE_DC_VOLT_LO 0x44
// STAND_ALONE MODE: 8-bit unsigned, 58.5 mV/bit
#define TERMINATE_DV_THRESHOLD 0x9C
// STAND_ALONE MODE: 8-bit unsigned, 5.85 mV/bit
#define TERMINATE_DT_THRESHOLD 0x02
// STAND_ALONE MODE: 8-bit unsigned, 0.5 C/minute
DS30451C-page 23
PICREF-2
Test Results - NiCd
Six (6) battery packs of the four-cell Sanyo
KR1100-AEL battery packs were tested for changes in
battery pack capacity for the charge termination algorithms listed in Table 5 and Table 6. The results show
that there was a very high degree of correlation based
on the charge termination algorithm chosen (i.e., the
behavior of battery packs for Negative Delta Voltage
terminations was nearly identical).
The batteries were cycled through harsh usage conditions of consecutive 1C charge and 0.8C discharge terminations (For a definition of C, see Design
Background - Battery Packs - Charge Rate). After this,
the battery was fully recharged, and the battery capacity was measured using a constant 0.8C load. The discharge was terminated after the reaching the knee of
the battery voltage curve (approximately 1.0 volt per
Original Capacity
200
1100 mAh
1070 mAh
97%
Original Capacity
200
1100 mAh
1020 mAh
93%
FIGURE 20:
Temperature
Voltage
Current
DS30451C-page 24
PICREF-2
Test Results - NiMH
Two Duracell battery packs (DR-15 and DR-35) were
tested for changes in battery pack capacity for the -DV
charge algorithm. The results show that there was a
very high degree of correlation based on this charge
termination method.
This data is for informational reference only. Differences in battery pack construction, battery cells, thermistor characteristics, thermistor placement, battery
usage, and ambient conditions all affect battery performance.
Original Capacity
100
1420 mAh
1340 mAh
94%
Original Capacity
100
2200 mAh
2020 mAh
92%
FIGURE 21:
Temperature
Voltage
Current
DS30451C-page 25
PICREF-2
PICREF-2 to PC Software Overview
Development mode provides a means for the
PICREF-2 to talk to the PC via RS-232 communications. This provides for real-time battery monitoring and
battery data logging.
The PICREF-2 to PC software is a Windows-based
application called Charger that allows for easy programming of the PIC16C73A microcontroller and monitoring of the IBC operation.
System Requirements
To use the Charger application, you will need:
A PC with a 386 processor (or higher) running in
386 enhanced mode
A hard disk with 4 Mbyte of free space
A mouse or other pointing device
An EGA, VGA or other compatible display
8 Mbyte RAM
One free serial (COM) port
Microsoft Windows 3.1 (or higher)
Installing Charger
To install the application:
Start Windows
Insert the Charger disk in a 3 1/2 disk drive
(ex: A).
In the Windows 3.1 Program Manager, choose
Run from the File menu. In Windows 95, click on
the Start Button and select Run from the
drop-down menu.
Type a:\setup in the Command Line box (Where a:
is the disk drive letter).
Choose OK.
Follow the setup instructions.
When the setup is complete, you should have a
Charger program group as shown in Figure 22.
FIGURE 22:
CHARGER ICONS
System Setup
Connect power to the PICREF-2. Then, connect the
PICREF-2 to the free COM port on the PC, with a serial
cable. The firmware in the PIC16C73 microcontroller
will automatically establish communications with the
PC.
Starting Charger
To start the Charger application for Windows 3.1, simply double click on the application icon in the Charger
program group. For Windows 95, click on the Start button, select Programs, then the Charger program group,
and finally the Charger application (charger.exe). The
Charger window is shown in Figure 23.
FIGURE 23:
CHARGER WINDOW
print
open
configure
DS30451C-page 26
PICREF-2
Setting up Charger
To set up the Charger application, select the Options
command under the File menu to open the Battery
Charger Setup Options window, as in Figure 24.
FIGURE 24:
Charger Configuration
When the charger is setup for the first time, it will automatically start the Battery Configuration window
(Figure 25) after setup. To open this window at another
time, select the Charger Configure... command from
the Charger menu or click on the configure button.
Battery configuration parameters and their value
ranges are as follows.
FIGURE 25:
BATTERY CONFIGURATION
DS30451C-page 27
PICREF-2
Primary Charge Termination Limits
Max Absolute Voltage (V):
Values: 0V to 15V.
DV (Negative or Zero) Threshold (mV):
Values: 0 mV to 1500 mV.
DT/Dt Threshold (Deg C/Min):
Values: 0C/Min to 5C/Min.
Battery Type
Charge Algorithm
Fast Charge
Trickle Charge
Termination Algorithm
DV (Negative or Zero)
DT/Dt
Absolute Voltage
Discharge/Charge Sequence
Charger Menus
The charger application has 5 menus: File, Charger,
Charting, Window, and Help.
File Menu
The File Menu contains the following list of commands:
Open
Print...
Print Setup...
Window Color
Window Font
Exit (Alt-F4)
Charger Menu
The Charger Menu contains the following list of commands:
Stop Charging
Start Charging
Charger
Configure...
Options...
Charting Menu
The Charting Menu contains the following list of commands:
Center On
Marker
Max Zoom In
Zoom In
Zoom Out
Display
Configuration
Windows Menu
The Windows Menu contains the following list of commands:
Cascade
Tile
Running Charger
Arrange Icons
Close All
Help Menu
At this time, there is no on-line help.
DS30451C-page 28
PICREF-2
Charger Example 1: NiCd using Delta V
To use PICREF-2 to charge a Sanyo NiCd battery pack
using the Delta V termination algorithm, configure the
charger as shown in Figure 26.
Charging can commence once PICREF-2 is configured. Clicking on the Start Charging button will bring
up the Select Battery Save File window. Determine a
name (ex: battery1.dat) and directory for the charging
information to be stored in, and then click OK.
Charging will commence with the display of the charging graph (Figure 27). End charging by clicking on the
Stop Charging Button.
Clicking on the completed graph at any point will place
a marker there. Current, voltage and temperature information will be displayed (in the top right-hand data box)
for the time offset (in the top left-hand data box) represented by the marker.
FIGURE 26:
FIGURE 27:
MARKER
Voltage
Temp
Current
DS30451C-page 29
PICREF-2
Charger Example 2: NiCd using DeltaT/Deltat
To use PICREF-2 to charge a Sanyo NiCd battery pack
using the DeltaT / Deltat (dT / dt) termination algorithm,
configure the charger as shown in Figure 28.
Charging can commence once PICREF-2 is configured. Clicking on the Start Charging button will bring
up the Select Battery Save File window. Determine a
name (ex: battery2.dat) and directory for the charging
information to be stored in, and then click OK.
Charging will commence with the display of the charging graph (Figure 29). End charging by clicking on the
Stop Charging Button.
Clicking on the completed graph at any point will place
a marker there. Current, voltage, and temperature information will be displayed (in the top right-hand data box)
for the time offset (in the top left-hand data box) represented by the marker.
FIGURE 28:
FIGURE 29:
MARKER
Voltage
Temp
Current
DS30451C-page 30
PICREF-2
Charger Example 3: NiMH using Delta V
To use PICREF-2 to charge a NiMH battery pack using
the Delta V termination algorithm, configure the charger
as shown in Figure 30.
Charging can commence once PICREF-2 is configured. Clicking on the Start Charging button will bring
up the Select Battery Save File window. Determine a
name (ex: battery3.dat) and directory for the charging
information to be stored in, and then click OK.
Charging will commence with the display of the charging graph (Figure 31). End charging by clicking on the
Stop Charging Button.
Clicking on the completed graph at any point will place
a marker there. Current, voltage, and temperature information will be displayed (in the top right-hand data box)
for the time offset (in the top left-hand data box) represented by the marker.
FIGURE 30:
FIGURE 31:
Voltage
MARKER
Temp
Current
DS30451C-page 31
PICREF-2
Design Background
Charge Rate
Battery Technologies
A list of available battery technologies, along with manufacturers and battery specifications, are shown in
Table 9.
Manufacturer
Specifications
NiCd
Sanyo
NiMH
Duracell
Lead Acid
Yuasa
Li-Ion
GS Batteries
Battery Packs
The battery pack will consist of the following connections:
Battery V+
Battery V Thermistor Interface
Charging Considerations
Excess Gas & Thermal Runaway
Recharging must be controlled so that the gasses produced do not built up to dangerous levels. Manufacturers typically compensate for this by oversizing the
negative plate. Also, heat can cause deterioration of the
separator plate which will weaken it.
As a battery cell charges, gas bubbles are released and
accumulate on the plates. This reduces the effective
area of the plate and increases cell impedance. When
the cell approaches full charge, the rate of gas generation and thermal energy increase. This causes the cell
impedance to increase, which in turn produces more
gas. This condition is called thermal runaway.
To charge lead acid, provide a charge current that is
below the gassing voltage.
Memory Effect
The capacity of the battery pack is a function of the individual cells used. The cells can be standard,
rapid-charge, high-temperature, high-capacity, or super
high-capacity. Rapid charge cells have increased negative plate gas absorption characteristics which allow
charging in < 1 hour. High-temperature cells contain a
separator (typically polypropylene), which allow operating temperatures to exceed 65C. High-capacity cells
have both a high-capacity density positive plate and a
high-density paste negative plate which provides 30%+
additional capacity over a standard cell. Super
high-capacity cells contain enhanced positive and negative plate densities which provides 80%+ additional
capacity over a standard cell.
DS30451C-page 32
Voltage Depression
A reversible drop in voltage and capacity may occur
when a sealed NiMH battery is partially discharged and
then recharged. This results in voltage depression or
the memory effect. The loss in voltage or capacity
occurs because only a portion of the active materials is
discharged and recharged during shallow or partial
charging. The active materials that have not been
cycled change in physical characteristics and increase
in resistance. The active materials can be restored to
their
original
state
by
subsequent
full
discharging-charging cycles.
Overdischarge
When a multi-cell series-connected battery is discharged, the lowest capacity cell will reach the point of
full discharge before the other cells. If discharge is con-
PICREF-2
tinued, the lower capacity cell can be driven into an
overdischarge condition through 0.0V. This will cause
its polarity to reverse.
Residual
Capacity
NiCd
90%
20
80%
45
30%
NiMH
90%
20
80%
40
40%
Lead
Acid
DT/Dt
NiCd
X
Zero DV
Absolute
Voltage
Self Discharge
Battery
Technology
NiMH
-DV
Li-Ion
Fail-Safe
Termination
Method
Li-Ion
NiMH
NiCd
Lead
Acid
Timed Charge
Over/Under
Temperature
Over/Under
Voltage
The basic flow diagram for the charge termination algorithms is shown in Figure 12. The cell voltage and temperature is monitored until it is within safe charging
limits. The battery is then charged for an initial settling
period so that proper cell operation is ensured and false
termination signals are filtered out. Fast charge continues until the primary charge termination method has
been satisfied or a fail-safe termination condition is met.
Symbolic
Negative Delta V
Zero Delta V
Delta T / Delta t
Formula
-DV
-dV/dt
Zero DV
dV/dt = 0
DT/Dt
dT/dt
DS30451C-page 33
PICREF-2
FIGURE 32:
FIGURE 34:
-DV
NiCd
NiMH
Battery
Voltage
Zero DV
Time
Battery
Voltage
Time
Charge Termination
Charge Termination
FIGURE 33:
Battery
Temp
Time
Charge Termination
DS30451C-page 34
PICREF-2
Design Modifications
Reference Material
For additional battery information, please refer to the
following books:
Handbook of Batteries 2nd Edition, McGraw-Hill,
David Linden, 1995
Rechargeable Batteries Applications Handbook,
Butterworth-Heinemann, 1992
FIGURE 35:
PIC16C711 PINOUT
RA4/T0CKI
MCLR/VPP
VSS
RB0/INT
RB1
RB2
7
8
RB3
PIC16C711
FIGURE 36:
RA3/AN3/VREF
18
RA1/AN1
17
RA0/AN0
16
OSC1/CLKIN
15
OSC2/CLKOUT
14
VDD
13
RB7
12
11
RB6
RB5
10
RB4
Buck
Converter
Filter
BATTERY 1
CHARGE/
DISCHARGE
PWM
DC In
PIC16C711
RB3
LEDs
PushButtons
Jumper
Selects
RB1
RB2
RB5
RB4
Battery 1
5V
MCLR
RB1
RB2
RA1
RB7
RA4
RA2
RA0
RA2
+
+
-
Current
Sense
Resistor
Voltage Reference
DS30451C-page 35
PICREF-2
NOTES:
DS30451C-page 36
PICREF-2
APPENDIX A:
SYSTEM
SPECIFICATIONS
A.1
A.2
DS30451C-page 37
+5V
DS30451C-page 38
RT2
10K
C15
15PF
10.0MHZ
X1
BAT_T2
BAT_T1
976K
R27
C16
15PF
C11
0.1mF
U12C
LM6134AIM
BAT_I
8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PWM
R4
10K
C13
R6
10K
1.5K
R3
3AG-5
F1
BATT-
BAT_T1
BAT_V1
28
27
26
25
24
23
22
21
20
19
18
17
16
15
+5V
1
2
3
U2
G
D D 4
S
NDT454P
U10
LT1118CS8-5
OUT 1
GND 2
IN 3
3 Q1
2N2222A
1
R2
200
U6
G
D D 4
S
NDT454P
+V_FUSED
1
2
3
U17
0.1mF
PIC16C72P
MCLR
RB7
RA0/AN0
RB6
RA1/AN1
RB5
RA2/AN2
RB4
RA3/AN3/VREF
RB3
RA4/T0CKI
RB2
RA5/AN4/SS
RB1
VSS
RB0/INT
OSC1/CLKIN
VDD
OSC2/CLKOUT
VSS
RC0/T1OSO/T1CKI
RC7
RC1/T1OSI
RC6
RC2/CCP1
RC5/SDO
RC3/SCK/SCL
RC4/SDI/SDA
3 Q2
2N2222A
1
MCLR
C14
1nF
DJ005B
J1
10K
R7
CHY1
CHY2
SPARE
CHG_BAT1
PWM
BAT_V2
MCLR
BAT_I
BAT_T1
BAT_V1
BAT_T2
SW1:A
R31
4.7K
+5V
100UH
L1
10K
SW2:A
R12
C6
0.01mF
+5V
D1
30BF20
C5
10mF
J2
5
4
3
2
1
644894-5
CHG_BAT2
B1_CHG_IND
B2_CHG_IND
ERROR_IND
SW4:A
30BF20
D2
D10
330
R33
330
R35
330
R37
C1
470mF
C2
0.01mF
V_OUT
U7
1 G
2 D
D 4
3
S
NDT454P
GREEN
D5
GREEN
D7
RED
D9
330 ORANGE
R38
3 Q3
2N2222A
1
R11
10K
+5V
BATT-
BAT_T2
BAT_V2
644894-5
J3
5
4
3
2
1
APPENDIX B:
RT1
10K
R28
24.9K
10
9
B.1
RI
0.05
BATT-
PICREF-2
MINIMUM CHARGER SCHEMATIC
This schematic may be obtained electronically on the Microchip BBS and WWW sites (OrCAD, DOS v4.40).
PICREF-2
APPENDIX C:
This schematic may be obtained electronically on the Microchip BBS and WWW site (OrCAD, DOS v4.40).
C.1
H2
R15
BATT-
1
2
3
4
5
6
7
0.05 8
9
10
11
12
13
14
15
16
HANDSHAKE
pp 2
10K
R16
STANDALONE
10K
JMPR6
U12C
BAT_I
8
LM6134AIM
10
+5V
R27
JMPR5
+5V
976K
R28
24.9K
C11
0.1mF
SW1:A
H1
1
2
3
10k 4
5
6
7
8
9
10
11
10k 12
13
14
15
16
JMPR4
R31
4.7K
+5V
MCLR
C14
1nF
C20
BAT_T1
MCLR
BAT_I
BAT_T1
BAT_V1
BAT_T2
HANDSHAKE
BAT_V2
pp 2
pp 2
BAT_T2
pp 2 pp 2
CHY1_73
CHY2_73
SPARE
CHG_BAT1
PWM
SCK
X2
10.0MHZ
C19
15pF
C18
15pF
pp 3
pp 2
pp 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
U19
0.1mF
PIC16C73P
MCLR/VPP
RB7 28
RB6 27
RA0/AN0
RB5 26
RA1/AN1
RB4 25
RA2/AN2
RB3 24
RA3/AN3/VREF
RB2 23
RA4/T0CKI
RB1 22
RA5/SS/AN4
VSS
RB0/INT 21
VDD 20
OSC1/CLKIN
OSC2/CLKOUT
VSS 19
RC0/T1OSO/T1CKI RC7/RX/DT 18
RC1/T1OSI/CCP2
RC6/TX/CK 17
RC2/CCP1
RC5/SDO 16
RC3/SCK/SCL
RC4/SDI/SDA 15
+5V
STANDALONE
DIS_BAT2
ERROR_IND
B2_DIS_IND
B2_CHG_IND
B1_DIS_IND
B1_CHG_IND
DIS_BAT1
RECV
XMIT
CHG_BAT2
SDA
pp 2
pp 3
pp 3
pp 3
pp 3
pp 3
pp 2
pp 2
pp 2
+5V
4
2
XT1
5V OSC 3
GND NC 1
CHY1_73
CTX163
+5V
U14
VIN 1
VOUT 2
GND 3
NJM7805
U10
OUT 1
GND 2
IN 3
U18
DOUT
VCC
VDRV RXIN
NC
DIN
GND TXOUT
DS1275S
1
2
3
4
J4
+5V
LT1118CS8-5
8
7
6
5
1
6
2
7
3
8
4
9
5
DB9F
C5
10mF
C6
0.01mF
+V_FUSED
J1
pp 2
1
2
3
4
F1
3AG-5
DJ005B
PWM
R2
200
R3
1.5K
3
Q1
2N2222A
1
R4
10K
1
2
3
U1
NC D
D
S
S
D
G
D
IRF7406
L1
8
7
6
5
U2
G
D D 4
S
NDT454P
D1
30BF20
100uH
D2
30BF20
JMPR1
C1
470mF
C2
0.01mF
L3
JMPR2
JMPR3
27uH
C3
0.47mF
U3
IRF9540
V_OUT
C4
0.47mF
DS30451C-page 39
PICREF-2
C.2
BAT_V1
pp 1
1
2
3
4
R6
10K
R7
CHG_BAT1
pp 1
U4
NC D
S
D
S
D
G
D
IRF7406
8
7
6
5
R5
20K
U6
1 G
2 D D 4
3 S
NDT454P
BAT_T1
BATT-
pp 1
pp 1
VSENSE_BAT1
pp 2
TB1
1
2
1
2
3
4
DIS_BAT1
pp 1
J2
5
4
3
2
1
644894-5
R9
10K
3 Q2
2N2222A
1
10K
pp 1, 2
U5
S
D
S
D
S
D
G
D
IRF7403
TBLOCK
8
7
6
5
R8
10K
BAT_V2
V_OUT
pp 1
R11
10K
R12
CHG_BAT2
pp 1
U8
NC D
S
D
S
D
G
D
IRF7406
1
2
3
4
10K
8
7
6
5
R10 pp 1
20K pp 1
U7
1 G
2 D D 4
3 S
Q3
2N2222A
R14
10K
NDT454P
1
2
3
4
J3
5
4
3
2
1
644894-5
BAT_T2
BATT-
VSENSE_BAT2
DIS_BAT2
pp 1
pp 1, 2
pp 2
U9
D
S
D
S
D
S
G
D
IRF7403
TB2
1
2
TBLOCK
8
7
6
5
R13
10K
VSENSE_BAT1 12
pp 2
13
U11D
14
R20
LM6134AIM
1K
+5V
+5V
+5V
D3
R17
C8
0.01mF
1K
3
JMPR8
JMPR7
U11A
1
LM6134AIM
11
C8
R21
0.01mF
10K
R19
3
2
U12A
1
LM6134AIM
11
1K
R18
+5V
1
2
3
4
5
6
7
8
U13
H1
VCC 16
NC
NC 15
L1
H0 14
W1
L0 13
A2
W0 12
A1
NC 11
A0
SDA 10
GND SCL 9
DS1803Z
+5V
VSENSE_BAT2 10
pp 2
pp 2
VSENSE_BAT1
0.47mF
1K
D4
R24
1K
10K
5
JMPR12
U11B
7
R23
LM6134AIM
1K
U12B
7
JMPR13
LM6134AIM
pp 2
JMPR11
pp 2
SDA
SCK
BAT_V2 JMPR14
VSENSE_BAT2
R22
pp 1
pp 1
C10
+5V
C12
0.01mF
BAT_V1 JMPR10
10K
C7
R25
pp 2
R26
+5V
SDA
SCK
U11C
8
LM6134AIM
JMPR9
10K
0.47mF
1
2
3
4
U15
A0 VCC
WP
A1
A2 SCL
GND SDA
24LC01B
DS30451C-page 40
8
7
6
5
R29
10K
R30
10K
SCK
SDA
12
13
U12D
14
LM6134AIM
PICREF-2
C.3
pp 1
pp 1
SPARE
SW2:A
D5
R33
B1_CHG_IND
330
SW3:A
pp 1
R34
B1_DIS_IND
330
SW4:A
pp 1
R35
B2_CHG_IND
330
SW5:A
pp 1
R36
B2_DIS_IND
GREEN
D6
YELLOW
D7
GREEN
D8
YELLOW
330
pp 1
ERROR_IND
R37
D9
330
RED
R38
D10
330
ORANGE
+5V
+5V
C13
CHY1
X1
10.0MHZ
C15
15pF
+5V
4
2
XT2
5V OSC 3
GND NC 1
CTX163
0.1mF
U17
MCLR
RB7 28
RB6 27
RA0/AN0
RA1/AN1
RB5 26
RA2/AN2
RB4 25
RB3 24
RA3/AN3/VREF
RA4/T0CKI
RB2 23
RA5/AN4/SS
RB1 22
RB0/INT 21
Vss
OSC1/CLKIN
VDD 20
VSS 19
OSC2/CLKOUT
RC7 18
RC0/T1OSO/T1CKI
RC1/T1OSI
RC6 17
RC2/CCP1
RC5/SDO 16
RC3/SCK/SCL
RC4/SDI/SDA 15
PIC16C72P
CHY2
C16
15pF
CHY1
MCLR
BAT_I
BAT_T1
BAT_V1
BAT_T2
HANDSHAKE
BAT_V2
CHY1
CHY2
SPARE
CHG_BAT1
PWM
SCK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
BAT_V1
SPARE
HANDSHAKE
MCLR
SCK
B1_CHG_IND
B1_DIS_IND
CHG_BAT1
1
2
3
4
5
6
7
8
9
0.1mF
U16
RA1/AN1 18
RA2/AN2
RA3/AN3/VREF RA0/AN0 17
RA4/T0CKI OSC1/CLKIN 16
MCLR
OSC2/CLKOUT 15
Vss
VDD 14
RB0/INT
RB7 13
RB1
RB6 12
RB2
RB5 11
RB3
RB4 10
PIC16C711P
STANDALONE
DIS_BAT2
ERROR_IND
B2_DIS_IND
B2_CHG_IND
B1_DIS_IND
B1_CHG_IND
DIS_BAT1
RECV
XMIT
CHG_BAT2
SDA
+5V
BAT_T1
BAT_I
CHY1
CHY2
PWM
SDA
ERROR_IND
DIS_BAT1
DS30451C-page 41
PICREF-2
APPENDIX D: FIRMWARE LISTING
PIC16C7X firmware source code listings may be
obtained electronically on the Microchip BBS and
WWW site. Source code is written is C and may be
compiled using MPLAB-C.
Source code files:
battery.h
control.c
command.c
init.c
library.c
sense.c
main.c
DS30451C-page 42
PICREF-2
APPENDIX E: PICREF-2 TO PC
PROTOCOL
This section describes the communications protocol
used between the PICREF-2 Intelligent Battery
Charger (IBC) and a Host PC. The physical and data
link layers of this interface are provided by an RS-232
serial link. This protocol forms the transport layer; i.e.,
provides the mechanism for transporting control and
data between the PICREF-2 and the Host PC.
The protocol consists of a message format, a set of
commands, and data field definitions for each command. It is a master-slave protocol, meaning that the
Host PC controls the flow of information between the
two units (i.e., the PICREF-2 only sends data in
response to a request from the Host PC). The Host PC
can send commands or configuration data to the
PICREF-2 or it can ask for status to be sent back to the
Host PC by the PICREF-2. All communications over the
RS-232 link are done at a 9600 baud rate, eight bits,
one stop bit, no parity, using binary data (vs.
ASCII-based text data).
E.1
Message Format
E.2
Handshaking
DS30451C-page 43
PICREF-2
E.3
E.3.1
System enable
Configure
Send data
Send configuration
Message Format
PC Host:
04h
Checksum
Battery Chemistry
bit7
bit0
Reserved
bit 2-1: Battery Chemistry (assumes battery 1 and 2 are of the same type)
00 = NiCd enabled
01 = NiMH enabled
10 = Lead Acid enabled
11 = Li-Ion enabled (Provisional)
bit 0:
Reserved
DS30451C-page 44
PICREF-2
Byte 2: Charge Enable Byte
Charge Algorithm
bit7
bit0
DS30451C-page 45
PICREF-2
E.3.2
Message Format
PC Host:
2Ah
Temp_Lo
Temp_Hi
Max_Voltage
Max_Voltage
Checksum
Byte 1: TEMP_LO
Minimum low temperature in degrees C for Fast Charge/discharge mode, represented as an 8-bit signed binary value
with 0.5 degrees C/bit (range: -64C [80h] to +63.5C [7Fh]).
Byte 2: TEMP_HI
Maximum high temperature in degrees C for Fast Charge/discharge mode, represented as an 8-bit signed binary value
with 0.5 degrees C/bit (range: -64C [80h] to +63.5C [7Fh]).
Byte 3: MAX_VOLTAGE
Overall maximum voltage in any charge mode (for Fail-Safe termination) for all battery cells, represented as an 8-bit
unsigned binary value with each bit representing 58.5mV (range: 0 to 14.91V).
Byte 4: MIN_VOLTAGE
Overall minimum voltage in any discharge mode (for Fail Safe termination) for all battery cells, represented as an 8-bit
unsigned binary value with each bit representing 58.5mV (range: 0 to 14.91V).
Byte 5: TRICKLE_TEMP_LO
Minimum low temperature in degrees C for maintenance charge mode, represented as an 8-bit signed binary value with
0.5 degrees C/bit (range: -64C [80h] to +63.5C [7Fh]).
Byte 6: TRICKLE_TEMP_HI
Maximum high temperature in degrees C for maintenance charge mode, represented as an 8-bit signed binary value
with 0.5 degrees C/bit (range: -64C [80h] to +63.5C [7Fh]).
Byte 7: ABS_VOLT_HIGH
Lead acid maximum voltage in charge mode, represented as an 8-bit unsigned binary value with each bit representing
58.5mV (range: 0 to 14.91V).
Byte 8: MAX_TIME_LIMIT_LB
Low byte of maximum allowable time, in seconds, during any charge mode for Fail-Safe charge termination, represented
as a 16-bit unsigned binary value (range: 0 to 65,536 seconds, or about 18.2 hours).
Byte 9: MAX_TIME_LIMIT_HB
High byte of maximum allowable time, in seconds, during any charge mode for Fail-Safe charge termination, represented
as a 16-bit unsigned binary value (range: 0 to 65,536 seconds, or about 18.2 hours).
Byte 10: FAST_CHARGE_RATE
The current, in mA, at which the battery can be charged in Fast Charge mode. Expressed as an 8-bit unsigned binary
value with each bit representing 10 mA (range: 0 to 2.55A).
Byte 11: TRICKLE_CHARGE_RATE
The current, in mA, at which the battery can be charged in Trickle Charge mode. Expressed as an 8-bit unsigned binary
value with each bit representing 10 mA (range: 0 to 2.55A).
Byte 12: SPARE
Reserved.
DS30451C-page 46
PICREF-2
Byte 13: DISCHARGE_VOLTAGE
The voltage, in V, at which the discharge of the battery will stop, represented as an 8-bit unsigned binary value with each
bit representing 58.5mV (range: 0 to 14.91V).
Byte 14: DELTAV_THRESH_SIGNED
The -DV charge termination threshold, in Volts, used for the battery to be charged. Expressed as an 8-bit signed binary
value, with each bit representing 5.85mV (range: -750 to +744 mV).
Byte 15: DELTAT_DELTAt_THRESH
The DT/Dt charge termination threshold, in degrees C per minute. Expressed as an 8-bit signed binary value, with each
bit representing 0.5 degrees C/min (range: 0 to 127.5 C/min).
DS30451C-page 47
PICREF-2
E.3.3
Message Format
PC Host:
15h
EAh
PICREF-2 Response:
B1_Volts
B1_Temp
B1_Current
B2_Volts
Checksum
Byte 1: B1_Volts
Battery 1 Voltage, represented as an 8-bit unsigned binary value with each bit representing 58.5 mV (
range: 0V to 14.91V).
Byte 2: B1_Temp
Battery 1 Temperature in degrees C, an 8-bit signed binary value with 0.5 degrees C/bit
(range: -64C [80h] to +63.5C [7Fh]).
Byte 3: B1_Current
Measured Battery 1 Charge Current, in mA, an 8-bit unsigned binary value with each bit representing 10 mA
(range: 0V to 2.55A).
Byte 4: B2_Volts
Battery 2 Voltage, represented as an 8-bit unsigned binary value with each bit representing 58.5 mV
(range: 0V to 14.91V).
Byte 5: B2_Temp
Battery 2 Temperature in degrees C, an 8-bit signed binary value with 0.5 degrees C
(range: -64C [80h] to +63.5C [7Fh]).
Byte 6: B2_Current
Measured Battery 2 Charge Current, in mA, an 8-bit unsigned binary value with each bit representing 10 mA
(range: 0A to 2.55A).
DS30451C-page 48
PICREF-2
Byte 7: System Status
Battery Chemistry
bit0
Reserved
bit 2-1: Battery Chemistry (assumes battery 1 and 2 are of the same type)
00 = NiCd enabled
01 = NiMH enabled
10 = Lead Acid enabled
11 = Li-Ion enabled (Provisional)
bit 0:
Reserved
Charge Algorithm
bit7
DS30451C-page 49
PICREF-2
Byte 9: Battery 1 Error Status
OVE
UVE
OTE
bit7
bit 7:
UTE
TOE
CKE
SE
NB
bit0
Overvoltage Error
1 = Error
0 = No error
bit 6:
Undervoltage Error
1 = Error
0 = No error
bit 5:
Overtemperature Error
1 = Error
0 = No error
bit 4:
Undertemperature Error
1 = Error
0 = No error
bit 3:
Time-out Error
1 = Error
0 = No error
bit 2:
Checksum Error
1 = Error
0 = No error
bit 1:
Selftest Error
1 = Error
0 = No error
bit 0:
No Battery Detected
1 = No battery detected
0 = Battery detected
DS30451C-page 50
PICREF-2
Byte 10: Battery 2 Error Status
OVE
UVE
OTE
bit7
bit 7:
UTE
TOE
CKE
SE
NB
bit0
Overvoltage Error
1 = Error
0 = No error
bit 6:
Undervoltage Error
1 = Error
0 = No error
bit 5:
Overtemperature Error
1 = Error
0 = No error
bit 4:
Undertemperature Error
1 = Error
0 = No error
bit 3:
Time-out Error
1 = Error
0 = No error
bit 2:
Checksum Error
1 = Error
0 = No error
bit 1:
Selftest Error
1 = Error
0 = No error
bit 0:
No Battery Detected
1 = No battery detected
0 = Battery detected
DS30451C-page 51
PICREF-2
E.3.4
This command requests the PICREF-2 to send the configuration data set to the Host PC. These are the same
configuration fields sent via the Configure Command.
Data field definitions are defined to be the same as for
the Configure Command.
Message Format
PC Host:
3Ch
C3h
PICREF-2 Response:
Temp_Lo
E.3.5
Temp_Hi
Max_Voltage
Max_Voltage
Checksum
This command causes a software reset of the processor controlling the charging and discharging of the battery, known as the Battery Controller. This command
will stop any ongoing activity in terms of charge/discharge.
Message Format
PC Host:
55h
E.4
AAh
DS30451C-page 52
PICREF-2
EXAMPLE E-1:
CODE STRUCTURE
float
float
float
float
float
float
NormalizeCurrent(float fCurrent);
NormalizeVoltage(float fVoltage);
NormalizeTemp(float fTemp);
UnNormalizeCurrent(float fCurrent);
UnNormalizeVoltage(float fVoltage);
UnNormalizeTemp(float fTemp);
};
// This stucture contains the configuration settings chosen for the charge session.
struct TConfigSettings
{
int iChargeAlgorithm;
int iChargeDischargeSequence;
int iTerminationAlgorithm;
int iChemistry;
float
float
int
int
int
int
uint16
float
float
float
float
int
float
int
float
float
fChargeVoltageMax;
fChargeVoltageMin;
iFastChargeTempMax;
iFastChargeTempMin;
iTrickleTempMax;
iTrickleTempMin;
ui16MaxChargeTime;
fMaxVoltage;
fDischargeRate;
fDischargeVoltage;
fDTDtThreshold;
iDvThreshold;
fFastChargeAmps;
iSpare;
fTrickleChargeAmps;
fReserved;
};
DS30451C-page 53
PICREF-2
NOTES:
DS30451C-page 54
PICREF-2
APPENDIX F: PCB LAYOUT & FAB
DRAWING
The top silk screen drawing for the battery charger is
shown below. The board dimensions listed are, with
respect to the orientation of this page, horizontal
dimension x vertical dimension.
FIGURE F-1:
(7 x 4.25)
DS30451C-page 55
PICREF-2
APPENDIX G: BILL OF MATERIALS (BOM)
TABLE G-1:
Line # Qty
1
2
1
1
Part Description
03-01422
N/A
N/A
N/A
N/A
N/A
N/A
DM003002
N/A
04-01422
Manufacturer
Vendor
Vendor Part #
Reference
Designator
Part #
CARD
3
DJ005B
CONN, POWER
LZR
(301) 921-4600
JIT
RL30B
J1
644894-5
AMP
(717) 564-0100
(800) 522-6752*
NEWARK
644894-5
J2,J3
SPC TECH
(773) 907-5193
NEWARK
89N1583
J4
TERY
5
DE9S-FRS
B3S-1002
OMRON
(847) 843-7900
(800) 55OMRON*
DIGIKEY
SW416-ND
SW1,SW2,SW3,
SW4,SW5
99426
TBLOCK
JAMECO
(415) 592-8097
(800) 831-4242*
NEWARK
99426
TB1,TB2
37330
JAMECO
(415) 592-8097
(800) 831-4242*
NEWARK
37330
H1,H2
PZC36SAFN
HEADER, 0.025
SULLINS
(619) 744-0125
DIGIKEY
S1061-36-ND
JMPR HEADERS
10
14
SULLINS
JUMPER
SULLINS
(619) 744-0125
DIGIKEY
S9002-ND
JMPR1-14
11
ECA-1HFQ471
PANASONIC
(714) 373-7366
DIGIKEY
P5772-ND
C1
PANASONIC
(714) 373-7366
DIGIKEY
PCC103BCT-ND
C2,C6,C8,C9,C12
SPRAGUE
(516) 334-8700
NEWARK
95F9802
C5
RADIAL
12
13
14
87222
JAMECO
(415) 592-8097
(800) 831-4242*
NEWARK
87222
C7,C10
15
ECU-V1H102JCH
PANASONIC
(714) 373-7366
DIGIKEY
PCC102CCT-ND
C14
16
ECU-V1H150JCM
PANASONIC
(714) 373-7366
DIGIKEY
PCC150CCT-ND
C15,C16,C18,C19
17
ECU-V1H104KBW
PANASONIC
(714) 373-7366
DIGIKEY
PCC104BCT-ND
C11,C13,C17,C20
18
WK0003-ND
FUSE, 3AG-5
WICKMAN
(404) 699-7820
(800) 553-7894*
DIGIKEY
WK0003-ND
F1
19
RC-10
MAGNETEK
(219) 297-3111
DIGIKEY
10606-ND
L1
INTL RECT
(310) 322-3331
FAI
30BF20
D1,D2
ECU-V1H103KBM
100 UH
20
30BF20
21
LT1120CT-ND
LITE-ON
(408) 946-4873
DIGIKEY
LT1120CT-ND
D5,D7
22
LT1122CT-ND
LITE-ON
(408) 946-4873
DIGIKEY
LT1122CT-ND
D6,D8
23
LT1123CT-ND
LITE-ON
(408) 946-4873
DIGIKEY
LT1123CT-ND
D9
24
LT1119CT-ND
LITE-ON
(408) 946-4873
DIGIKEY
LT1119CT-ND
D10
DS30451C-page 56
PICREF-2
TABLE G-1:
Line # Qty
Part Description
Manufacturer
Vendor
Vendor Part #
Reference
Designator
25
ERJ-1WYI201
PANASONIC
(714) 373-7366
DIGIKEY
P200XCT-ND
R2
26
ERJ-8ENF1.00K
PANASONIC
(714) 373-7366
DIGIKEY
P1.00KFCT-ND
R19,R20,R23
27
ERJ-8ENF1.50K
PANASONIC
(714) 373-7366
DIGIKEY
P1.50KFCT-ND
R3
28
17
ERJ-8ENF10.0K
PANASONIC
(714) 373-7366
DIGIKEY
P10.0KFCT-ND
R4,R6,R7,R8,R9,R11,
R12,R13,R14,R15,
R16,R1,R21,R22,
R26,R29,R30
29
ERJ-8ENF20.0K
PANASONIC
(714) 373-7366
DIGIKEY
P20.0KFCT-ND
R5,R10
30
ERJ-8ENF976K
PANASONIC
(714) 373-7366
DIGIKEY
P976KFCT-ND
R27
31
ERJ-8ENF24.9K
PANASONIC
(714) 373-7366
DIGIKEY
P24.9KFCT-ND
R28
32
ERJ-8ENF4.75K
PANASONIC
(714) 373-7366
DIGIKEY
P4.75KFCT-ND
R31
33
ERJ-8ENF332
PANASONIC
(714) 373-7366
DIGIKEY
P332FCT-ND
R33,R34,R35,R36,
R37,R38
34
SFB270
INDUCTOR, 27UH
WILCO
(317) 293-9300
(800) 611-2343*
WILCO
SFB270
L3 (PROVISIONAL)
35
IRF7406
SO-8
INTL RECT
(310) 322-3331
NEWARK
IRF7406
U1,U4,U8
(PROVISIONAL)
36
NDT456P
NAT SEMI
(408) 712-5800
(800) 272-9959*
DIGIKEY
NDT456PCT-ND
U2,U6,U7
37
IRF9540
INTL RECT
(301) 322-3331
FAI
IRF9540
U3 (PROVISIONAL)
38
IRF7403
SO-8
INTL RECT
(301) 322-3331
NEWARK
IRF7403
U5,U9
39
LT1118CST-5
LINEAR TECH
(408) 432-1900
DIGIKEY
LT1118CST-5-ND
U10
223
40
LM6134AIM
NAT SEMI
(408) 712-5800
(800) 272-9959*
DIGIKEY
LM6134AIM-ND
U11,U12
41
DS1803Z-100K
DALLAS
(214) 450-0400
NEWARK
DS1803Z-100K/10K
U13
SO-16
42
NJM7805
IC, 5V RES
NJR CORP.
(415) 961-3901
DIGIKEY
NJM78MOSFA-MD
U14
43
24LC65
MICROCHIP
(602) 786-7200
MICROCHIP
24LC65/SO
U15
44
PIC16C711
IC, MICROCONTROLLER,
MICROCHIP
(602) 786-7200
MICROCHIP
PIC16C711-20
U16 (PROVISIONAL)
18 PIN
45
110-99-318-41-001
SOCKET, 18 PIN
MILL-MAX
(516) 922-6000
(888) 922-6544
DIGIKEY
ED3118-ND
U16a
46
PIC16C72
IC, MICROCONTROLLER,
MICROCHIP
(602) 786-7200
MICROCHIP
PIC16C72-20
U17
MILL-MAX
(516) 922-6000
(888) 922-6544
DIGIKEY
ED3128-ND
U17a, U19a
28 PIN
47
110-99-328-41-001
SOCKET, 28 PIN
DS30451C-page 57
PICREF-2
TABLE G-1:
Part Description
Manufacturer
Vendor
Vendor Part #
Reference
Designator
PIC16C73
IC, MICROCONTROLLER,
MICROCHIP
(602) 786-7200
MICROCHIP
PIC16C73-20
U19
Line # Qty
48
28 PIN
49
DS275S
DALLAS
(214) 450-0400
NEWARK
DS275S
U18
50
ECS-100-S-4
ECS
(913) 782-7787
(800) 237-1041*
DIGIKEY
X422-ND
X1,X2
NAT SEMI
(408) 712-5800
(800) 272-9959*
DIGIKEY
2N2222A-ND
Q1,Q2,Q3
TAL
51
2N2222A
DS30451C-page 58
PICREF-2
APPENDIX H: BATTERY CHARGER
DEMONSTRATION
UNIT
A limited number of battery charger demonstration
units are available for customer evaluation. To obtain a
demonstration unit, contact any Microchip sales office.
For a more detailed description of the demonstration
circuits, see Hardware Overview.
Microcontrollers
Note:
Buck Converter
The PWM output from the microcontroller drives an
NPN transistor (Q1) which biases the P-channel FET
(U2). So when the PWM output is high, Q1 conducts,
providing the gate-source voltage to turn on the
P-channel FET. This allows current to flow through to
inductor L1. Diode D2 is used to isolate the buck converter output from the battery voltage. Capacitor C1 is
used in conjunction with L1 as a filter for the output of
the buck converter and capacitor C2 is used to filter
high frequency.
Note:
Filter
The filter circuit is intended to provide additional ripple
suppression at the buck converter output stage.
Note:
L3, C3, and C4 provide additional ripple filtering on the output of the buck converter.
They may be populated at the designers
option.
Current Sense
The current sense circuitry works by amplifying and
converting the current through a 0.05 ohm resistor into
a voltage.
Note:
Temperature Sense
The temperature sense is accomplished through a simple 10K pull-up resistor.
Note:
Battery Pack
The KR-1100AEL is a Fast Charge Battery Cell that
can be charged at up to a 1600 mA rate in less than
1 hour. It can be discharged at up to an 8C rate in < 6
minutes (1C discharge takes 60 minutes).
Note:
Note:
DS30451C-page 59
PICREF-2
H.1
Demonstration Specifications
H.2
1.3A (Provisional)
L1
2.0A
D1,D2
3.0A
FIGURE H-1:
Input
Power
Filter
JMPR7-14
JMPR4(GND)
Current/Volt
Sense
Batt 1 Charge/
Discharge
PIC16C711
Current Sense
Resistor
RS-232
PIC16C73A
Stand-alone
PIC16C72
Temp Sense
Resistors
Batt 2 Charge/
Discharge
Reset
JMPR5-6
LEDs
Pushbuttons
DS30451C-page 60
PICREF-2
FIGURE H-2:
2 Disks
Battery Pack
Power Supply
Demonstration Board
H.3
FIGURE H-3:
Power Supply
Demonstration Board
To PC
Battery Pack
RS-232
PIC16C73A
DS30451C-page 61
PICREF-2
H.4
FIGURE H-4:
Demonstration Board
PIC16C72
DS30451C-page 62
Battery Pack
PICREF-2
NOTES:
DS30451C-page 63
PICREF-2
DS30451C-page 64
M
WORLDWIDE SALES AND SERVICE
AMERICAS
AMERICAS (continued)
ASIA/PACIFIC (continued)
Corporate Office
Toronto
Singapore
Atlanta
Hong Kong
Boston
Microchip Technology Inc.
5 Mount Royal Avenue
Marlborough, MA 01752
Tel: 508-480-9990 Fax: 508-480-8575
Chicago
Microchip Technology Inc.
333 Pierce Road, Suite 180
Itasca, IL 60143
Tel: 630-285-0071 Fax: 630-285-0075
ASIA/PACIFIC
Taiwan, R.O.C
Microchip Technology Taiwan
10F-1C 207
Tung Hua North Road
Taipei, Taiwan, ROC
Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
EUROPE
India
United Kingdom
Japan
France
Dayton
Korea
Germany
Shanghai
Dallas
Detroit
Microchip Technology Inc.
42705 Grand River, Suite 201
Novi, MI 48375-1727
Tel: 248-374-1888 Fax: 248-374-2874
Los Angeles
Microchip Technology
RM 406 Shanghai Golden Bridge Bldg.
2077 Yanan Road West, Hong Qiao District
Shanghai, PRC 200335
Tel: 86-21-6275-5700 Fax: 86 21-6275-5060
New York
Microchip Technology Inc.
150 Motor Parkway, Suite 202
Hauppauge, NY 11788
Tel: 516-273-5305 Fax: 516-273-5335
San Jose
Microchip Technology Inc.
2107 North First Street, Suite 590
San Jose, CA 95131
Tel: 408-436-7950 Fax: 408-436-7955
Italy
7/7/98
Information contained in this publication regarding device applications and the like is intended for suggestion only and may be superseded by updates. No representation or warranty is given and no
liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use
or otherwise. Use of Microchips products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or
otherwise, under any intellectual property rights. The Microchip logo and name are registered trademarks of Microchip Technology Inc. in the U.S.A. and other countries. All rights reserved. All other
trademarks mentioned herein are the property of their respective companies.
DS30451C-page 65