MPCNC: Stepper Motor Back EMF

A plot of the back EMF for an  Automation Technology KL17H248-15-4A stepper motor looks like I’m making stuff up again:

KL17H248-15-4A stepper motor - Back EMF vs RPM - data

KL17H248-15-4A stepper motor – Back EMF vs RPM – data

Maybe the only questions I ask are ones with linear solutions?

Anyhow, the data comes from the Z-axis motor in the lathe:

Stepper back EMF test setup

Stepper back EMF test setup

Scary-looking, but reasonably safe. The chuck holds the motor shaft so it’s not going anywhere, the boring bar prevents any rotation, and the motor bearings do exactly what they’re supposed to. Shorting the motor leads would definitely put a hurt on the PLA frame, so I didn’t do that.

The scope sat on the floor beside the lathe, capturing waveforms and doing calculations:

Motor Back EMF - 500 RPM

Motor Back EMF – 500 RPM

Some waveforms look bent:

Motor Back EMF - 300 RPM

Motor Back EMF – 300 RPM

I asked the scope to measure the RMS voltage, rather than the peak, because it’s less sensitive to distortions.

Each winding produces one electrical cycle across four mechanical full steps, with the windings in quadrature. One shaft revolution thus produces 200 / 4 = 50 electrical cycles, so converting from shaft RPM into electrical cycles/s goes a little something like this:

Electrical cycles/s = (shaft rev/min) * (50 cycles/rev) / 60 (s/min)

Which works out to a tidy 0.833 Hz/RPM, basically spot on the last data point’s 839 Hz at 1000 RPM.

The motivation for this comes from the third column in the scribbles: back EMF = 22.7 mVrms/RPM = 32 mVpk/RPM.

A rapid move at 12 k mm/min = 200 mm/s shows the motor current collapsing to the ragged edge of not working:

G0 X 200 mm-s - 24V 200mA-div

G0 X 200 mm-s – 24V 200mA-div

Converting motor speed to shaft RPM:

RPM = (axis mm/s) / (32 mm/rev) * (60 s/min)
RPM = (axis mm/min) / (32 mm/rev)

So the shaft turns at 375 RPM when the X axis moves at 12 k mm/min, with each motor generating 8.5 Vrms = 12 Vpk of back EMF.

The MPCNC wires the two motors on each axis in series, so the 24 V power supply faces 24 V of back EMF (!) from both motors, leaving exactly nothing to push the winding current around. Because the highest EMF occurs at the zero crossing points of the (normal) winding current, I think the current peaks now occur there, with the driver completely unable to properly shape the current waveform.

What you see in the scope shot is what actually happens: the current stabilizes at a ragged square-ish wave at maybe 300 mA (plus those nasty spikes). More study is needed.


  1. #1 by Jason Doege on 2018-01-26 - 08:25

    I wonder if the back-emf waveform at any given velocity is the best waveform to use for micro stepping.

    • #2 by Ed on 2018-01-26 - 09:23

      I think the bent waveforms may be transient events from my … casual … test setup. The PLA motor mount (a.k.a., the top of the MPCNC Z-axis stack) isn’t absolutely square to the motor and tended to wobbulate ever so slightly as the shaft turned. I tried to take representative pix, limited by my desire to not have, oh, the chuck sweep up the wires.

      I expect some cycle-to-cycle variation due to winding and rotor imperfections, although they’re surely small compared to the stepper driver’s rough-and-ready sine wave approximation + PWM current tweaking.

      Bottom line: no clue!

  2. #3 by dithermaster on 2018-01-26 - 09:28

    The ETC MicroVision lighting control console uses a stepper as an encoder and it’s the best feeling encoder I’ve ever used. The magnetic detents are sublime.

    • #4 by Ed on 2018-01-26 - 10:46

      IIRC, the LinuxCNC folks had some DIY stepper-as-encoder designs, using low-value resistors for both detents and voltage outputs. I should get a handful of miniature motors and try it out.

      Thanks for the suggestion!

Spam comments vanish. Comment moderation may cause a delay.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s