Search notes

Search titles and full post content.

    X. BLOG

    Cable Drop Compensation

    Cable drop
    compensation

    SY8286A · INA213 current feedback · VFB = 0.6 V

    The INA213 measures load current across the shunt and feeds a proportional signal through R3 into the feedback node. The converter raises V0 by exactly the voltage the shunt and cable will lose, so the load stays at the target. Below: the derivation step by step, a live calculator, how to pick R2 for noise immunity, and how the result behaves when the real cable differs from the design value.

    Circuit

    Compensation network schematic The converter output V0 feeds a shunt, then the cable, then the load. V1 is the shunt's load side. The INA213 senses the shunt with IN plus on V1, IN minus and REF on V0, and its output drives R3 into the feedback node where R1 from V0 and R2 to ground complete the divider. SY8286A Rsh 10 mΩ Rc cable 200 mΩ Load V0 V1 INA213 G = 50 IN+ IN− REF OUT V+ from SYS R1 55.6 kΩ R2 4.3 kΩ R3 76.8 kΩ C_f FB 0.6 V

    How the formula is derived

    Five steps take you from the schematic to one clean equation. The trick in step 3 is to keep every term as a conductance (1/R) instead of cross-multiplying. R1 and R3 then collapse into a single parallel resistance, written Rp = R1 ∥ R3.

    a Amplifier output
    VINA = G · (VIN+ − VIN−) + VREF
          = G · (V1 − V0) + V0
    VINA = V0 − G·Rsh·I
    IN+ is on the load side, so V1 − V0 = −Rsh·I. REF on V0 makes the output ride on V0: it equals V0 at zero current and drops G·Rsh volts below it per amp (0.5 V/A here).
    b KCL at the FB node
    (V0 − VFB)/R1 + (VINA − VFB)/R3 = VFB/R2
    The converter regulates FB to VFB = 0.6 V. Current arrives through R1 from V0 and through R3 from the amplifier, and leaves through R2.
    c Group by conductance
    V0·(1/R1 + 1/R3) = VFB·(1/R1 + 1/R3) + VFB/R2 + G·Rsh·I/R3
    1/R1 + 1/R3 = 1/Rp  →  multiply both sides by Rp:
    V0 and VFB carry the same group (1/R1 + 1/R3). That shared group is what lets the result stay short.
    d Converter output
    V0 = VFB·(1 + Rp/R2) + G·Rsh·α·I   with α = Rp/R3 = R1/(R1 + R3)
    The first term is the setpoint: an ordinary divider with Rp as the upper arm. The second term is the compensation: the amplifier's G·Rsh volts per amp, scaled by the divider ratio α. Rc does not appear. Once R3 is fitted the slope is fixed, so the circuit applies an assumed cable resistance with no limit on current.
    e Voltage at the load, and the flat condition
    Vload = V0 − I·(Rsh + Rc)
           = VFB·(1 + Rp/R2) + [ G·Rsh·α − (Rsh + Rc) ]·I
    Flat when  G·Rsh·α = Rsh + Rc
    The bracket must be zero: the rise per amp equals the loss per amp. Smaller than that and the load still sags (undercompensated). Larger and the load voltage climbs with current (overcompensated). Because α < 1, this needs G·Rsh > Rsh + Rc, i.e. Rsh > Rc/(G − 1) = 4.08 mΩ here. Use two to three times that minimum.

    Design current

    5.0 A

    The plot and table run to 1.5× this value so the overload region is visible. Nothing in the circuit clamps the compensation at the design point.

    Parameters

    Design recipe — live values

    Two targets (setpoint and slope) and three resistors, so R2 is your free choice and the other two follow. The numbers below update with the parameters.

    1 Divider ratio from the slope
    α = (Rsh + Rc) / (G·Rsh) = —
    2 Upper-arm ratio from the setpoint
    Rp/R2 = Vtarget/VFB − 1 = —
    3 Choose R2, get Rp
    Rp = (Rp/R2) × R2 = —
    See Noise resistance below for how to choose R2.
    4 Split Rp into R3 and R1
    R3 = Rp / α = —
    R1 = Rp / (1 − α) = —
    5 Check
    V0 at 0 A = —
    slope G·Rsh·α = —  vs Rsh + Rc = —
    After rounding to standard values, recompute both lines with the parts you will actually buy. 1% parts shift the setpoint by tens of millivolts.

    Computed network

    Noise resistance — choosing R2

    Switching noise couples into the FB pin as a small current. The voltage it produces is that current times the impedance seen at FB, which is ZFB = R1 ∥ R2 ∥ R3 = Rp ∥ R2. A smaller R2 lowers ZFB and makes the setpoint harder to disturb. Since Rp = (Rp/R2)·R2 and R1, R3 are fixed multiples of Rp, every resistor scales with R2. The limits come from the amplifier and the feed-forward capacitor.

    Candidate values

    Low Z  ZFB ≤ 2 kΩ, R3 ≥ 10 kΩ Higher Z  works, more noise pickup R3 < 10 kΩ  loads the INA213 output

    Limits on how small R2 can go

    INA213 output loadR3 is a load on the amplifier. At zero current it carries (Vtarget − 0.6 V)/R3. The datasheet characterises output swing with roughly a 10 kΩ load; heavier loading adds gain error. Keep R3 ≥ 10 kΩ.
    Feed-forward capacitorC_f across R1 sets a zero at fz = 1/(2π·R1·C_f). Keep R1·C_f constant: when R2 drops, R1 drops by the same factor and C_f rises by it. The table's C_f column shows the factor relative to R2 = 4.3 kΩ.
    Quiescent powerDivider plus R3 current stays below 1 mA for R2 ≥ 1 kΩ. That is negligible for a multi-amp converter and matters only for standby efficiency.

    Layout matters more than values

    Keep FB shortPlace R1, R2, R3 and C_f at the FB pin. Route the FB trace away from the switch node and inductor.
    Quiet ground for R2Return R2 to the controller's analog ground, not a power ground path that carries switching current.
    Run the long trace from the INAThe trace from the INA output to R3 can be long, because a low-impedance source drives it. The short side belongs at FB.
    Optional RC filterSplit R3 into two halves with a small capacitor to ground at the midpoint. The DC value is unchanged, so the compensation maths stays the same. Put the corner well below the switching frequency.

    Topology

    Actual cable resistance — three cases

    Response

    Voltage against load current, including overload The converter output rises linearly with current and keeps rising past the design point. Three load-side curves show the result for each actual cable resistance, against the 5.5 volt ceiling and the undervoltage thresholds.
    V0 converter Load, case A Load, case B Load, case C Out of spec Undervoltage warning

    Curves carry their cable resistance in milliohms at the right edge. All three start at the same intercept and fan out linearly, because the compensation slope is fixed in hardware while the real drop is not. The vertical marker is the design point; everything to its right is overload.

    Table

    Out of spec Below 4.63 V — undervoltage warning

    5.5 V is the vSafe5V maximum from the USB Power Delivery specification, measured at the source receptacle. 4.63 V and 4.25 V are the approximate Raspberry Pi 5 undervoltage warning and PMIC shutdown points.

    IN+ ties to V1 and IN− to V0. Swap them and VINA = V0 + G·Rsh·I: the slope changes sign, the converter lowers V0 as current rises, and the load sees twice the uncompensated drop. The amplifier would also have to swing above V0, which needs extra supply headroom.

    C_f spans R1 only. It carries switching ripple from the real output node into FB, which the ripple-based modulator needs; the R3 branch carries the amplifier's DC output and has no ripple to give.

    Many designs compensate 80–90% of the expected Rc to leave margin for cable and connector variation. Measure the far end of the cable at 0 A and full load on the built board, and trim R3 if the slope is off.