Aziz Bench

Stepper driver Vref calculator

Pick the driver, read the sense resistors on the board and enter your motor’s current: you get the voltage to set on the potentiometer, and what it means in peak and RMS current.

Set Vref to
0.69V
694 mV on the multimeter · A4988, Rs 0.068 Ω
Current limit (peak)
1.28 A
RMS per coil
0.9 A
Share of driver rating
64 %of 2 A
Where to measure
VMOTGNDGNDA4988RsVREF0.69 V
Driver
What do you want to do?
Ω

The two small resistors next to the chip. R is the decimal point: R068 = 0.068 Ω, R100 = 0.1 Ω, R110 = 0.11 Ω.

Motor
A

Per phase, from the motor’s datasheet or label: 1.5 A to 2 A for many NEMA 17 motors.

%

A little below the rating keeps the motor and driver cooler. Raise it if the motor skips steps.

What to consider

Plain text, for your notes or a forum post.

How Vref sets the current

The driver compares the voltage across its sense resistors with the reference voltage from the potentiometer, and stops the coil current from rising past the point where the two match. So the current depends on two things only: Vref and the value of the sense resistors.

A4988     I limit = Vref ÷ (8 × Rs)
DRV8825   I limit = Vref ÷ (5 × Rs)
TMC2208/9 I RMS = (Vref ÷ 2.5 V) × 0.325 V ÷ (Rs + 0.02 Ω) ÷ √2

Example: an A4988 with 0.068 Ω resistors and a 1.5 A motor run at 85 %. The limit is 1.275 A, so Vref = 1.275 × 8 × 0.068 = 0.69 V. A TMC2209 with 0.11 Ω resistors set to 1.275 A RMS needs Vref = 1.275 × √2 × 2.5 × 0.13 ÷ 0.325 = 1.80 V. On TMC drivers Vref stops having an effect at 2.5 V.

Drivers and sense resistors

DriverFormulaUsual sense resistorVref for 1 ACurrent
A4988Vref ÷ (8 × Rs)0.068 Ω (Pololu), 0.05 Ω0.54 V1 A, 2 A with cooling
DRV8825Vref ÷ (5 × Rs)0.1 Ω0.5 V1.5 A, 2.2 A with cooling
TMC2208(Vref ÷ 2.5 V) × 0.325 V ÷ (Rs + 0.02 Ω) ÷ √20.11 Ω1.41 V (RMS)1.4 A RMS
TMC2209(Vref ÷ 2.5 V) × 0.325 V ÷ (Rs + 0.02 Ω) ÷ √20.11 Ω1.41 V (RMS)2 A RMS

Pololu A4988 carriers made since 2017 have 0.068 Ω resistors (earlier ones 0.050 Ω), Pololu DRV8825 carriers 0.100 Ω, BIGTREETECH and FYSETC TMC2209 modules 0.110 Ω. Clones vary, so read the marking on your board. Currents: A4988 and DRV8825 from Pololu’s carriers, TMC from the datasheets.

Reading the sense resistors

They are the two small resistors near the driver chip, usually 1206 or 2010 size. The marking uses R as the decimal point: R050 is 0.050 Ω, R068 is 0.068 Ω, R100 is 0.100 Ω, R110 is 0.110 Ω and R200 is 0.200 Ω. If the print is unreadable, the seller’s page or the schematic of the board usually gives the value.

Peak or RMS?

The A4988 and DRV8825 set a current limit, which is the peak of the sine wave when microstepping: the RMS current in each coil is about 70 % of it. In full-step mode both coils carry about 70 % of the limit all the time. TMC drivers are set directly in RMS current.

A motor’s rated current is the current per phase with both phases on. Setting a TMC to that value as RMS heats the motor about as much as running it in full-step mode at its rated current. That is also why the same percentage gives a motor more current on a TMC than on an A4988: compare the RMS figures in the readout.

How to set it safely

  1. Power the board: on 3D printer boards that means the main supply, not just USB.
  2. Put the black probe on a GND pin and touch the centre of the potentiometer, or the REF test point, with the red one.
  3. Turn in small steps with a plastic or ceramic screwdriver; the direction that raises Vref differs between boards, so watch the meter.
  4. Switch off before connecting or disconnecting the motor.
  5. Run the motor for a few minutes and check its temperature: warm is normal, too hot to keep a finger on means the current is too high.

If the TMC driver is controlled over UART, skip the potentiometer: set the current in the firmware.

Frequently asked questions

What Vref for a 1.5 A NEMA 17 on an A4988?

With 0.068 Ω sense resistors, as on Pololu boards since 2017: 0.82 V for a 1.5 A limit, 0.69 V at 85 %. With 0.1 Ω resistors (R100): 1.2 V and 1.02 V.

And on a DRV8825?

With the usual 0.1 Ω resistors, Vref is half the limit: 0.75 V for 1.5 A, 0.64 V at 85 %.

And on a TMC2209?

With 0.11 Ω resistors (BIGTREETECH, FYSETC) Vref is the RMS current × 1.41: 1.27 V for 0.9 A RMS, 1.80 V for 1.275 A RMS. Above about 1 A RMS the module needs a proper heat sink and a fan.

Why does my stepper motor get hot?

Steppers draw current even when standing still, so they always run warm. If it is too hot to touch, lower Vref by 10 to 20 % and check that the motor still doesn’t skip steps. With a TMC over UART, a lower hold current in the firmware also helps.

What happens if Vref is too low or too high?

Too low: the motor loses torque and skips steps, above all at speed. Too high: motor and driver overheat, and the driver’s thermal protection switches it off for a moment, which also shows up as skipped steps.

Does Vref matter if the TMC2209 runs over UART?

With Marlin, no: Marlin switches the driver to its internal reference and sets the current from X_CURRENT and the other axis settings. In Klipper you set run_current.