AN137 Silicon_Laboratories, AN137 Datasheet - Page 4

no-image

AN137

Manufacturer Part Number
AN137
Description
Lithium ION Battery Charger Using C8051f300
Manufacturer
Silicon_Laboratories
Datasheet
AN137
With this established, select a PWM switching fre-
quency. As
shows, the larger the PWM switching frequency,
the smaller (and more cost effective) the inductor.
Our example code configures the ‘F30x’s 8-bit
hardware PWM to use the internal master clock of
24.5MHz divided by 256 to generate a 95.7kHz
switch rate.
Now we can calculate the inductor’s size. Assum-
ing V
ration voltage, is 0.5V, the desired output voltage,
V
rent, is 1500 mA, the inductor should be at least
18µH.
Note that the capacitor in this circuit is simply a
ripple reducer. The larger it is the better as ripple is
inversely proportional to the size of the cap. For
more details on buck converters, refer to the refer-
ences listed at the end of this note.
Li-Ion Battery Charger -
So ft wa re
The software example that follows demonstrates a
Li-Ion battery charger using the C8051F300. The
F300 is designed for high-level languages like “C”
and includes an 8-bit 8051 based micro-controller,
an 8-bit 500 ksps ADC, 8k FLASH, an 8-bit and
16-bit PWM, and a 2% accurate oscillator all on-
chip. The algorithms discussed are written entirely
in “C” making them easily portable. Refer to the
F300’s datasheet for a full description of the
device.
Calibration
4
o,
is 4.2V, and I
i
, the charging voltage, is 15V, V
Equation 2
Equation 2. Inductor Size.
L
=
0MAX
(
--------------------------------------------------- -
Vi Vsat
, the maximum output cur-
2Iomax
Vo
)ton
sat
, the satu-
Rev. 1.2
To ensure accurate voltage and current measure-
ments, the algorithms use a two-point system cali-
bration scheme. In this scheme, the user is expected
to apply two known voltages and two known cur-
rents, preferable, one point near ground and the
other point near full-scale. The algorithm then
takes these two points, calculates a slope and an
offset for both the current and voltage channels,
and stores the results in FLASH. All future conver-
sions are scaled relative to these slope and offset
calculations. Note that if an external amplifier is
used for the current channel, it will need to be cali-
brated with a similar two-point calibration scheme
to ensure maximum accuracy.
Temperature
To monitor the temperature, the algorithms use the
on-chip temperature sensor. The sensor is left
uncalibrated, but still provides a sufficiently accu-
rate temperature measurement. For more accurate
temperature measurement, one or two-point tem-
perature calibration is required.
An external temperature sensor can be used if
desired. The AMUX can to be reconfigured to
accommodate this additional input voltage.
Current
The charge-current to the battery cells is monitored
by taking a differential voltage reading across a
small but accurate sense resistor. The current is
amplified through the on-chip PGA, digitized by
the on-chip 8-bit ADC, and scaled accordingly via
the slope and offset calibration coefficients. An
external gain stage may be necessary if more reso-
lution is desired for the current measurement.
Voltage
The battery’s voltages are divided down and moni-
tored via external resistors. Note that this example
uses the supply voltage as the ADC voltage refer-
ence. Any monitored voltage above the reference
voltage must be divided down for accurate moni-

Related parts for AN137