MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User's Guide

MCP1632
Single-Cell Li-Ion
Battery Charger Demo Board
User’s Guide
 2014 Microchip Technology Inc.
DS50002321A
Note the following details of the code protection feature on Microchip devices:
•
Microchip products meet the specification contained in their particular Microchip Data Sheet.
•
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•
Microchip is willing to work with the customer who is concerned about the integrity of their code.
•
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer,
LANCheck, MediaLB, MOST, MOST logo, MPLAB,
OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC,
SST, SST Logo, SuperFlash and UNI/O are registered
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
The Embedded Control Solutions Company and mTouch are
registered trademarks of Microchip Technology Incorporated
in the U.S.A.
Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo,
CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit
Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet,
KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo,
MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code
Generation, PICDEM, PICDEM.net, PICkit, PICtail,
RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total
Endurance, TSHARC, USBCheck, VariSense, ViewSpan,
WiperLock, Wireless DNA, and ZENA are trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
Silicon Storage Technology is a registered trademark of
Microchip Technology Inc. in other countries.
GestIC is a registered trademarks of Microchip Technology
Germany II GmbH & Co. KG, a subsidiary of Microchip
Technology Inc., in other countries.
All other trademarks mentioned herein are property of their
respective companies.
© 2014, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
ISBN: 978-1-63276-756-1
QUALITY MANAGEMENT SYSTEM
CERTIFIED BY DNV
== ISO/TS 16949 ==
DS50002321A-page 2
Microchip received ISO/TS-16949:2009 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
 2014 Microchip Technology Inc.
Object of Declaration: MCP1632 Single-Cell Li-Ion Battery Charger Demo Board
 2014 Microchip Technology Inc.
DS50002321A-page 3
MCP1632 SINGLE-CELL
LI-ION BATTERY CHARGER
DEMO BOARD USER’S GUIDE
Table of Contents
Preface ........................................................................................................................... 5
Introduction............................................................................................................ 5
Document Layout .................................................................................................. 5
Conventions Used in this Guide ............................................................................ 6
Recommended Reading........................................................................................ 7
The Microchip Web Site ........................................................................................ 7
Customer Support ................................................................................................. 7
Revision History .................................................................................................... 7
Chapter 1. Product Overview
1.1 Introduction ..................................................................................................... 9
1.2 Board Features ............................................................................................... 9
1.3 Device Summary ............................................................................................ 9
1.4 Technical Specifications ............................................................................... 10
1.5 Functional Description .................................................................................. 10
1.6 What Does the MCP1632 Single-Cell Li-Ion Battery Charger Demo Board Include? ..................................................................................................... 11
Chapter 2. Installation and Operation
2.1 Getting Started ............................................................................................. 13
2.1.1 Additional Components Required for Operation ........................................ 13
2.2 Setup Procedure ......................................................................................... 13
2.2.1 Demo Board Output Current Configuration ............................................... 13
2.2.2 Connecting the Single-Cell Battery ........................................................... 14
2.2.3 Powering the Board ................................................................................... 14
2.2.4 Using the Reference Board ....................................................................... 14
2.3 Evaluating the Application ............................................................................ 15
2.4 Firmware description .................................................................................... 15
2.4.1 Main Loop Description ............................................................................... 16
2.4.2 State Machine Description ........................................................................ 17
Appendix A. Schematic and Layouts
A.1 Introduction .................................................................................................. 21
A.2 Board – Schematic ....................................................................................... 22
A.3 Board – Top Silk .......................................................................................... 23
A.4 Board – Top Copper and Silk ....................................................................... 24
A.5 Board – Top Copper .................................................................................... 25
A.6 Board – Bottom Copper ............................................................................... 26
A.7 Board – Bottom Copper and Silk ................................................................. 27
Appendix B. Bill of Materials (BOM)
Worldwide Sales and Service .................................................................................... 32
DS50002321A-page 4
 2014 Microchip Technology Inc.
MCP1632 SINGLE-CELL
LI-ION BATTERY CHARGER
DEMO BOARD USER’S GUIDE
Preface
NOTICE TO CUSTOMERS
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXXXXA”, where “XXXXXXXX” is the document number and “A” is the revision level
of the document.
For the most up-to-date information on development tools, see the MPLAB® IDE online help.
Select the Help menu, and then Topics to open a list of available online help files.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board. Items discussed in this
chapter include:
•
•
•
•
•
•
•
•
Document Layout
Conventions Used in this Guide
Recommended Reading
Recommended Reading
The Microchip Web Site
Customer Support
Customer Support
Revision History
DOCUMENT LAYOUT
This document describes how to use the MCP1632 Single-Cell Li-Ion Battery Charger
Demo Board as a development tool to emulate and debug firmware on a target board,
as well as how to program devices. The document is organized as follows:
• Chapter 1. “Product Overview” – Important information about the MCP1632
Single-Cell Li-Ion Battery Charger Demo Board.
• Chapter 2. “Installation and Operation” – Includes instructions on how to get
• • started with this user’s guide and a description of the user’s guide.
• Appendix A. “Schematic and Layouts” – Shows the schematic and layout
diagrams for the MCP1632 Single-Cell Li-Ion Battery Charger Demo Board.
• Appendix B. “Bill of Materials (BOM)” – Lists the parts used to build the
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board.
 2014 Microchip Technology Inc.
DS50002321A-page 5
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description
Arial font:
Italic characters
Initial caps
Quotes
Underlined, italic text with
right angle bracket
Bold characters
N‘Rnnnn
Text in angle brackets < >
Courier New font:
Plain Courier New
Represents
Referenced books
Emphasized text
A window
A dialog
A menu selection
A field name in a window or
dialog
A menu path
MPLAB® IDE User’s Guide
...is the only compiler...
the Output window
the Settings dialog
select Enable Programmer
“Save project before build”
A dialog button
A tab
A number in verilog format,
where N is the total number of
digits, R is the radix and n is a
digit.
A key on the keyboard
Click OK
Click the Power tab
4‘b0010, 2‘hF1
Italic Courier New
Sample source code
Filenames
File paths
Keywords
Command-line options
Bit values
Constants
A variable argument
Square brackets [ ]
Optional arguments
Curly brackets and pipe
character: { | }
Ellipses...
Choice of mutually exclusive
arguments; an OR selection
Replaces repeated text
Represents code supplied by
user
DS50002321A-page 6
Examples
File>Save
Press <Enter>, <F1>
#define START
autoexec.bat
c:\mcc18\h
_asm, _endasm, static
-Opa+, -Opa0, 1
0xFF, ‘A’
file.o, where file can be
any valid filename
mcc18 [options] file
[options]
errorlevel {0|1}
var_name [,
var_name...]
void main (void)
{ ...
}
 2014 Microchip Technology Inc.
Preface
RECOMMENDED READING
This user's guide describes how to use the MCP1632 Single-Cell Li-Ion Battery Charger Demo Board. Other useful documents are listed below. The following Microchip
documents are available and recommended as supplemental reference resources.
• MCP1632 Data Sheet – “High-Speed, Low-Side PWM Controller”
(DS20005254)
THE MICROCHIP WEB SITE
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite Internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
•
•
•
•
Distributor or Representative
Local Sales Office
Field Application Engineer (FAE)
Technical Support
Customers should contact their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document.
Technical support is available through the web site at:
http://www.microchip.com/support.
REVISION HISTORY
Revision A (November 2014)
• Initial release of this document.
 2014 Microchip Technology Inc.
DS50002321A-page 7
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
NOTES:
DS50002321A-page 8
 2014 Microchip Technology Inc.
MCP1632 SINGLE CELL
LI-ION BATTERY CHARGER
DEMO BOARD USER’S GUIDE
Chapter 1. Product Overview
1.1
INTRODUCTION
The MCP1632 Single-Cell Li-Ion Battery Charger Demo Board is a step-up/step-down,
switch-mode, DC/DC converter used for battery charging applications. The demo
board provides a 4.2V constant voltage source. Other output voltages can be obtained
with minor modifications to the board’s Bill of Materials (BOM).
The MCP1632 Single-Cell Li-Ion Battery Charger Demo Board is an intelligent battery
charging system for a single-cell Lithium-Ion battery. MCP1632 Single-Cell Li-Ion Battery Charger Demo Board utilizes Microchip's MCP1632 high-speed Pulse-Width Modulator (PWM). The 8-pin MCP1632 device contains all the analog components
necessary for a peak current mode control loop including an error amplifier, PWM
comparator and a high-current driver output pin.
An 8-pin PIC12F1822 microcontroller is used to implement the charging algorithm. In
addition, the PIC12F1822 firmware supervises the battery voltage and current.
1.2
BOARD FEATURES
The MCP1632 Single-Cell Li-Ion Battery Charger Demo Board has the following
features:
•
•
•
•
•
•
•
1.3
Compact size, highly efficient battery charger
Can operate in Buck (step-down) or Boost (step-up) mode
Maximum output current: 1500 mA; can be adjusted via firmware
Chemistry-optimized charging algorithm
Maximum output power: 7W
Factory-programmed source code provided
Additional application functions can be implemented in the firmware
DEVICE SUMMARY
The MCP1632 Single-Cell Li-Ion Battery Charger Demo Board uses the following
primary devices on the board:
• MCP1632 high-speed current mode PWM controller. – When used in conjunction
with a microcontroller, the MCP1632 will control the power system duty cycle to
provide output current and/or voltage regulation.
• PIC12F1822 microcontroller (8-bit MCU) – Used to implement the charging algorithm and to provide additional software functions like protections.
• MCP1703 low dropout regulator (LDO) – Used to supply regulated voltage (+5V)
to the PIC12F1822 microcontroller and the MCP1632 PWM controller
• MCP6021 operational amplifier – Used for the current sensing circuit.
 2014 Microchip Technology Inc.
DS50002321A-page 9
MCP1632 Single Cell Li-Ion Battery Charger Demo Board User’s Guide
1.4
TECHNICAL SPECIFICATIONS
•
•
•
•
•
•
•
Input voltage: +4.5V to +12V
Load disconnect protection software configurable
Typical output current: 1000 mA
Maximum output current: 1500 mA (with firmware adjustments)
Typical output power: 4.2W (maximum 7W at +25°C degree ambient temperature)
Fully protected against Short-Circuit and No Load condition
Figure 1-1 shows a simplified block diagram of the application
+
VIN
-
CIN
L1A
LDO
C1
CC
VCC
VSENSE
D1
VIN
AN1
R1
EN
I/O
VREF
PIC12F1822
R3
D2
CSS
MCP1632
C8
PWM
R2
COUT
Battery
VSENSE
RSLOPE
R5
CS
RVREF
COMP
I/O
L1B
Q1
VEXT
RSENSE
R6
RS
C10 R9
Status
FB
AN2
GND
R12
R13
CSENSE
+
MCP6021
FIGURE 1-1:
1.5
MCP1632 Block Diagram.
FUNCTIONAL DESCRIPTION
MCP1632 provides all the analog functions necessary to implement a stand-alone
switch-mode power converter. When combined with an external microcontroller, the
MCP1632 can be used to implement different intelligent converters like those
necessary for battery chargers.
The power train of this application uses the Single-Ended Primary Inductor Converter
(SEPIC) topology. This topology offers buck-boost functionality and also has
non-pulsating input current.
The converter provides constant voltage with limited current at the output, necessary
for certain battery charging applications (ex. Li-Ion-based batteries).
The output voltage is measured with a voltage divider resistor pair (R1, R5). This
voltage must be precisely 4.2V, required by the battery chemistry.
The average current in the L1B inductor, which is also the output current of the
converter, is sensed using a 0.1Ω shunt resistor (RS). As the voltage across the shunt
resistor is negative, a -10x amplifier (U3) is used for battery charging current sensing.
The conversion gain of this circuit is 1V/A.
The PWM output available from the PIC12F1822 microcontroller is used to control the
reference voltage of the MCP1632 using the circuit created with D2 and R3 components.
Maximum output current is set by the PIC12F1822 microcontroller.
DS50002321A-page 10
 2014 Microchip Technology Inc.
1.6
WHAT DOES THE MCP1632 SINGLE-CELL LI-ION BATTERY CHARGER
DEMO BOARD INCLUDE?
The MCP1632 Single-Cell Li-Ion Battery Charger Demo Board includes:
• MCP1632 Single-Cell Li-Ion Battery Charger Demo Board (ARD00558)
• Information Sheet
 2014 Microchip Technology Inc.
DS50002321A-page 11
MCP1632 Single Cell Li-Ion Battery Charger Demo Board User’s Guide
NOTES:
DS50002321A-page 12
 2014 Microchip Technology Inc.
MCP1632 SINGLE-CELL
LI-ION BATTERY CHARGER
DEMO BOARD USER’S GUIDE
Chapter 2. Installation and Operation
2.1
GETTING STARTED
The MCP1632 Single-Cell Li-Ion Battery Charger Demo Board is fully assembled and
tested. The board requires the use of an external input voltage source (+4.5V to +12V).
2.1.1
Additional Components Required for Operation
• A DC Power Supply. A bench supply that can produce between 4.5V and 12V, 2A
is recommended to operate the board at the full rated power. A USB connector
can also be used. In this case, make sure that the input current does not exceed
the USB connector requirements. Note that there is no USB device enumeration
mechanism on this board.
• An oscilloscope and/or multi-meter to observe waveforms and measure electrical
parameters (optional).
2.2
SETUP PROCEDURE
To operate the demonstration board, you need to complete the following steps:
1. Connect a power supply to the input connector J1 (observe the polarity).
2. Attach a single-cell battery to the output connector J2 (observe the polarity).
3. Press the Start/Stop Button to start the battery charging and again to stop it.
Detailed instructions are provided below for each step.
WARNING
Please observe the polarity for all steps to avoid board damage.
2.2.1
Demo Board Output Current Configuration
The board is configured to deliver 1000 mA to a single-cell battery. Maximum output
voltage is set to approximately 4.2V.
 2014 Microchip Technology Inc.
DS50002321A-page 13
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
2.2.2
Connecting the Single-Cell Battery
A single-cell battery can be used to evaluate the board. In this case, the power delivered to the load will be about 4.2W.
The board can charge a single-cell battery with 1000 mA as the output current. Maximum
output voltage is set to 4.2V (Li-Ion specific) for the default software/hardware configuration. The output voltage can be modified with minor software/hardware modifications.
FIGURE 2-1:
Power Supply and Load Connection Diagram.
2.2.3
Powering the Board
Connect a power supply to J1 to power-up the MCP1632 Single-Cell Li-Ion Battery
Charger Demo Board. Ensure that the power supply has the (+) terminal connected to
J2 terminal block at pin 1 (up) and (–) terminal connected to pin 2 (down). The input
voltage source should be limited to the 4.5V to 12V range. Ensure that the chosen
power supply can provide enough current at the selected voltage to properly charge the
single-cell battery.
For 12V input voltage the current drain will be around 650 mA at full load (7W).
WARNING
This board does not have a Thermal Shut-Down function implemented. Please ensure
that the board load is properly cooled.
2.2.4
Using the Reference Board
The button is used to start or stop the battery charging.
Board is protected for the No-Load Condition. Typical value is +4.2 VDC for the
output voltage.
Note:
DS50002321A-page 14
It is not recommended to operate the board without a proper load connected to output. Maximum power at the output must be limited to 7W at
ambient temperature
 2014 Microchip Technology Inc.
2.3
EVALUATING THE APPLICATION
The best way to evaluate the MCP1632 Single-Cell Li-Ion Battery Charger Demo Board
is to examine the circuit and measure voltages and currents with a Digital Voltage Meter
(DVM) and probe the board with an oscilloscope.
Additional tools are necessary to evaluate some technical parameters of the board
(temperature of power components, ability to withstand surge voltage pulse on input,
EMI).
The firmware program in the PIC12F1822 can also be edited to modify the operation
of the application.
2.4
FIRMWARE DESCRIPTION
The PIC12F1822 comes pre-programmed with firmware to operate the system as
described above. The firmware structure is shown in Figure 2-2.
The main loop controls all the voltage and current regulating functions. The battery
charging state machine is only called every second and makes decisions based only
on the output voltage and current values. It sets the voltage and current limit, depending on the charging state.
Main Program
Loop
Hardware.h
Batterycharger.h
Hardware.c
LiCo.h
FIGURE 2-2:
Batterycharger.c
Library File Structure.
 2014 Microchip Technology Inc.
DS50002321A-page 15
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
2.4.1
Main Loop Description
The charger state machine is hardware independent, so all the output regulation is
done in the main loop.
Besides calling the state machine every second, different parameters and macros are
required for the state machine code. All values are 12 bits (4 x 10-bit ADC readings).
VSENSE and ISENSE contain updated values of the output voltage and current. They can
be defined as macros or return functions:
• #define VSENSE VOUT
• #define ISENSE IOUT
Set_Voltage(x) and Set_Current(x) set the converter maximum output voltage and current. They can be defined as macros or functions:
• #define Set_Voltage(x) { vref = x; }
• #define Set_Current(x) { iref = x; }
Set_Led_Blink(x) sets the LED state and blink rate to show the current battery charging
state.
Constant_Voltage should show whether the converter is regulating the output voltage
or not. This is important for the state machine, because the minimum current and flat
current charge termination should only be initiated in Constant Voltage mode.
• #define Constant_Voltage (!cmode)
I_Bat_Detect is a minimum current reading that shows a missing battery/load. The
value depends on the current shunt amplifier offset and amplification. It is useful for
detecting that the battery has been removed during charge, since there is no OCV
(Open Circuit Voltage) measurement.
• #define I_Bat_Detect 16
DS50002321A-page 16
 2014 Microchip Technology Inc.
2.4.2
State Machine Description
There are five states, as shown in Figure 2-3 and explained in Table 2-1.
Start
Idle
Button Press
NO
Button Press
Start/Stop ^ 1
YES
Initialize
State
Machine
YES
NO
VSense < VCutoff
NO
Precharge
(C/10)
Start
Charge
Time Out?
Mode 1
Constant
Current
(C/2)
YES
YES
Fault
Time Out?
NO
Button Press
VSense = 4.2V
Idle
Mode 2
Constant
Voltage
(4.2V)
NO
YES
ISense < IBat_Detect
YES
NO
YES
Time Out?
NO
NO
ISense < IMin
or
IFlat
YES
Standby
Battery_Standby_Mode
NO
YES
VSense < VBat_Detect
YES
NO
NO
FIGURE 2-3:
VSense < Topping_Voltage
YES
The Charger State Machine.
 2014 Microchip Technology Inc.
DS50002321A-page 17
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
TABLE 2-1:
CHARGING STATES
State
Description
Precharge
Charges battery with a low current (usually C/10) until the battery voltage exceeds the defined cutoff
voltage.
Charge
The Charge state has two phases: constant current mode and constant voltage mode. The Charge
cycle starts in constant current mode, in which the battery is charged with a constant current (usually
C/2) until the battery voltage equals +4.2 VDC. After that, it enters the constant voltage mode, keeping a constant voltage at the output (+4.2 VDC). When the current is under the minimum threshold or
it does not decrease for a certain time (flat current), the state machine switches to Done state. If the
battery is removed before the charging is complete (battery current is under the battery detection
current), then the state machine switches to Idle state. If a time out occurs before any of these conditions are triggered, then the state machine will switch to Fault state.
Done
When the state machine reaches this state, it means that the battery is fully charged and can be
removed. The converter is stopped, but, if a special Standby_mode is enabled, then this state will
monitor the OCV (Open Circuit Voltage) of the battery and jump back to the Charge state, when it
drops too much. If the Standby_mode is not enabled, then it switches to Idle state.
Idle
In this state, the converter is stopped and the whole system waits for user input. A button press reinitializes the state machine, and the charging process starts from the beginning.
Fault
Stops the converter and waits for user input. A button press changes the state to Idle.
An LED is used to signal the charging state. The on/off states and blinking rates are
defined in Hardware.h.
TABLE 2-2:
LED STATES
LED State
Description
LED Off
Idle state
LED blinking 0.5 Hz
Precharge and Charge states
LED On
Done state
LED blinking 2 Hz
Fault state
2.4.2.1
CHARGER VARIABLES AND FUNCTIONS
Battery_state – Holds the current charging state of the battery charger. This variable is
available to the main program loop.
enum charge_states { IDLE = 0, FAULT = 1, DONE = 2, PRECHARGE =
3, CHARGE = 4, FLOAT = 5 };
State_counter – Used as a time-out counter for Precharge and Charge states.
IMIN – The minimum current value recorded during the constant voltage phase of the
Charge state. When the value of this variable falls below the minimum current threshold
(calculated as a fraction of the battery capacity), the charge is complete.
IMIN_DB – The minimum current debouncing counter. When the value of ISENSE is
smaller than IMIN for IMIN_UPDATE times in a row, IMIN is updated with the value of ISENSE.
IFLAT_DB – The flat current debouncing counter. This counter is reset every time IMIN is
updated. When it reaches zero, it triggers an End of Charge condition.
The charger library has two functions:
• Init_State_Machine() initializes the state machine debouncing and time-out
counters, sets the charging voltage and current limits and starts the converter.
This function should be called when starting to charge from Idle.
• Battery_State_Machine() contains the code for each of the charge/battery
state machines and will handle state transitions based on the measured current
and voltage values. This function expects to be called every second, otherwise
the time-out counters measure a different interval.
DS50002321A-page 18
 2014 Microchip Technology Inc.
2.4.2.2
THE BATTERY CHEMISTRY DEFINITION FILES
LiCo.h contains example definitions for charging this chemistry.
It supports all Li-Ion chemistries that have a charging voltage of 4.2V. For Li-Fe cells
the charging voltage needs to be changed to 3.6V.
The values in the definition files depend on the charger hardware implementation and
the number of ADC samples taken on each measurement. In this case, we have a
10-bit ADC with a 5V reference, and four samples are taken for every measurement.
The output current shunt is 0.1Ω, amplified 10 times. The output voltage divider is 2.44.
EQUATION 2-1:
VOLTAGE CALCULATION EXAMPLE FOR 4.2V
ADC maximum  Voltage
Voltage Counts = ----------------------------------------------------------------------------------------Output Divider  ADC Reference
4096  4.2V
Counts = ---------------------------------- = 3443
2.44  2.048V
EQUATION 2-2:
CURRENT CALCULATION EXAMPLE FOR 1000 MA
ADC maximum  Current  Shunt Value  Amplification
Current Counts = -----------------------------------------------------------------------------------------------------------------------------------------------------ADC Reference
4096  1A  0.1   10
Counts = -------------------------------------------------------- = 2000
2.048V
 2014 Microchip Technology Inc.
DS50002321A-page 19
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
NOTES:
DS50002321A-page 20
 2014 Microchip Technology Inc.
MCP1632 SINGLE-CELL
LI-ION BATTERY CHARGER
DEMO BOARD USER’S GUIDE
Appendix A. Schematic and Layouts
A.1
INTRODUCTION
This appendix contains the following schematics and layouts for the MCP1632
Single-Cell Li-Ion Battery Charger Demo Board:
•
•
•
•
•
•
Board – Schematic
Board – Top Silk
Board – Top Copper and Silk
Board – Top Copper
Board – Bottom Copper
Board – Bottom Copper and Silk
 2014 Microchip Technology Inc.
DS50002321A-page 21
BOARD – SCHEMATIC
TP1
VOUT
C4
1
C1 C2 C3
J1
1 2
1u 4.7u
3
VIN
4.7u
GND
1u
2
3
5V
L1A
Term Block 2Pin 2.54mm
U1
GND
GND
10u
1
GND GND GND
C5
GND
TP2
GND
GND
6.8k
R9
2
C10
GND
2
MCP1632
COMP
FB
R4
3
C11 2.7k
GND
R10
DNP
R11
0.1
0.1
GND
GND
R2
R5
R8 91k
R6
100k
J2
680k
10u/25V C7
L1B
CS
R1
2 1
D
Q1
DNP
GND
GND
GND GND
470k
VOUT
C9
2A/40V
VSENSE
R7
C8 10n
SS
10u/50V
OPAMP-
40k
470n
1
G
S
8
47p
39k
VEXT
6
D1
4
1N4148
VSENSE
PWM
VIN
7
U2
GND
R3
EN
5
D2
4
EN
C6
GND
GND
C12
4.7n
4
R13
-A
J3
5V
VDD
U3
OUTA
3
+A
VSS
2
OPAMP-
10k
1 2 3 4 5
R12
5
100k
1
10k
R14
ISENSE
R15
10k
100p
C13
R16
TP3
TP4 TP5
3
VOUT
GND
GND GND
5
1
4
SW1
SPST
C14
100p
VSS
RA5
RA0
RA4
RA1
MCLR/VPP/RA3
U4
RA2
8
10k
GND
7
6
EN
2 R17
1
RED
5
LD1
820
ISENSE
PWM
2
GND
SHIELD
GND
2
VDD
4
GND
3
 2014 Microchip Technology Inc.
1
5V
GND
GND
GND
GND
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
DS50002321A-page 22
A.2
A.3
BOARD – TOP SILK
 2014 Microchip Technology Inc.
DS50002321A-page 23
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
A.4
BOARD – TOP COPPER AND SILK
DS50002321A-page 24
 2014 Microchip Technology Inc.
A.5
BOARD – TOP COPPER
 2014 Microchip Technology Inc.
DS50002321A-page 25
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
A.6
BOARD – BOTTOM COPPER
DS50002321A-page 26
 2014 Microchip Technology Inc.
A.7
BOARD – BOTTOM COPPER AND SILK
 2014 Microchip Technology Inc.
DS50002321A-page 27
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
NOTES:
DS50002321A-page 28
 2014 Microchip Technology Inc.
MCP1632 SINGLE-CELL
LI-ION BATTERY CHARGER
DEMO BOARD USER’S GUIDE
Appendix B. Bill of Materials (BOM)
TABLE B-1:
Quantity
BILL OF MATERIALS
Designator
Description
Manufacturer
Manufacturer Part Number
2
C1, C2
Cap. ceramic 1 µF 16V 10%
X7R 0603
TDK Corporation
C1608X7R1C105K080AC
2
C3, C4
Cap. ceramic 4.7 µF 10V 20%
X7R 0805
TDK Corporation
C2012X7R1A475M125AC
3
C5, C6, C7
Cap. ceramic 10 µF 16V 20%
X7R 1210
TDK Corporation
C3225X7R1C106M200AB
1
C8
Cap. ceramic 47 pF 50V 5%
NP0 0603
TDK Corporation
C1608C0G1H470J080AA
1
C9
Cap. ceramic 0.47 µF 16V 10% TDK Corporation
X7R 0603
C1608X7R1C474K080AC
1
C10
Cap. ceramic 10000 pF 50V
10% X7R 0603
TDK Corporation
C1608X7R1H103K080AA
0
C11
DO NOT POPULATE
—
—
1
C12
Cap. ceramic 4700 pF 50V
10% X7R 0603
TDK Corporation
CGA3E2X7R1H472K080AA
2
C13, C14
Cap. ceramic 100 pF 50V 5%
NP0 0603
TDK Corporation
C1608C0G1H101J080AA
1
D1
Diode Schottky 40V 2A
DO214AC
Vishay Intertechnology,
Inc.
SSA24-E3/61T
1
D2
Diode Rec. 1N4148 1.25V 150
mA 100V SOD-123
Micro Commercial
Components
1N4148W-TP
2
J1, J2
Conn. terminal blk. 2.54 mm
2POS
PHOENIX CONTACT
1725656
1
J3
Conn. header 5POS vert. 0.100 FCI
GOLD
1
L1
Coupled inductor SEPIC/CUK
4.7 µH
1
LD1
LED red orange clear 0603 SMD Lite-On® Technology
Corporation
LTST-C190EKT
1
PCB
MCP1632 Single-Cell Li-Ion
Microchip
Battery Charger Demo Board – Technology Inc.
Printed Circuit Board
104-10240
1
Q1
MOSFET N-CH 25V 8PDFN
Microchip
Technology Inc.
MCP87130T-U/MF
2
R1, R12
Res. 100 kΩ 1/10W 1% 0603
Stackpole
Electronics, Inc.
RMCF0603FT100K
1
R2
Res. 680 kΩ 1/10W 1% 0603
Stackpole
Electronics, Inc.
RMCF0603FT680K
1
R3
Res. 39 kΩ 1/10W 1% 0603
Stackpole
Electronics, Inc.
RMCF0603FT39K0
Note:
Wurth® Group
68002-205HLF
744878004
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
 2014 Microchip Technology Inc.
DS50002321A-page 29
MCP1632 Single-Cell Li-Ion Battery Charger Demo Board User’s Guide
TABLE B-1:
Quantity
BILL OF MATERIALS (CONTINUED)
Designator
Description
Manufacturer
Manufacturer Part Number
1
R4
Res. 2.7 kΩ 1/10W 5% 0603
Stackpole
Electronics, Inc.
RMCF0603JT2K70
1
R5
Res. 91 kΩ 1/10W 5% 0603
Stackpole
Electronics, Inc.
RMCF0603JT91K0
1
R6
Res. 470 kΩ 1/10W 5% 0603
Stackpole
Electronics, Inc.
RMCF0603JT470K
1
R7
Res. 40 kΩ 0.15W 0.1% 0603
Vishay
Intertechnology, Inc.
PAT0603E4002BST1
0
R8
DO NOT POPULATE
—
—
1
R9
Res. 6.8 kΩ 1/10W 5% 0603
Stackpole
Electronics, Inc.
RMCF0603JT6K80
4
R13, R14,
R15, R16
Res. 10 kΩ 1/10W 5% 0603
Stackpole
Electronics, Inc.
RMCF0603JT10K0
1
R17
Res. 820Ω 1/10W 5% 0603
Stackpole
Electronics, Inc.
RMCF0603JT820R
2
R10, R11
Res. 0.1Ω 1/2W 1% 1206 SMD Bourns®, Inc.
CRM1206-FX-R100ELF
1
SW1
Switch tact. SPST-NO 0.05A
24V
Omron Electronics –
EMC Division
B3S-1100P
1
U1
MCHP Analog LDO 5V
MCP1703T-5002E/MB
SOT-89-3
Microchip
Technology Inc.
MCP1703T-5002E/MB
1
U2
IC Reg. CTRLR BOOST CM
PWM 8MSOP
Microchip
Technology Inc.
MCP1632-BAE/MS
1
U3
MCHP Analog OPAMP 1-Ch 1
Microchip
MHz MCP6001T-I/OT SOT-23-5 Technology Inc.
MCP6001T-I/OT
1
U4
IC MCU 8BIT 3.5KB FLASH
8SOIC
PIC12F1822-I/SN
Note:
Microchip
Technology Inc.
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
DS50002321A-page 30
 2014 Microchip Technology Inc.
NOTES:
 2014 Microchip Technology Inc.
DS50002321A-page 31
Worldwide Sales and Service
AMERICAS
ASIA/PACIFIC
ASIA/PACIFIC
EUROPE
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://www.microchip.com/
support
Web Address:
www.microchip.com
Asia Pacific Office
Suites 3707-14, 37th Floor
Tower 6, The Gateway
Harbour City, Kowloon
Hong Kong
Tel: 852-2943-5100
Fax: 852-2401-3431
India - Bangalore
Tel: 91-80-3090-4444
Fax: 91-80-3090-4123
Austria - Wels
Tel: 43-7242-2244-39
Fax: 43-7242-2244-393
Denmark - Copenhagen
Tel: 45-4450-2828
Fax: 45-4485-2829
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
China - Beijing
Tel: 86-10-8569-7000
Fax: 86-10-8528-2104
Austin, TX
Tel: 512-257-3370
China - Chengdu
Tel: 86-28-8665-5511
Fax: 86-28-8665-7889
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Cleveland
Independence, OH
Tel: 216-447-0464
Fax: 216-447-0643
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Novi, MI
Tel: 248-848-4000
Houston, TX
Tel: 281-894-5983
Indianapolis
Noblesville, IN
Tel: 317-773-8323
Fax: 317-773-5453
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
New York, NY
Tel: 631-435-6000
San Jose, CA
Tel: 408-735-9110
Canada - Toronto
Tel: 905-673-0699
Fax: 905-673-6509
DS50002321A-page 32
China - Chongqing
Tel: 86-23-8980-9588
Fax: 86-23-8980-9500
China - Hangzhou
Tel: 86-571-8792-8115
Fax: 86-571-8792-8116
China - Hong Kong SAR
Tel: 852-2943-5100
Fax: 852-2401-3431
China - Nanjing
Tel: 86-25-8473-2460
Fax: 86-25-8473-2470
China - Qingdao
Tel: 86-532-8502-7355
Fax: 86-532-8502-7205
China - Shanghai
Tel: 86-21-5407-5533
Fax: 86-21-5407-5066
China - Shenyang
Tel: 86-24-2334-2829
Fax: 86-24-2334-2393
China - Shenzhen
Tel: 86-755-8864-2200
Fax: 86-755-8203-1760
China - Wuhan
Tel: 86-27-5980-5300
Fax: 86-27-5980-5118
China - Xian
Tel: 86-29-8833-7252
Fax: 86-29-8833-7256
India - New Delhi
Tel: 91-11-4160-8631
Fax: 91-11-4160-8632
India - Pune
Tel: 91-20-3019-1500
Japan - Osaka
Tel: 81-6-6152-7160
Fax: 81-6-6152-9310
Japan - Tokyo
Tel: 81-3-6880- 3770
Fax: 81-3-6880-3771
Korea - Daegu
Tel: 82-53-744-4301
Fax: 82-53-744-4302
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
France - Paris
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Germany - Dusseldorf
Tel: 49-2129-3766400
Germany - Munich
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Germany - Pforzheim
Tel: 49-7231-424750
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Italy - Venice
Tel: 39-049-7625286
Malaysia - Kuala Lumpur
Tel: 60-3-6201-9857
Fax: 60-3-6201-9859
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
Malaysia - Penang
Tel: 60-4-227-8870
Fax: 60-4-227-4068
Poland - Warsaw
Tel: 48-22-3325737
Philippines - Manila
Tel: 63-2-634-9065
Fax: 63-2-634-9069
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
Taiwan - Hsin Chu
Tel: 886-3-5778-366
Fax: 886-3-5770-955
Spain - Madrid
Tel: 34-91-708-08-90
Fax: 34-91-708-08-91
Sweden - Stockholm
Tel: 46-8-5090-4654
UK - Wokingham
Tel: 44-118-921-5800
Fax: 44-118-921-5820
Taiwan - Kaohsiung
Tel: 886-7-213-7830
Taiwan - Taipei
Tel: 886-2-2508-8600
Fax: 886-2-2508-0102
Thailand - Bangkok
Tel: 66-2-694-1351
Fax: 66-2-694-1350
China - Xiamen
Tel: 86-592-2388138
Fax: 86-592-2388130
China - Zhuhai
Tel: 86-756-3210040
Fax: 86-756-3210049
03/25/14
 2014 Microchip Technology Inc.