Show Me How to Improve Speeds and Feeds For

CNC Controller: Software, Drivers, & Boards [Complete DIY Guide]

CNC Controller: Software, Drivers, & Boards [Complete DIY Guide]

cnc controller

The CNC Controller or CNC Control is the package of electronics and software that take input either from g-code or the cnc control panel and converts it to the signals the CNC machine’s motors need to move the CNC axes.

The controller with its CNC Control Software and electronics are the most complex part of a CNC Machine.  In this article, we’ll break it down along several dimensions each of which you can then drill down on further:

  • Types of CNC Controllers
  • CNC Controller Electronics
  • CNC Controller Software
  • Choosing the Best CNC Controller for Your CNC Machine

Types of CNC Controllers

Industrial OEM CNC Controllers

Industrial OEM CNC Controllers are the ones used on Industrial CNC Machines like Haas.  They’re the very hind end of the market.

These are not very common for DIY projects due to their expense.  Not only is the controller itself expensive and fairly hard to come by (though one does see them from time to time on eBay), but Industrial OEM Controllers expect premium sub-components too.  Industrial Quality Servo Drives, Home / Limit Switches, and all the rest really run up a hefty price tag in a hurry.

While these controls are expensive, lately I’ve seen controls such as the low-end of the Siemens line coming down in price in places like eBay.  It looks like they’re testing the low-end market.  If they keep coming down, these controls may make more sense on a DIY CNC Project than it seems.

I’m not going to talk further about these controls as they’re a pretty advanced topic.  You might find the article I did that analyzes what features Hobby CNC Controllers are missing compared to industrial controls intersesting.

CNC Retrofit Controllers

Just a small step down from Industrial OEM Controllers are CNC Retrofit Controllers like Centroid.

These controllers are marketed for converting manual machines to CNC, for example, a Bridgeport manual milling machine.  They’re also sold as a way to update obsolete controls on industrial CNC Machines to bring the more up-to-date features and performance.

They’re still not cheap, but they’re starting to fall into the range of what a DIY CNC’er might afford.

PC Based CNC Controllers

There are three main players in this market:

  • Mach 3 & Mach 4
  • LinuxCNC
  • FlashCut

All three have good reputations with varying trade-offs of features, functionality, price, and ease of use.

Mach 3

Artsoft Division of Newfangled Solutions

Art Fenerty founded ArtSoft in 2001 and launched Mach 3, which was based on an offshoot of the original EMC (which is now LinuxCNC) code base.  Art wanted a CNC Controller that runs on Microsoft Windows PC’s rather than Linux, so it took a major rewrite and the two don’t share much in common any more.

According to our 2017 Survey, Mach 3 is the most popular CNC Controller at the low-end, with 47% market share.  The next closest was LinuxCNC.

LinuxCNC (My personal favorite!)

linuxcnc controller

LinuxCNC has its origins in NIST’s “Enhanced Machine Controller” project, hence its original name “EMC” and “EMC 2”.  Since the EMC corporation owns the trademark, the name was changed to LinuxCNC in

LinuxCNC is Open Source software, which means you can actually obtain the latest source code should you wish to understand or modify it.  It also means that a much larger audience, including companies like Tormach, can contribute to LinuxCNC.

While it’s extremely cool that LinuxCNC is Open Source, it’s the contributions of Tormach, and the PathPilot “flavor” of LinuxCNC that made it my favorite choice.  Having used Mach 3 for years, I can tell you that Tormach made a good decision when they moved from Mach 3 to LinuxCNC.

PathPilot is simply more stable, more powerful, and more user friendly than Mach 3, and there’s not much more you could ask for.

Now, getting your own PathPilot CNC Controller up and running for your own DIY CNC may not be quite as straightforward.  You’ll have to assemble a controller that matches Tormach’s and get a copy of PathPilot up and running on it.  There are various articles out there that purport to help.  I haven’t verified any of them yet, but if it can be done, you’ll have a sweet setup.

FlashCut

flashcut cnc controller

FlashCut is a very nifty plug-and-play CNC Controller.  The company was started back in 1993, so it’s been around a long time and the design is very mature.

While its Market Share isn’t as big as Mach3 or LinuxCNC, I’ve heard nothing but good about FlashCut.  Here’s a great video by Dave DeCaussin (one of the original founders of FADAL) showing how easy it is to set up a FlashCut system:

I’ve heard some folks say they think the FlashCut is too expensive compared to other solutions.  I put pencil to paper one time comparing it to a Mach3 system and I found that if you configure a system with all the capabilities of FlashCut (like a USB pulser for Mach3) that the premium isn’t as high as you may think.

Having a completely engineered turnkey system that’s plug-and-play is worth a bit of premium if you ask me.

Mach 4

Newfangled Solutions

Mach 4 is the newest solution in this category, and has by far the smallest market share.  It’s almost a start over from scratch rewrite of Mach 3.  The developers claim it shares less than 1% of Mach 3’s code.

It’s quite a bit more expensive, but in theory, should be better.  From my perspective, the jury is still out–not enough market share or experience to bet on it when the competition is well entrenched and has far larger installed bases.

Microcontrollers: USB, Arduino, Rasperry Pi, TinyG, & More

Microcontrollers allow CNC Controllers to be built that are cheap and fit into a small space.

CNC Microcontrollers are a relatively new development made possible by continued advances in miniaturization and software.  The idea is to put everything you need on one small circuit board, or perhaps a microcontroller board with a daughterboard commonly called a “Shield”.

Here’s a quick list of all the most popular CNC Microcontrollers:

Grbl

Grbl (pronounced gerbil) runs on an Arduino microcontroller.  It’s open source, and in use by a lot of different firms including:

Official Supporters

That’s pretty much an all-star cast, so you can be sure GRBL has a vibrant ecosystem of products and people who can help and also that it has a bright future.  The Shapeoko people told me they evaluated a bunch of these and felt GRBL was head and shoulders the winner for their needs.

TinyG / TinyG2

TinyG cnc controller

TinyG is another microcontroller-based system.  It’s related to grbl, but it’s not the same.  The TinyG codebase was forked from grbl in 2010 and has been going its own way ever since.  TinyG claims to do some things better or differently:

  • While grbl is 3-axis (XYZ), TinyG is 6-axis so can support additional rotary axes.  By default, TinyG controllers have 4 stepper motor drivers while gShield (used with grbl) has 3.
  • TinyG claims some fancy motion control algorithms, specifically “jerk” acceleration profiles for smoother motion.
  • TinyG claims its implemented on a higher performance microcontroller that has more memory.

PlanetCNC

PlanetCNC is a single-board CNC Controller that hails from Slovenia, Europe.  Like TinyG, it’s also a 4-axis solution.  In our 2017 CNC Controller Survey, GRBL had #1 market share, PlanetCNC #2, and TinyG #3 among the microcontrollers.

CNC Controller Electronics

Here’s the sort of electronics you’ll find inside most CNC Controller cabinets:

cnc controller electronics

Let’s go over the function of each.

Breakout Board

cnc breakout board

CNC Breakout Board for Parallel Port…

The role of the Breakout Board is to take a connection from your PC and generate the appropriate signals needed to operate the Motor Drives, VFD, and Contactors.

For a deeper dive on Breakout Boards, see our article:

[ CNC Breakout Boards ]

The most common breakout boards, such as the one pictured above, are connected to your PC’s parallel port.  This can be a problem, since parallel ports are obsolete and most new computers don’t have them.  In addition, there are a lot of performance and reliability issues associated with breakout boards.

Newer and more sophisticated models are actually motion control boards, though some may still refer to them as breakout boards.  These boards can connect via USB or Ethernet cable.

It’s impossible to control a USB connection finely enough to directly generate the precise pulses needed by Axis Motor Drives, so the role of a Motion Controller is to accept higher level commands and generate the pulses.  The result is much higher performance a at a slightly higher cost.

We also have a great article on Motion Control Boards:

[ Motion Control Boards ]

Motor Drives / Drivers

servo drive

Leadshine Easy Servo Drives…

Given a breakout or motion control board, your PC’s signals are converted to 2 signals:

  • Step: Each pulse on the step line tells the motor drive to move the motor 1 step.
  • Direction:  If the polarity of direction is one way, it commands the motion to be clockwise.  Switching polarity reverses direction to counter-clockwise.  In fact, polarity is perhaps not the best term as it may simply be signal for one direction and no signal for the other.

In addition to step/dir signals, the motor drive accepts DC power, and, in the case of servos, it accepts the encoder signal as well.  In exchange, it pumps out power to the motor in such a way as to control its motion.

DC Power Supply (Not Shown)

The photo above did not show a DC power supply because the motor drives used are capable of accepting AC.  That’s very convenient, but not always the case.  You may need to purchase or build a DC power supply to provide power to your motor drives.

One of the first CNC Controllers I built used this DC Power Supply:

Contactors

Contactor is a fancy name for a relay capable of being used for higher voltages.  In this case, most contactors are used to switch AC, for example to control a coolant pump.  Your breakout board typically supplies a 5V DC signal.  The Contactor’s job is to turn on (or off if normally closed) AC power when the 5V signal is on and turn it back off when the 5V signal goes away.

VFD: Variable Frequency Drive

Powering and controlling a CNC Spindle is a job for a Variable Frequency Drive, abbreviated VFD.

Choosing and programming a VFD is a complex process that we can’t go into here.  For starters, you’ll want to make sure your VFD has enough power to run your spindle motor.  There are a number of different kinds of VFD, but the best bang for the buck comes from something called a “Sensorless Vector Drive.”

Choosing the Best CNC Controller for Your CNC Machine

Choosing the Best CNC Controller for your CNC Machine is a matter of balancing some important trade-offs:

choosing best cnc controller

Trade-Offs when choosing the best CNC Controller…

The trade-offs boil down to all-out performance versus ease-of-success.  A simple turnkey kit that has everything you need is pretty easy to get running.  But, it may sacrifice some all-out performance relative to carefully cherry-picking the very best of each component for your application.

Ask yourself where you skill set and interests lie.  It will take longer and very likely cost more to get that all-out solution up and running reliably.  It will also take a lot more skills.

Are you good at diagnosing problems in electrical circuits?  Can you read through all the spec sheets and properly determine which components are compatible with one another?  Do you enjoy all that?

If the answer is “Yes” to those questions, you’re in a better position to try all the “bleeding” edge (i.e. leading edge) goodies in your project.  If the answer is “No”, look for a proven kit that has everything you need and a large community of folks you can turn to with questions.

Market Share of Different CNC Controllers

Speaking of community, I think they’re critically important to the success of DIY projects.

I’ve been on that Bleeding Edge where nobody can help or answer questions and it can get lonely.  These days, I prefer to choose products that have a decent-sized community.  I like to see evidence that others have already accomplished what I’m looking for with the components I’m considering before I take the leap.

You’ll find you can get 80% of the performance with only 20% of the pain if you take that approach.

To have a decent community, products need a lot of users.  You can learn more about the market share of various controls from our CNC Controller surveys:

[ CNC Surveys ]

CNC Controller: Software, Drivers, & Boards [Complete DIY Guide]
5 (100%) 4 vote[s]