I am currently working on a project to precisely move a XY-table using stepper motors in microstepping mode. The goal is to reach 1/16 microstepping and there is an encoder with 4000 pulses per resolution to account for missed steps.

In full-step mode the steppers work correctly, but in microstepping mode the motor steps only every n-th step, e.g. every fourth in 1/4 microstepping and every eighth in 1/8 microstepping mode. This was tested by stepping at 1Hz and observing the motor.
I expected the microsteps to be approximately equally distributed within one full step (i.e. 1/4 microstepping = 1.8° / 4 per step = 0.45° microsteps), is this a misconception? If so, what is the point of microstepping if you can still only reach full steps accurately?

Several motors of different makes where tested, with the load of the table aswell as without it, but they all show this behaviour.

Hardware used is:
Stepper Motor Controller: Texas Instruments DRV8711
Stepper Motor: Nanotec ST4118S1404-B
Pulsegeneration: STM32F446ZET
Evaluationboard: Pololu High-Power Stepper Motor Driver 36v4

Any tip is helpful, as the project is missing its point without sufficiently accurate microstepping.

Currently my guess is that the stepper-drivers circuit is faulty or it is misconfigured. To address the circuitry issue we ordered an evaluation board which we will test this week.

  • \$\begingroup\$ Have you measured the currents going to the motor? It's possible your controller is the problem here, not the motor. \$\endgroup\$
    – Hearth
    May 18, 2020 at 14:15
  • \$\begingroup\$ I measured the voltage on each coil to check for the PWM, which was observed correctly. The motor current can be set in the DRV8711's TORQUE register, which is at max per default. Changing this resulted in smoother stepping for full steps, but even at maximum value the microstepping did not work. To answer directly: no we did not measure current, but pwm. I think it's pretty safe to say either the stepper-controller circuit is faulty or it is not configured correctly. \$\endgroup\$
    – dev-
    May 18, 2020 at 14:49
  • \$\begingroup\$ The current ratio is what actually matters, but measuring the voltage is probably fine. So you do see both coils being energized at once for microsteps? \$\endgroup\$
    – Hearth
    May 18, 2020 at 14:59
  • \$\begingroup\$ Yes, both coils were energized, this pattern could be observed \$\endgroup\$
    – dev-
    May 18, 2020 at 15:08
  • \$\begingroup\$ The same measurement on a bigger timebase led to this resulting image in which the oscilloscope software seems to average the pwm to a resulting voltage, but which correlates with the pattern from the post before. \$\endgroup\$
    – dev-
    May 18, 2020 at 15:16

2 Answers 2


The assumptions in your question are correct. In microstepping mode, each step is divided into a number of smaller steps. Hence, 8 microsteps mean, that a full step is divided into 8 equally long smaller steps. The limit is the mechanics. Up to 16 microsteps, you can expect the microsteps to be equidistant. After that, the mechanical deviations of the motor result in the steps being of slightly different size.

I advice you to have a look into the data sheets of Allegro Microsystems A3977 or A3979 stepper motor drivers. They have a rather detailed and easy to understand description of how microstepping works.

The pictures you mention in the comments indicate, that there is a problem with the driver. Measure the current of the motor coils. That is done by inserting a resistor and measuring the voltage across this resistor, not coil to GND. If you do that for both coils simultaneously, be aware that the GND of the probes make a shortcut. So, use DIFFERENTIAL probes. For 4/8/16 microsteps (only half-step is not enough, better use 1/16-steps mode as you intend straightaway), you should see a screen like "Figure 16. Microstepping Drive Current" in the data sheet. If this is not the case, there is a problem with the driver. As long as this is not clear, it is rather useless to guess about possible further sources of error.

The current through the two motor windings have 90° phase shift. This is absolutely essential. This is the reason, why you should check both windings. Unfortunately, the DRV8711 has no HOME-output, which is useful as a trigger for measuring the motor currents separately. If you can, get at least one differential probe and measure the currents simultaneously.

It is also essential that the windings are connected in the same polarity. The data sheet of the motor gives you details of how to wire the motor properly.

Last personal hint: Nanotec is crap! I have never met anybody in more than 30 years in electronics now, who spoke in favor of Nanotec. Having just checked the web-site of Nanotec, this was confirmed in the usual unpleasant way, Nanotec is known for. Real stepper motors are made by Oriental Motors or SANYO DENKI. Use one of these. Oriental optimizes their steppers especially for microstepping.

  • \$\begingroup\$ Thank you for your input! Sadly the osciolloscopes grounds were interconnected, but measuring the voltage on the motor current shunt worked for us. From a project pov there is a good solution now, but i did spent a lot of time looking in the wrong place... did learn a lot though. Regarding Nanotec/ Oriental: I will suggest testing a competitors product should there be a second iteration of the device, thanks for the tips! \$\endgroup\$
    – dev-
    Jun 5, 2020 at 20:12

To answer the question myself: The problem was not in the DRV8711 parameters, microstepping mode or devices used, but rather a layout issue. In Fig. 12 (p. 20) of the DRV8711 datasheet a filter is suggested to be placed in the current-sensing path. Against the suggestions given in the datasheet this lead to errors in measuring the current and thus incorrect regulation of the motor phases.

enter image description here

Taking out the capacitor (and deactivating the filter) fixed the issue, and microsteps up to 1/32 have been tested to be sufficiently reliable in Auto-Mixed Decay-Mode, with Torque adequate to the R_ISENSE and motor current. The filters frequency was in the order of ~3MHz, so the time constant is ~333 ns, which from the datasheet seems to have been to high. For now there sadly is no more time to investigate whether the suggested 50 to 60ns will have a positive impact on the signal or show the same behaviour.

  • \$\begingroup\$ @A. Schuster: Many thanks for that really practical hint. That is good to know. As I recently heard in a video: Never trust a data sheet until it is proven right. ;-) Good luck with your project. \$\endgroup\$
    – user242011
    Jun 5, 2020 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.