A4988 stepper driver repair

Top: showing the potentiometer being replaced by a resistor pair.

2 out of the 4 stepper drivers I recently received arrived broken. A quick check with a multimeter showed that the potentiometers used to set the maximum current were defective. Without time to wait for replacements, and without this package of smd potentiometer on hand, I decided to just solder two 0805 resistors in place.

The values are calculated using  I_{MAX} = V_{REF}*8*R_{CS} where  V_{REF} is the output voltage of the resistive divider consisting of the potentiometer and R1(30kΩ),  I_{MAX} is the maximum current and  R_{CS} is the current sense resistor (R4 and R5 in the image below; 0.1Ω).

Broken potentiometers; probably a manufacturing error.
Top: repaired stepper driver set at ~1.2A; Bottom: original stepper driver