Cypress CY8C29x66, AN2309, CY8C24794 specifications Two-Cell Battery Charger Firmware Flowchart Part

Page 13

 

 

 

 

 

 

 

 

 

AN2309

 

 

Figure 9. Two-Cell Battery Charger Firmware Flowchart Part 1

 

Start

 

 

 

 

 

 

 

 

 

Init Device

 

 

 

 

 

 

 

 

 

Set Initialization

 

 

 

 

 

 

 

 

 

State

 

 

 

 

 

 

 

 

 

Send Debug Data

 

 

 

 

 

 

 

 

 

Measure Vb1, Vb2,

 

 

 

 

 

 

 

 

 

Ich, Tb

 

 

 

 

 

 

 

 

 

Calc Vbmin, Vbmax

 

 

 

 

 

 

 

 

 

State is not

Yes

Check For

Yes

Check For

Yes

Set Wait For

 

 

 

Error or

 

Discharge Stop

 

 

 

Wait For

 

Negative Ich

 

 

Temperature State

 

 

 

 

 

Temperature

 

 

 

 

Temperature

 

 

 

 

 

 

 

 

No

 

No

 

No

 

 

 

 

 

 

 

 

 

Check Full

Yes

Set Full Discharge

 

 

 

 

 

 

 

Discharge

 

 

 

 

 

 

 

 

State

 

 

 

 

 

 

 

Condition

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

Set Full Discharge

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

State

 

 

 

 

 

Check for

Yes

Set Wait For

 

 

 

 

 

 

 

charge stop

 

 

 

 

 

 

 

 

Temperature state

 

 

 

 

 

 

 

temperature

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

 

 

Check For

Yes

Set Error State

 

 

 

 

 

 

 

Voltage Error

 

 

 

 

 

 

 

 

 

And Error Code

 

 

 

 

 

 

 

Vbmax>=VMAX

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

 

 

 

 

Check For

Yes

Set Error State

 

 

 

 

 

 

 

Current Error

 

 

 

 

 

 

 

 

 

And Error Code

 

 

 

 

 

 

 

Ich>=IMAX

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

 

 

 

 

State

Yes

Set Activation

 

Charge On

 

 

 

 

 

Initialization

 

 

Start tACT, tCH, Timing

 

 

 

 

 

State

 

 

 

 

 

 

 

 

Open LOAD Out

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

 

 

 

 

State

Yes

Set Ireg=IACT;

 

Check For

Yes

Set Error State

 

 

 

Activation

 

 

 

 

 

 

 

Regulate

 

Timeouts

 

And Error Code

 

 

 

 

 

 

 

 

 

 

No

 

 

 

No

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Check Cell

Yes

Cell Balancing

 

 

 

 

 

 

 

Balancing

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interval

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

 

 

 

 

Check Rapid

Yes

Set Rapid State

Start tRAP Time

 

 

 

 

 

Start Condition

 

 

 

 

 

 

 

 

Counter

 

 

 

 

 

Vbmin>=VRS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

State

Yes

Set Ireg=IRAP;

 

Check For

Yes

Set Error State

 

 

 

Rapid

 

Vreg=VRAP;

 

 

 

 

 

 

Timeouts

 

And Error Code

 

 

 

 

 

Regulate

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

 

 

No

 

 

 

 

 

 

 

 

 

Check Cell

Yes

Cell Balancing

 

 

 

 

 

 

 

Balancing

 

 

 

 

 

 

 

 

Interval

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

 

 

 

 

Check Charge

Yes

Set Charge

 

 

 

 

 

 

 

Terminate

 

 

 

 

 

 

 

 

Complete State

 

 

 

 

 

 

 

Condition

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

1

 

 

 

 

 

 

 

 

2

November 25, 2007

 

 

 

Document No. 001-17394 Rev. *B

 

- 13 -

[+] Feedback

Image 13
Contents Introduction Application Note AbstractQcell 1 Qcell Cell-Balancing FoundationCcell 1 Vcell 1 Ccell 2 Vcell Cell Ccell 1 VcellIchargeN Icharge IbalN IbalN VcellNRdischargeN RloadTwo-Cell Battery Charger Hardware Two-Cell Battery Charger with Cell-Balancing Support Device Schematic BAT2 + C9 PSoC Device InternalsR15 Battery MeasurementVref Gina V Vbat Max NmaxNnew nold N4.2 V new N4.2 V oldTwo-Cell Battery Charger Algorithm Two-Cell Battery Charger FirmwareTwo-Cell Battery Charger State Diagram Two-Cell Battery Charger Firmware Flowchart Part Cell-Balancing Algorithm Cell-Balancing Algorithm Parameter Unit Description Charging Parameters Two-Cell Battery Charger ParametersConclusion Cell-Balancing ParametersCharge/Discharge and Cell-Balancing Profile Examples AppendixCell-Balancing Activity Profile Cell-Balancing Parameter Profile Screen About the AuthorECN Document History