☰
CNC 3 - Motion controller
Software vs. hardware motion controller
While a trapezoidal profile is easy to calculate, and a PC is usually adequate to drive the stepper signals, consider the following two drawbacks:
- The PC has to be dedicated.
- The PC introduces mechanical jitter (shaking or reduced operating speed of the mill, due to the steppers being driven not quite at the right times):
- Software timing resolution is limited by the speed of the parallel interface.
- When multiple axes are driven together, and the steppers run at full speed, each axis receives a few 100000s pulses per second.
Since software cannot achieve exact timing on multiple axes simultaneously (software can do only one thing at a time!), mechanical jitter increases and full stepper speed may have to be reduced to compensate.
If you have an old PC doing nothing in a closet (like most of us do), don't mind have it dedicated for the CNC, have room for it, don't mind the jitter, etc... a PC as motion controller works fine.
But since here at fpga4fun, we like to listen to our MP3s and browse the web while processing our CNC jobs, all on our main machines, we built a simple hardware motion controller, based on an FPGA of course!
Hardware motion controller
An hardware motion controller has the following advantages:
- Each axis has a dedicated motion unit. That means that unlimited number of axes can be driven simultaneously. If your mill had 10 axes, all running together, that'd be no problem.
- The timing resolution of the stepper pulses is much higher than with a software solution (10 to 100 times better).
- The PC doesn't need to be dedicated, as the hardware motion units all work in parallel with the PC.
A simple motion controller was built using a Saxo FPGA board, which has a USB-2 interface so is easy to interface to a PC.
The Saxo is placed between the PC and the Stepper controller.
A custom parallel adapter was made for Saxo.