ST AN2389 Application note

AN2389

Application note

An MCU-based low cost non-inverting buck-boost converter for battery chargers

Introduction

As the demand for rechargeable batteries increases, so does the demand for battery chargers. There are different kinds of design solutions available for implementing battery chargers. Some of them are dedicated hardware based solutions and some are microcontroller based solutions.

In a microcontroller based solution, you have the flexibility of using the same hardware for charging different batteries and making only slight changes in the software. But there are still some challenges and one of the major challenges is to have a suitable input power supply available. Generally the Buck converter topology is used as a DCDC converter to provide the controlled output power supply to the batteries. But in this case a problem may arise, for example, if you want to charge a 4.2V Li-ion batteries from a 5V supply due to the presence of the protection diode and other small drops across other components. This drop is generally about 1V which makes it very difficult to provide 4.2V to the Li-ion batteries using the buck converter topology.

This application note describes a simple technique for implementing a non-inverting buckboost converter which requires only one inductor. This converter is basically the result of cascading a Buck converter with a Boost converter. This converter can be controlled by two PWM signals from the microcontroller and can be used as a Buck converter or Boost converter whenever required. So this solution combined with the flexibility of the ST7 microcontroller can be used to charge a wide range of the batteries using the same hardware.

The example used in this application note is specific to battery chargers but this DC-DC converter can be very useful for portable applications in general or any application which uses rechargeable batteries.

August 2007

Rev 1

1/16

www.st.com

Contents

AN2389

 

 

Contents

1

Circuit diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 3

2

Theory of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

 

2.1

Buck-boost implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

 

2.2

Buck converter implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

 

2.3

Boost converter implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

3

Selection of components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

 

3.1

Inductor selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

 

3.2

Capacitor selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4

Application in battery charger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

 

4.1

Theory of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

 

4.2

Software flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

5

Test environment and results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

6

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

7

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

8

Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

2/16

AN2389

Circuit diagram

 

 

1 Circuit diagram

The diagram in Figure 1 shows the structure of the modified buck-boost converter.

Figure 1. Modified buck-boost converter

PWM1

L

d2

 

 

 

 

 

 

P+

 

 

 

SW1

 

 

 

d1

PWM2

SW2

C

 

VIN

 

 

VOUT

P-

 

 

 

3/16

Theory of operation

AN2389

 

 

2 Theory of operation

You can use this converter as buck-boost converter, as a buck converter or as a boost converter by selecting different combinations of switches SW1 and SW2 driven by the PWM1 and PWM2 signals output by the ST7 microcontroller.

2.1Buck-boost implementation

This converter can be used as a non inverting buck-boost converter by selecting the operating mode from Table 1 which briefly describes the converter modes.

.

Operating modes based on switch combinations

Table 1.

Phase

SW1 (PWM1)

SW2 (PWM2)

Operating modes

 

 

 

 

1

OFF

OFF

BUCK

 

 

 

 

2

OFF

ON

N/A

 

 

 

 

3

ON

OFF

BUCK-BOOST

 

 

 

 

4

ON

ON

BOOST

 

 

 

 

If we look at phase 2 in Table 1, here the switch SW1(PWM1) is OFF and switch SW2 (PWM2) is ON. This condition never occurs either in a buck converter or in boost converter. So you should always take care in your software that this condition must not happen. To avoid this, if we assume that initially both switches are in OFF condition then you should use the following guidelines to manage the PWM signals driving the two switches.

1.Keep the frequency of both PWM signals the same, to better control when synchronizing the two PWM signals using the next three guidelines.

2.The duty cycle D1 of control signal PWM1, must be greater than the duty cycle D2 of control signal PWM2.

3.PWM1 should be enabled before the PWM2 signal.

4.PWM1 should be disabled after the PWM2 signal.

4/16

ST AN2389 Application note

AN2389

Theory of operation

 

 

Figure 2. Timing diagram for two PWM signals

Phase 3

 

PWM1

 

PWM2

 

Phase 4

Phase 1

Figure 2 shows a timing example for the two PWM signals based on the above guidelines. Here phase 2 does not occur.

If the duty cycles of the two PWM signals driving SW1(PWM1) and SW2 (PWM2) are D1 and D2 respectively and

if we exclude the saturation voltage of the switches from our calculation and

if the drop across the diodes is Vd1 and Vd2 respectively,

then the output voltage Vout is given by the following formula:

Vout = [ Vin * D1 - Vd1 * ( 1 - D1) ] / ( 1 - D2) - Vd2

As mentioned in [2], theoretically this converter works linearly over a gain range of 0 - 200% of the input voltage.

5/16

Loading...
+ 11 hidden pages