The present disclosure relates to circuits and methods for cable resistance compensation.
Power is typically routed between electronic devices using different types of cables. As electric current flows through a cable, intrinsic resistance of the cable may cause voltage drops between different terminals of the cable. The voltage drop for high quality cables may be less than the voltage drop for low quality cables.
One common use of a cable is to charge an electronic device's battery. In this application, a wall adapter receives AC voltage from a wall outlet and coverts the AC voltage to a DC voltage. Current and voltage from the wall adapter (also referred to as a dedicated charge port or “DCP”) may be coupled through a cable to an electronic device, such as a cellular phone, to provide power to the device and/or charge the device's battery.
One problem associated with coupling power through a cable to an electronic device is that different types of cables may result in different voltages being available at inputs of the electronic device circuitry. As current flows through a low quality cable, the voltage provided at the output of the wall adapter may drop significantly due to cable resistance by the time it reaches the input of the electronic device. Yet, for high quality cables, there may be little resistive drop. Accordingly, some sensitive device circuitry may not operate properly due to voltage variations caused by different cable resistances.
The present disclosure includes circuits and methods for cable resistance compensation. In one embodiment, the present disclosure includes a circuit comprising a regulator coupled to receive an input voltage and an input current from an external power source across a cable, a voltage sensor coupled to sense the input voltage, a collapse detector coupled to detect whether or not the input voltage is below a first value, and a current limit circuit to control a maximum current in the regulator. The current limit circuit is reconfigured to a plurality of current limit values and the collapse detector detects if the input voltage from the external power source collapses below the first value at the plurality of current limit values. The voltage sensor measures different voltages at different input currents, and in accordance therewith, reduces collapse voltage value to compensate for a voltage drop caused by a resistance of the cable.
The following detailed description and accompanying drawings provide a better understanding of the nature and advantages of the present disclosure.
The present disclosure pertains to compensating for cable resistance. In the following description, for purposes of explanation, numerous examples and specific details are set forth in order to provide a thorough understanding of the present disclosure. It will be evident, however, to one skilled in the art that the present disclosure as expressed in the claims may include some or all of the features in these examples alone or in combination with other features described below, and may further include modifications and equivalents of the features and concepts described herein.
During operation, regulator 130 may draw current across cable 111. A current “i” flowing through cable 111 may result in a voltage drop of VcR caused by the resistance of the cable, Rc. Features and advantages of the present disclosure may sense the voltage on the device side of the cable and modify the operating parameters of the circuit to prevent erroneous operation. For example, a current limit circuit 123 may be used to control a maximum current in regulator 130. In one embodiment, current limit circuit 123 may be reconfigured to a plurality of current limit values as part of a process for determining a current sourcing capability of adapter 102. At each current limit value, regulator 130 may draw different levels of current (successively increasing or decreasing). If adapter 102 cannot provide the current, the voltage from adapter 120 Vdd will collapse. Thus, current limit circuit 123 may iteratively increase the current “i” up to a current that causes the input voltage from adapter 102 to collapse to determine the maximum available current from adapter 102. In some embodiments, the current limit circuit 123 may start above the maximum current of adapter 102 and iteratively lower the current until the voltage does not collapse.
Collapse detector 122 has an input coupled to the input voltage of the regulator to detect whether or not the input voltage Vdd from the external power source is below a particular value (a collapse voltage such as 8v on a 9v). If the input voltage Vdd from the external adapter 102 collapses below the value set by the collapse detector 122 at one of current limit values, then the current limit is too high and should be reduced within the current capability of adapter 102. However, as the current limit is increased, current “i” through the cable results in an increase in the voltage drop VcR caused by the cable resistance. If the resistive voltage drop becomes excessively large, due to a poor quality cable with a high resistance, the system may erroneously detect a collapse when in fact the voltage drop is caused by the cable resistance and not excessive current.
Certain embodiments of the present disclosure may change the collapse voltage level used by collapse detector 122 when high resistance cables are detected. For example, in one embodiment, the circuit may sense the input voltage at different current levels and change the collapse voltage level to compensate for the voltage drop caused by a resistance of the cable. For example, voltage sensor 121 may determine a first voltage V1 corresponding to a first input current value i1 and a second voltage V2 corresponding to a second input current value i2. The changes in current and voltage may be used to determine a cable resistance, for example. If the drop in voltage between two current measurements indicates a high cable resistance, which would lead to a larger drop in voltage at the input of regulator 130, then a collapse voltage may be reduced to account for the drop in voltage caused by the cable resistance. In particular, cable resistance is given by Rc=Δv/Δi. Thus, if the voltage changes by more than a particular threshold in response to a change in current (corresponding to a cable resistance above some threshold), then a lower collapse voltage may be used, for example.
In one embodiment, a voltage sense circuit 222 senses the voltage on the data line 214. A high ground bounce causes the data line voltage Vd to increase to Vd+VcR, for example. This voltage may be used to set a maximum current in the system to maintain a ground bounce voltage below a determined value. For example, voltage sensor 222 may determine a first voltage V1 corresponding to a first input current value i1 and a second voltage V2 corresponding to a second input current value i2. The changes in current and voltage may be used to determine a cable resistance, Rc, as described above, for example. Proper operation of the system may set a maximum tolerable ground bounce, Vgb_max, for error free performance. With a known cable resistance and known maximum tolerable ground bounce, a maximum current may be determined as follows: Imax=Vgb_max/Rc. Accordingly, voltage sensor 222 may send one or more signals to current limit 223 to configure a maximum current in regulator 230.
Battery charger 520 includes a switching regulator 530 that provides power to a battery 550, for example. Battery 550 may be coupled to other device electronics (not shown) such as a display, data processor, and/or RF transceiver, for example. Switching regulator 530 may include a regulator controller 527 for receiving feedback and turning switches on and off In one embodiment, input current is sensed at 524 (e.g., via a resistor or sense FET) and a current sense circuit 525 provides a signal to one input of a differential circuit 526, such as an amplifier. A second input of circuit 526 is coupled to current limit DAC to set a maximum current. An output of circuit 526 is provided as an input (e.g., a wired OR) to regulator control circuitry 527 so regulator 530 maintains a controlled input current, for example. Regulator control circuitry 527 may receive other feedback inputs as well, such as battery voltages or a sensed output current, for example.
Initially, multiplexer 540 (“MUX”) may selectively couple (i.e., multiplex) VBUS to an input of an analog-to-digital converter (“ADC”) 541 to sense the voltage on VBUS with switching regulator 530 not drawing current. ADC 541 may measure VBUS when the current is approximately zero. At zero current, MUX 540 may further couple the D− terminal to the input of ADC 541 to measure a voltage on D− at zero current.
After the first voltage measurement, switching regulator 530 is turned on and draws current. Switching regulator 530 may initiate an auto-input current limit (AICL) process for successively drawing increasing currents until VBUS collapses to determine a maximum current capability of adapter 502, for example, and setting the current limit below the maximum capacity of the adapter. In one embodiment, an initial current drawn by switching regulator 530 is 500 mA. MUX 540 may be configured to selectively couple (multiplex) VBUS to the input of ADC 541 to measure the voltage on VBUS while the current is flowing. MUX 540 may then be configured to couple the voltage on D− to the input of ADC 541 to measure the voltage on D− while the current is flowing.
In one embodiment, control circuits 542 may include storage registers (or memory) to store the measured voltages described above. Control circuits 542 may process the measured VBUS voltages and reduce a collapse voltage generated by collapse reference 522, for example. In one embodiment, if the change in voltage, and corresponding resistance is greater than a threshold, the cable may be rejected and the process is halted. In another embodiment, control circuits 542 may process the measured D− voltages and produce a signal (e.g., Imax_rgnd) to a current limit digital-to-analog converter (“DAC”) 523 to set a maximum current limit to maintain the ground bounce below a specified value.
Battery charger 520 may continue to successively increase the current drawn from adapter 502 to detect when VBUS falls below a collapse voltage. Battery charger 520 may include a differential comparison circuit 521 (e.g., a comparator or high gain amplifier) having a first input coupled to VBUS and a second input coupled to collapse reference generator 522 to receive a collapse voltage. When VBUS falls below the collapse voltage, comparison circuit 521 signals current limit DAC 523 that a maximum current capability has been reached (current limit DAC may set the current limit as the previous value used before the collapse occurred). However, if the cable resistance causes a large voltage drop, VBUS may fall below the collapse voltage before adapter 502 actually collapses for lack of current capability (i.e., a false collapse may be detected). Therefore, embodiments of the present disclosure may use the measured values of VBUS to detect a high resistance cable, and the collapse voltage may be reduced when a high resistance cable is detected to prevent false collapses from occurring.
Adapter 502 may be capable of providing multiple different voltages to electronic device 500. In one embodiment, adapter 502 initially provides VBUS=5v and D+and D− are short circuited. Next, D− may be coupled to ground with a weak pull down. This ground voltage may be measured on device 500 to check for ground bounce as described above. Thereafter, device 500 may signal adapter 502 to increase the voltage by presenting particular voltage combinations on D+and D− (e.g., D+/D−=V1 for VBUS=12v; D+=V2, D−=V1 for VBUS=9v; D+=V1, D−=V2 for VBUS=20v; and D+=V1, D−=Gnd for VBUS=5v (default), where V1 may be 0.6v and V2 may be 3.3v). Ground bounce may cause the voltages generated on D+ and D− (on the electronic device side) to be offset from the ground of adapter 502. This can potentially lead an adapter to misread the desired voltage and generate the wrong VBUS voltage, potentially damaging either or both of the device 500 or adapter 502, for example.
Advantageously, ground bounce may be limited to a particular specified value (e.g., maximum ground bounce, GBmax, not more than 750 mV). Accordingly, measured voltages on D− when current is off and when current is on may be used to set a maximum current. The ground bounce is the change in voltage sensed on the data terminal between when current is off and when current is on. Thus, cable resistance is:
Rgnd=ground bounce/current.
Once Rgnd is known, Imax can be determined as follows:
Imax=GBmax/Rgnd=750 mV/Rgnd.
Imax may, in turn, set an upper limit on the current limit, so that the AICL process to find a maximum current capability of adapter 502 may be stopped before collapse occurs if the ground bounce Imax is reached. Sensing Rgnd may also be used to prevent ground bounce from causing a problem with the adapter changing its output voltage and/or not being compliant with the HVDCP specification, for example.
The above description illustrates various embodiments of the present disclosure along with examples of how aspects of the particular embodiments may be implemented. The above examples should not be deemed to be the only embodiments, and are presented to illustrate the flexibility and advantages of the particular embodiments as defined by the following claims. Based on the above disclosure and the following claims, other arrangements, embodiments, implementations and equivalents may be employed without departing from the scope of the present disclosure as defined by the claims.