Microchip Technology ARD00558 Скачать руководство пользователя страница 18

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

DS50002321A-page 18

 2014 Microchip Technology Inc.

An LED is used to signal the charging state. The on/off states and blinking rates are
defined in 

Hardware.h

.

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.
I

MIN

 – 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.
I

MIN_DB

 – The minimum current debouncing counter. When the value of I

SENSE

 is 

smaller than I

MIN

 for I

MIN_UPDATE

 times in a row, I

MIN

 is updated with the value of I

SENSE.

I

FLAT_DB

 – The flat current debouncing counter. This counter is reset every time I

MIN

 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.

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 4.2 V

DC

. After that, it enters the constant voltage mode, keep-

ing a constant voltage at the output (+4.2 V

DC

). 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 condi-
tions 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 reini-
tializes 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.

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

Содержание ARD00558

Страница 1: ...2014 Microchip Technology Inc DS50002321A MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide...

Страница 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...

Страница 3: ...2014 Microchip Technology Inc DS50002321A page 3 Object of Declaration MCP1632 Single Cell Li Ion Battery Charger Demo Board...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 8: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 8 2014 Microchip Technology Inc NOTES...

Страница 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...

Страница 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...

Страница 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...

Страница 12: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 12 2014 Microchip Technology Inc NOTES...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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_...

Страница 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...

Страница 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...

Страница 20: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 20 2014 Microchip Technology Inc NOTES...

Страница 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...

Страница 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...

Страница 23: ...2014 Microchip Technology Inc DS50002321A page 23 A 3 BOARD TOP SILK...

Страница 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...

Страница 25: ...2014 Microchip Technology Inc DS50002321A page 25 A 5 BOARD TOP COPPER...

Страница 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...

Страница 27: ...2014 Microchip Technology Inc DS50002321A page 27 A 7 BOARD BOTTOM COPPER AND SILK...

Страница 28: ...MCP1632 Single Cell Li Ion Battery Charger Demo Board User s Guide DS50002321A page 28 2014 Microchip Technology Inc NOTES...

Страница 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...

Страница 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...

Страница 31: ...2014 Microchip Technology Inc DS50002321A page 31 NOTES...

Страница 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...

Страница 33: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Microchip ARD00558...

Отзывы: