### Abstract

In switch mode, the switching speed of the DS2712 battery charger varies based on inductor selection, charge current, and battery voltage. In some cases, the speed under various conditions should be known to account for noise sensitivity, peak-to-peak charge current, and inductor selection constraints. This application note provides an easy-to-use spreadsheet for estimating a circuit's switching speed with different component values and battery parameters.

### Introduction

When designing with the DS2712 switch-mode battery charger, it is useful to quickly determine the range of frequencies within which the circuit can be expected to transition. Knowing and controlling the switching frequency can help optimize inductor selection, give guidelines for transistor selection, and dictate PCB layout considerations, among other things. For the DS2712 architecture, the charge mode does not affect switching frequency (as it does with the DS2715 platform) because the reference voltage is fixed in all modes. While the inductor plays the largest role in setting the switching frequency, the variation in battery cell voltages is the dominant variable effect. This application note presents an analysis of the DS2712 charger circuit, along with an easy-to-use spreadsheet for estimating the switching frequency.

### Circuit Overview

Figure 1 shows the equivalent circuit for a buck switching charger with a battery and sense resistor load. The DS2712 architecture operates by regulating the voltage across R_{SENSE} to a preset value for all charging modes. The sense resistor value, along with this preset reference voltage, then controls the value of I_{CHARGE}. For NiMH batteries, four stages of charging are preferred—all of which (Precharge, Fast-Charge, Topoff, and Maintenance) are regulated through the voltage across the sense resistor in the DS2712. The precharge and topoff states operate at 25% of the average current regulated during fast-charge. Maintenance mode operates at 1/64th the fast-charge current.

The various charge states are entered depending on the state of the battery stack. When the battery voltage is less than 1.0V, precharge mode is used to slowly charge depleted batteries. Fast-charge mode is only used when the battery voltage is above 1.0V and not more than 1.65V, but may also terminate when other fast-charge conditions are met. Topoff mode follows fast-charge mode for a preset period of time. R_{PARASITIC} is an optional parameter that is added to the reference circuit to represent any significant parasitic voltage drops that may occur as a result of battery, fuse, or other connection nonidealities.

*Figure 1. The DS2712 switching reference circuit.*

The control circuit for regulating the sense resistor voltage consists of a comparator with hysteresis and a reference voltage, which drives an open-drain output pin. Changes to the duty cycle for the various switching modes is handled by Q_{CC} and the CC output pin (not shown). Switching speed while Q_{CC} is conducting is determined by the amount of time needed for I_{CHARGE} to go from one peak to the other and back again, which includes any delays in the feedback circuit and in the process of turning Q_{SW} and D_{CATCH} off and on. These delays cause I_{CHARGE} to overshoot one or both of the comparator thresholds, creating a larger peak-to-peak variation than nominal. Figure 2 shows an example of ideal switching control waveforms, while Figure 3 shows waveforms with extra turn-off delays in Q_{SW}.

*Figure 2. Ideal charge-current control waveforms. (Not drawn to scale.)*

*Figure 3. Charge-current control waveforms with slow Q*

_{SW}turn-off. (Not drawn to scale.)

### Calculation Method

The rate of change for I_{CHARGE} is governed by the voltage and current relationship of an ideal inductor L.

V = L × di/dt and dt = L × di/V | (Eq. 1) |

Hence, the amount of time for the on and off states of Q_{SW} varies with the voltage developed across L in each state, and the change in I_{CHARGE} from peak to peak. The peak-to-peak value is set by the hysteresis value of the charge mode and any control circuit delays that cause overshoot of the comparator levels. See the data sheet for the DS2712 device for definitions of the sense comparator reference voltage (V_{IREF}) and the hysteresis voltage (V_{HYS_COMP}).

In order to simplify the switching-speed approximation, let us make the assumption that the voltage across the inductor for each Q_{SW} state stays constant. Let us also assume that the midpoint of V_{SENSE} from peak to peak [V_{IREF} - (0.5 × V_{HYS_COMP})] provides a reasonable steady-state condition for calculating the inductor voltage of each state. With those simplifications in place, the voltage drop around the loop of the reference circuit in Figure 1 for the Q_{SW_ON} and Q_{SW_OFF} states can be calculated to yield the inductor voltage for a given battery voltage as follows:

V_{L}(Q_{SW_ON}) = V_{IN} - V_{DIODE} - V_{QSW} - V_{QCC} - V_{PAR} - V_{BATT} - V_{SENSE} |
(Eq. 2) |

V_{L}(Q_{SW_OFF}) = V_{QCC} + V_{PAR} + V_{BATT} + V_{SENSE} + V_{DCATCH} |
(Eq. 3) |

Since the battery voltage may vary over a 1.0V to 1.65V range in fast-charge mode, it is useful to calculate the inductor voltage and then the switching speed at several operating points. A spreadsheet is available for download that will perform the calculations described in this application note for three different battery voltages in fast-charge mode, and at one battery stack voltage in precharge and topoff modes.

Once the inductor voltages for each state and each operating point are calculated, any delays in the control circuit may be factored into the on and off times for Q_{SW}. For our approximation, this is accomplished by first calculating the extra change in I_{CHARGE} due to the turn-on and turn-off delays of Q_{SW} according to the following formulas:

di(on delay) = dt × V(on)/L, where dt = t_{PDLY} + t_{SW_OFF} |
(Eq. 4) |

di(off delay) = dt × V(off)/L, where dt = t_{PDLY} + t_{SW_ON} |
(Eq. 5) |

This extra change in current can be thought of as I_{CHARGE} overshooting the comparator threshold due to the control signal or transistor switching delay. Here again for simplicity, we have assumed that the inductor voltage stays constant during each state. When the extra di due to delays is added to the theoretical current change due to hysteresis, we have:

di(Q_{SW_ON}) = V_{HYS_COMP}/R_{SENSE} + di(on delay) |
(Eq. 6) |

di(Q_{SW_OFF}) = V_{HYS_COMP}/R_{SENSE} + di(off delay) |
(Eq. 7) |

This adjusted delta I_{CHARGE} is substituted into the ideal inductor equation, along with the previously calculated inductor voltage, to determine the overall Q_{SW} on and off state times. Typically, bipolar circuits are the most likely to contribute enough switching delay to require this extra level of delay consideration, but the delays may be modeled by the user for MOSFET circuits as well.

The equations described in this application note have been implemented in a spreadsheet for easily estimating the switching speed of a DS2712 switch-mode charger circuit. The spreadsheet describes each of the parameters that must be entered by the user, or that may be optionally modified by the user (Figure 4).

More detailed image (PDF, 124kB)

*Figure 4. The switching-speed calculation spreadsheet.*

The first set of parameters relates to the component properties of the reference schematic. The second section contains the various operating points of the battery stack used in the calculations. The third section describes the internal set points of the current-sense comparator; the default values in this section should be verified from the data sheet of the DS2712 device. Finally, the last section of parameters is for the delays inherent to the DS2712 and any extra delays induced by the switching circuit that must be considered for accurate estimation.

### Calculation Results

After entering the parameters for the application circuit into the first tab of the available spreadsheet, the results of the switching calculations can be viewed in the second tab (Figure 5). The spreadsheet shows the results for each mode and battery operating condition, as well as some of the partial calculations that are used in the final switching-speed result. Included among these are the inductor voltages for each state, the change in I_{CHARGE} due to delays, and the individual on and off state times.

More detailed image (PDF, 113kB)

*Figure 5. The switching-speed results tab.*

### Conclusions

Many useful pieces of information can be taken from the estimations of switching speed as they relate to the reference circuit. It can be seen that the main factors affecting the switching speed of the DS2712 switch-mode NiMH charger are the inductor value, I_{CHARGE}, the headroom of V_{IN} above the battery stack voltage, and in some cases delays resulting from the slow switching of Q_{SW}. The analysis presented here can be used to estimate switching speed for these circuits and develop an understanding of how best to adjust this speed when necessary.