Ultimate Benchtop CNC Mini Mill: Part 3 - Closed Loop vs Open Loop

Last modified: February 25, 2024

Black cylindrical component with white plate and various holes.

Here is the third installment of our Ultimate Benchtop CNC Mini Mill design series. The first part focused on the choice of the Donor Mill, while the second part dealt with the selection of your CNC mechanical components, specifically leadscrews, ballnuts, motor mounts, and the drive system. In this third part, we'll delve into the hotly debated topic of Closed Loop vs Open Loop (steppers vs servos).

Introduction:  Lots of Choices

The first thing to note about this segment of our DIY CNC Mill Design Series is that there are a LOT of choices around how to drive the ball screws for your machine's axes.  In the interest of brevity, we're not going to dive into every single nook and cranny of this complex world.  I want to touch on the most important questions over the course of this article and the next one:

That'll give you a lot of data with which to start doing the research around your own project so you can decide on a price performance basis what will work best for you.  In this article, we'll focus on Open Loop vs Closed Loop.  For the next article, we will focus on Motor Sizing and Choices.

Servos vs Steppers (Closed vs Open Loop?)

Let's jump right into an area that has been controversial among hobbyists forever, but that is not controversial at all for pros.  I'm talking about the choice between using servos or stepper motors to drive your axes.  This might more properly be referred to as a choice between open loop (steppers) and closed loop (servos, or steppers with encoder feedback).  Each piece governs a bit different aspect of the question-open versus closed loop and motor type are the two pieces.  It's important to keep the two pieces separate lest things become confusing.  For example, we often say "servos vs steppers", but then how do we refer to a stepper motor with encoder feedback?  That's why I prefer to keep the issue of close loop vs open loop and motor type separate.

Open Loop vs Closed Loop

Let's start with the question of whether there is a feedback loop.  The vast majority of hobby-class CNC has no feedback loop, hence it is an "Open Loop".  The vast majority of pro-class CNC is Closed Loop, and has that feedback loop.  A feedback loop implies there is a sensor of some kind that tells the drive and/or the controller software how much the motor moves.  Typically, that sensor is a rotary encoder based on an optical disk that goes on the motor shaft and often appears integral to the motor.  The photo at the top right shows the Y-Axis drive motor for my IH Mill.  The box at the closest end of the black motor houses the encoder.

If you pop the cover off an optical encoder it looks something like this inside:

Optical shaft encoder featuring light source, photodetector, and encoding disk.

Inside an Optical Shaft Encoder...

You can clearly see the little glass disk that spins with the motor and allows the encoder to measure how much the motor has moved via the optical sensor in the brown housing.  BTW, it's important to note that while there are absolute position encoders, that can tell exactly what position a motor's shaft is in, the encoders commonly used with CNC servos only care about relative motion.

How does it help to know the motor's relative motion?

Understanding how it helps to know the motor's relative motion is really the heart of the Open Loop vs Closed Loop discussion.  For starter's the motor controller can use the information to do a better job controlling the motor.  It can create an extremely broad and very flat torque curve, much broader and flatter than an open loop system, for example.  What's more important is what this knowledge can do at a higher level.

As your g-code commands your CNC to cause the cutter to trace a path over the workpiece, a lot is going on.  The cutter is accelerating and decelerating constantly.  It's doing that in the face of wildly varying resistance to its motion, and the motor has to generate enough force to overcome that resistance.  The encoder helps generate more torque at very slow speeds, which is a good thing, but it also helps discover when the motor has fallen behind where it should have been.  It will come as a surprise to many, but the motor may not, and in fact often does not exactly track the motion that is commanded of it.  Any time the force required to stay on track is more than the motor can produce, it falls behind.

With a closed loop system, the amount by which the motor has fallen behind is called the following error.  The closed loop system will attempt to catch up to the desired location the next time it has more force available than is required.  If the following error becomes too large, the system will fault.  That typically means an alarm and the system stops.  Most of the time, the machine will catch up and there will be no fault.  This means you can expect the cut that was made to have been accurate within the limits of the following error, which is a good thing.  What's particularly good is that the limit was verified because the closed loop system monitored the encoder feedback to make sure the job got done.

Now there are big tables of pros and cons available on the stepper versus servo controversy that talk about things like rpm ranges and torque limits and so on.  They're interesting, but for me, I think they miss the point relative to what's happening with Following Error.  Yeah sure, there is a certain size of machine that really should always run with servos.  There may be a certain (small) size of machine that is maybe always better off with steppers.  This all based on rpm and torque.  But all machines are affected by Following Errors and it's important to think about what that might mean for your machine too.

What causes following errors?

As mentioned, following errors happen when the motor can't provide enough force to perform the commanded motion.  There are a variety of pretty common cases where this can happen:

There are probably other kinds of circumstances that will trigger faults, but you get the idea of the sort of thing that's going on.

Lost Steps:  Open Loop's Achilles Heel

If your machine is Open Loop, and the vast majority of hobby systems are, you will experience Lost Steps.  I've heard a lot of explanations why you shouldn't care about lost steps.  Let's talk about the two most common ones:

Steppers make a distinctive noise when they're losing steps so you know whenever it's happening.

They do make a distinctive noise, the question is whether you will hear it.  Consider my example of the stick slip.  You're jogging the axis along 0.001" at a time for a touch off.  Any noise being made is extremely short at best.  Was that a lost step?  Am I hearing things?  There's no way.  It might not matter.  If you're touching off, you're presumably going to zero your DRO's when you get the touch off done.  If steps were missed in jogging, that doesn't matter.  But let's ask a different question.  Lots of CADCAM simulates curves with lots of tiny steps.  Can we inadvertently trigger a stick-slip lost step that way?  Depends.  For something very intricate, when you first start the axis moving, or if the axis is moving particularly slow, yes, you can.

The question about hearing it will have to do with what else is going on in your shop.  Is it a noisy environment?  Are you off doing something else while you machine works and you're mind isn't really focused on the sound of the steppers?  Is there more than one machine with steppers?  You begin to see why the professionals favor servos rather than manually monitoring their stepper-based machines for lost steps.

A properly designed stepper system doesn't lose steps.

My goodness I hear this a lot from the stepper lovers.  Personally, I think it is horse hockey.  Go back over my list of servo fault causes and you'd have to do a lot to head all of them off at the pass.  Just a few to get started:

That list could probably go on for quite a ways.  To the proposition that a properly designed machine doesn't lose steps I will usually respond that there are no properly designed machines coming out of DIY CNC efforts.  There are probably precious few coming out of manufacturers as well if the criteria is machines that never ever lose steps.  The only real way to "properly design" an open loop system so that it doesn't lose steps is to be incredibly conservative in that design.  Consider using a torque reserve of at least 50% more than what you might otherwise require with a closed loop system, for example.

I'm not trying to be overly hard on steppers, I am just pointing out their limitations and some ways of getting around those limitations.  As we will shortly see, I recommend steppers for beginners who've never done a conversion before as the only way to go.

Just keep in mind that particularly if you want to use your machine to produce a lot of parts, you're going to find steppers can be problematic for reliability unless they're used extremely conservatively.  The most common thing one hears from shops with both kinds of machines is that if they want to run the stepper machine all day long they have to check the parts frequently throughout the day to see if steps have been lost and tolerances are drifting.

One thing to consider for a stepper-based machine:  if you have an accurate set of home switches, rehoming the machine after each part can recapture the lost steps positionally and ensure the next part is good.  Losing a step or two here or there is usually okay.  It's the build up of lost steps all day long making lots of parts that creates problems.  If you can't rely on homing to clean it up, you'll need to inspect your parts frequently.  How frequently?  This can be learned from experience.  If it was me, I'd probably try monitoring hourly for a few hours then increase to every 2 hours, and so on until I was getting all the parts off within tolerance.  Incidentally, for really tight work, you have to do the same with a closed loop servo system.  As in so many things, it isn't black and white, we're talking about matters of degree.

Taking the Loop Back to the Controller or Just the Driver

Sometimes I hear the argument that there's no point in using a closed loop system with control software like Mach3 because the feedback loop isn't taken all the way back to the control.  Let's drill down on what that means and see if the proposition that closed loop doesn't matter for Mach3 and similar software holds water.

When the loop isn't closed back to the controller, it means the controller is not aware of what the encoder is reporting.  The drive, however, is still getting that information.  What that means is that the drive can still fault if the following error becomes too great and report that fault back to the controller.  The drive can also attempt to catch up to the desired position if it finds itself with excess force available before the following error becomes too great.  In other words, a great deal of the closed loop advantage is still available even though the loop doesn't go all the way back to the controller.  In fact, all of the problems we have discussed so far that closed loop solves are still solved.

So what is missing when the Feedback Loop is taken all the way back to the controller?

It turns out there are a number of clever tricks tricks the controller can perform when the loop is closed back to the controller:

By now you're getting an idea of what kinds of limitations not closing the loop all the way back to the controller brings.  The most important advantages of Closed Loop are preserved even just closing the loop back to the drive.  What's left is certainly nice to have, but not necessarily make-or-break, especially on a hobby class machine.

Closed Loop Steppers:  Hybrid Choice

Before I move on from the subject of Closed Loop versus Open Loop systems, I want to touch on the hybrid choice that uses both Steppers and Encoders to create a closed-loop stepper-based system.  Closed loop steppers are a relatively recent development for the DIY market, although they've been talked about since the mid-2000's.  They offer the prospect of delivering the advantages of the servo world using lower cost steppers.  I had one manufacturer of stepper-based CNC machines tell me their tests had shown the best bang for the buck was the hybrid closed loop stepper with respect to the cost of delivering a given amount of torque with a closed loop system.  That sounds very promising indeed for DIY CNC machines.  Compared to traditional servos, closed loop steppers offer higher torque at low rpms and lower costs.  Above about 500 rpm, the traditional servo can produce more torque.  Being able to generate more torque at higher rpms may be important to your application.  Refer back to Part 2 of our series for more discussion on matching the motor's torque peak to the drive ratios and intended travel speeds of your CNC.

Conclusion:  Beginner and Pro Choices

So which method should we choose for our hypothetical DIY CNC project?

1.  Open Loop Stepper

2.  Closed Loop Stepper

3.  Closed Loop Servo

The choice should be based on your experience level and the desired performance characteristics of the system as well as your budget.

For beginners, I recommend starting with an Open Loop Stepper based system.  The reason is simplicity.  With Closed Loop systems, there is a fair amount of additional complexity involved.  You'll need to deal with the encoder and it's attendant wiring.  You may also need additional electronics to deal with handling the servo fault condition with control software like Mach3.  The signal levels involved with the encoders are low compared to the potential for noise from the motor control wiring and other sources.  This can lead to problems you'll have to troubleshoot.  In my own servo-driven IH Mill project, I made sure to use shielded cables for the encoders, and I ran the cables to they weren't near the servo power cables, but I still had noise problems.  The problems were ultimately fixed by adding a bypass capacitor to the US Digital encoders on my servos (search "HEDS" in this link for more info), but I would never have guessed that if Mariss Friemaniss hadn't run a post on CNCZone at about the same time talking about how susceptible to noise these particular servos were.  Lastly, you will have to deal with servo tuning, which is another new thing to learn about that can be complex, require special tools like an oscilloscope, and generally be frustrating to a beginner (I lived through it and tell how in this link).  If you've never done a CNC conversion, Closed Loop can add a lot of additional complexity.  Most hobby class machines use Open Loop Steppers, and with the caveats and limitations I have mentioned, they work well.

On the other hand, if you have some experience with CNC and you're determined to get as much performance and capability as possible, you should consider a Closed Loop system.  It's going to be more costly, but it will also perform better, and once you've worked the bugs out, it will be more reliable (no lost steps).  You will need to decide whether to use a Closed Loop Stepper or Servo-based system.  I would base that decision on a few factors.  One will be your research and how comfortable you are with the sources for such drives and motors.  Two will be the rpm requirements of your application.  Some applications require fairly high rpms and are better done using servos than steppers.  Three, and this is an important one I always recommend, will be the ecosystem available to support your efforts.  By "ecosystem", I mean whether you can find an active online community of others using the components you've chosen who can help you with your troubleshooting.  There's a lot of folks over on CNCZone using Geckodrives, for example.  Should you be well-heeled enough to be choosing Fanuc components (just by a VMC if you are for crying out loud, LOL!), there is a large community there too.  Look for the presence of such a community and ask questions before you make your purchases.  You won't be sorry!

One last thing.  This article series is about DIY CNC mills.  Other kinds of CNC machines have different requirements.  I wouldn't bother with Closed Loop on a plasma table, for example.  The accuracy requirements are so much less that you can afford to lose a tremendous number of steps before there are problems with a plasma table.  A woodworking-only CNC Router needs more accuracy, but can probably still get by in most cases without Closed Loop.

Our next article will talk about different motor types and how to size the motors for your project.

Be the first to know about updates at CNC Cookbook

Join our newsletter to get updates on what's next at CNC Cookbook.