background image

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

DS50002321A-page 16

 2014 Microchip Technology Inc.

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).
V

SENSE

 and I

SENSE

 contain updated values of the output voltage and current. They can 

be defined as macros or return functions:

#define V

SENSE

 V

OUT

#define I

SENSE

 I

OUT

Set_Voltage(x) and Set_Current(x) set the converter maximum output voltage and cur-
rent. 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

Summary of Contents for ARD00558

Page 1: ...2014 Microchip Technology Inc DS50002321A MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide...

Page 2: ...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...

Page 3: ...2014 Microchip Technology Inc DS50002321A page 3 Object of Declaration MCP1632 Single Cell Li Ion Battery Charger Demo Board...

Page 4: ...In clude 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...

Page 5: ...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...

Page 6: ...h File Save Bold characters A dialog button Click OK A tab Click the Power tab N Rnnnn A number in verilog format where N is the total number of digits R is the radix and n is a digit 4 b0010 2 hF1 Te...

Page 7: ...ments latest software releases and archived software General Technical Support Frequently Asked Questions FAQs technical support requests online discussion groups Microchip consultant program member l...

Page 8: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 8 2014 Microchip Technology Inc NOTES...

Page 9: ...rithm 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 Compact siz...

Page 10: ...y 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 chargi...

Page 11: ...21A page 11 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 Charge...

Page 12: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 12 2014 Microchip Technology Inc NOTES...

Page 13: ...he 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...

Page 14: ...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...

Page 15: ...t 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 sys...

Page 16: ...converter maximum output voltage and cur rent 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 s...

Page 17: ...Machine Precharge C 10 Start Charge Mode 1 Constant Current C 2 Mode 2 Constant Voltage 4 2V Idle Fault YES YES YES VSense VCutoff NO YES NO ISense IMin or IFlat YES YES VSense 4 2V NO NO VSense VBat_...

Page 18: ...me out counters measure a different interval 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...

Page 19: ...plementation 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...

Page 20: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 20 2014 Microchip Technology Inc NOTES...

Page 21: ...1A page 21 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 B...

Page 22: ...0n GND GND TP1 TP3 GND TP2 C11 DNP GND C7 10u 25V GND C5 10u GND 1 3 L1A 2 4 L1B C6 10u 50V GND R1 100k R11 0 1 GND OPAMP R2 680k R6 470k GND VOUT PWM VDD 1 RA5 2 RA4 3 MCLR VPP RA3 4 RA2 5 RA1 6 RA0...

Page 23: ...2014 Microchip Technology Inc DS50002321A page 23 A 3 BOARD TOP SILK...

Page 24: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 24 2014 Microchip Technology Inc A 4 BOARD TOP COPPER AND SILK...

Page 25: ...2014 Microchip Technology Inc DS50002321A page 25 A 5 BOARD TOP COPPER...

Page 26: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 26 2014 Microchip Technology Inc A 6 BOARD BOTTOM COPPER...

Page 27: ...2014 Microchip Technology Inc DS50002321A page 27 A 7 BOARD BOTTOM COPPER AND SILK...

Page 28: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 28 2014 Microchip Technology Inc NOTES...

Page 29: ...0 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 Comp...

Page 30: ...ackpole 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...

Page 31: ...2014 Microchip Technology Inc DS50002321A page 31 NOTES...

Page 32: ...x 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 China Xiamen Tel 86 59...

Page 33: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Microchip ARD00558...

Reviews: