Z speed - Closed loop stepper is AMAZING

I finally got around to installing and testing a closed-loop stepper motor + controller I got over a year ago. I got a clue that it was amazing when I had it and the standard V1 Eng NEMA17 steppers in vises on my bench and could not stall the closed-loop one with my hand no matter how hard I gripped the coupler (Wear a leather glove!). The open-loop stepper was pretty easy to stall by grabbing it.
Now that the closed-loop stepper and controller are installed on my souped up portable Primo MPCNC, I am blown away. It is powerful, fast, and doesn’t even get above 30C because closed-loop means it is only amping up the current as needed to get to where you commanded it to go. I took off the water cooling I was using for the old Z stepper.

Here are some details:
Stepper motor (NEMA17): 42BH250-60B
Controller: HB808C Hybrid Servo Drive
I got these from Aliexpress (OrizerCNC store) for about ÂŁ60
https://www.aliexpress.com/item/33019454657.html
[Note: Closed-loop steppers have a rotary encoder in them that is a thin glass disk, so you must be careful not to drop them or bang on them with a hammer.]

By following Uncle Dick’s “skid the wheels” advice, I have now pushed this thing past where it can keep up and it throws a position error. Then I backed off on speed and/or acceleration to get what I feel is a very reliable motion with absolutely no error and repeatability of better than 5 microns for a 10mm jog. Let that sink in. But wait:
I hope you are sitting down for this one. My massive Z axis, with its water-cooled 1.5kW spindle, can now jog 50mm up or down at up to 160mm/sec!! That is a measured rate using my oscilloscope looking at the pulses, averaged over the time it took (312 ms). That was with 2000mm/sec^2 acceleration, and commanded to go 16,000mm/min (267mm/sec). There is a bit of a clunk at the end of an upward movement when the rotation is suddenly halted, so I am going to go with only 1500mm/sec^2 acceleration and a max commanded speed of 250mm/sec. No clunk. This gives an actual measured average speed for a 50mm up or down jog of 135mm/sec. This is compared to my good old V1Engineering open-loop stepper that gave a max of 42mm/sec no matter what I optimized, and it got very hot. If you have been following my upgrades you will know I am using 40V for all the steppers. (That is two 24V supplies in series, regulated to 40V by a RuiDeng power supply which has all sorts of settable protections.)

Here is a video showing its speed and repeatability.

You may be asking “Why would I want to have such a fast Z axis?”
Two things I do often have a lot of Z motion: V-carving and carving terrain models. Up until this momentous day, the rate at which I could move in 3D has been limited by the Z axis’s top speed, and if I exceeded that even for a moment and lost steps, my carving would be destroyed.
NO MORE! Now all three axes can go faster than the wood and the bit will tolerate.
Also, if you are doing drawing with a pen or making a photo-carve or halftone carving of an image, your machine will do a lot of vertical rapids, lifting the tool to another location. This closed-loop stepper will make the whole toolpath execute much faster.

One more thing - SAFETY: I spent considerable time figuring out how to gracefully deal with a “position error”, which the controller throws if it can’t get to the commanded location in some small number of ms.
A red LED starts blinking and it rapidly cuts power to the stepper motor. Thankfully, it has Alm+ and Alm- outputs that are normally very high impedance, and go to a near short when an error happens. I am using this signal to trigger two mechanical relays:

  1. A 12V signal that my E-Stop switch uses to brake the spindle motor in 1 sec.
  2. A 5V signal on the other half of my E-Stop switch that triggers the GRBL DOOR alarm. This halts feed and pulls the spindle up out of the workpiece.
    To reset the closed-loop stepper driver, I have to power cycle it using the ON/OFF button on the RuiDeng power supply. I don’t imagine this position error will ever happen as long as I keep the Z speed and acceleration to the settings I tested above, but just in case, I wanted to be sure that it would not just stop the Z while still trying to cut, burning wood and breaking bits.
10 Likes

Nope, never even entered my mind :smiley:

Wow!

Did you do the closed loop stepper only on Z? You’re still using the open loop steppers on the other axes?

Tool man dreams more power,more speed! Now I have to get more toys

Yes, I did not mess with the X and Y steppers or controllers, as they already move very fast. The only time I missed steps was when the bit got in resonance (howling) and pulled itself off course. I was going too fast with an unnecessarily long reach (machine flex, mostly Z assy.). I raised the material on some 18mm ply to reduce reach and resonance was cured.

2 Likes

That is freaking cool!!!

How are you using that encoder? What processor and firmware, I remember the control box but not what is in it?

1 Like

What is the step resolution, you said no microstepping and those things are crazy silent. Last time I used full steps it was very clear I was doing something different.

1 Like

All the smarts are in the HB808C Hybrid Servo Drive:

Google Photos

This is on the cheap side of closed loop stepper controllers; I am sure there are better ones with more features.

3 Likes

I am running grblHAL firmware on a Teensy 4.1 microcontroller, and using Phil Barrett’s Breakout Board. The computer is running IOsender, and talking to the Teensy via an Ethernet cable.

I clocked the pulse rate during the fast parts of the jog at 20kHz. This hybrid servo drive can go quite a bit faster, up to 150kHz pulse frequency. I use 5us pulses.

3 Likes

I have the z steps setting in grbl set to 100.7 steps per mm. With a 2mm/rev leadscrew, that’s 201.4 steps/rev. I realize the motor is exactly 200 steps/rev. I can only guess the discrepancy (which is after careful calibration with the dial gauge in the video) is due to errors in the pitch of the leadscrew, in the dial gauge, or some backlash in the system. What do you think?
The important thing for me is that it actually moves the correct distance, and as you see in the video, it is better than 5 microns across 10 mm or 0.05% error.

The stepper driver DIP switches are set to all On, which is the default setting of no microsteps, I think.
I have not actually looked at the pulses going to the motor with the scope, but that would be interesting, given that the DSP in the driver is doing all sorts of magic to get the travel right, based on what the encoder is reporting.

2 Likes

Here is the manual, if anyone cares about the details. I have not delved into the software that can be used to reflash this driver to change its behavior because the .exe is in Chinese.

2 Likes

Wait, so you are not doing anything on the control side it is all built in to the driver and stepper!!! Whoa, I guess that kinda makes sense now that I hear it, I assumed the controller needed to read the encoder, but as long as the driver knows what to do why bother. Oh…this could open a whole new world.

2 Likes

There are a few integrated PCB closed-loop controllers for nema17
Wonder if they’re as good as this, but it could be a cheap/easy alternative

Or


Just having some information about stall could greatly help stopping the job in case of skipped steps

1 Like

Yeah I was just poking around at those. Someone in the forums here did a deeper dive on them and they are great, but something in the firmware on the breakout board is messed up. I can’t find it yet. Another “pro version” option.

1 Like

I have my doubts about whether these cheap closed-loop stepper controllers would be any good for CNC, because what they are using for position feedback is FAR INFERIOR to the 1000 lines/rev glass optical encoder on my closed-loop stepper motor. They glued a magnet to the back end of the shaft, and over that is a Hall Effect angle encoder chip (MT6816) that has limited accuracy and is sensitive to temperature changes and magnetic fields (which a stepper motor has lots of!). Feel free to buy one, install it, measure it, and prove me wrong. Your benchmark to beat is a repeatability of better than 0.05% of commanded travel.

3 Likes

Steve’s upgrade sure sounds like a nice Pro feature to me.

Dug around some common stepper websites. Anyone already considered Stepperonline’s closed loop drivers and steppers?

Haven’t dug into spec sheets, but are these specs comparable?

If end up with repeatability less than ideal, then, Maybe firmware can be configured/modified to backoff feedrate if there’s a pin that triggers when compensation is actively occurring.

Not trying to prove anyone wrong :slight_smile:

Just a remark saying that the setup looks a bit “involved” with external drivers, a controller, a pc, a sender, and a lot of wiring
Nothing wrong with this, but the LR3/MPCNC have a kind of “simple” approach to them with an all-in-one board like the Jackpot, which is both probably cheaper and a lot simpler to install/configure
I was just wondering if we could get most of the functionnality (avoiding and/or detecting skipped steps, which I still get quite a lot) with something simpler

That’s exactly were I’m at… if I can just have the machine go in pause/parking and alert me whenever something fishy is detected, that’s already pretty good for hobby-grade in my book…

1 Like

StepperOnline has good quality closed-loop driver/motor combos, a step or two above the cheap one I got for the MPCNC. I know because I got a NEMA23 one with a CL57T driver from StepperOnline for another project. You will not get free shipping as you will with Aliexpress, so factor that in to the cost. My HB808C has a top input voltage of 80V vs 50V for the StepperOnline one. And my motor is a bit stronger than the one you quoted above, 0.65N-m vs 0.52N-m. But with StepperOnline you will get a nice paper manual in English! Well-made cables, too. These are what TheHardwareGuy chose for his scratch-built CNC.

2 Likes

Yes! I agree that my approach is overkill for most people here. As I said in my first upgrade post, the Primo kit worked very well out of the box as supplied by V1 Eng, and has only gotten better since then (e.g. Jackpot vs. Rambo).
Before I put in this closed-loop driver on my Z axis, I had already upgraded to a TMC2160 driver that has lost step detection (StallGuard). That may be all you want, to just halt the machine if a step is missed and you can back off on the feed rate or whatever.

The bonus I wasn’t expecting with the CL driver is the huge increase in torque at high speed.

2 Likes