A CNC is a controller that drives a cutting machine. The most popular cutting machine is a milling machine.
A simple milling machine has 3 axes, while more complex machines have 4 axes or more.
Here's a simple 3-axis milling machine. Each axis is controlled manually with an handle.
On a CNC machine, each axis is moved by a motor, and a controller to precisely control the motors rotations. For example, let's say each turn of a motor makes an axis move by 1mm. To move by 3mm, you need 3 turns. How does the controller make sure the motor turns exactly 3 turns?
Two types of motor are commonly used: stepper motors and CC motors (CC = continuous current).
Stepper motors typically use open loop motion control, while CC motors use closed loop motion control.
Before explaining what that means, here's a summary of the motors capabilities.
Motor type | Stepper | CC |
---|---|---|
Loop control | Open | Closed |
Complexity | Low | high |
Cost | Low | High |
Motion speed | Medium | High |
Precision | Very high | High |
Axes sync. | Very good | Good |
Idle stability | Good | Fair |
Efficiency | Low | High |
Stepper motors can be seen as motors controlled by electrical pulses. Common stepper motors require 200 pulses per rotation, so by sending 600 pulses, the motor should make exactly 3 turns. This is called "open loop motion control" because there is no mechanism that checks that the motor turns as expected. Instead the user relies on the known characteristics of the machine/motors combination. The main drawback of stepper motors is the possibility of "missing steps" if driven too fast, so stepper motors are always used at conservative speeds (i.e. with enough margin to avoid missing steps).
CC motors don't use pulses, but continuous current, which is simpler than pulses, but getting exact motion is more complex. To get 3 turns, the controller needs to send some current to the motor, and needs a way to monitor the rotation, so that it stops sending current once the 3 turns are achieved. This is called "closed loop control" because of the mechanism that monitors the motor rotation. This allows for faster operation and efficiency, but is more complex and slightly less precise than stepper motors.
fpga4fun's milling machine uses stepper motors (like most hobbyist machines do) so that's what we'll concentrate on.