Home
Welcome
Information


FPGA projects
Basic
Music box
LED displays
Pong game
R/C servos
Text LCD module
Quadrature decoder
PWM and one-bit DAC
Debouncer
Crossing clock domains
External contributions

Interfaces
RS-232
JTAG
I2C
EPP
SPI
PCI
PCI Express
10BASE-T

Advanced
Digital oscilloscope
Graphic LCD panel
Direct Digital Synthesis
CNC steppers
Spoc CPU core

Hands-on
A simple oscilloscope


FPGA introduction
What are FPGAs?
How FPGAs work
Internal RAM
FPGA pins
Clocks and global lines
Download cables
Configuration
Learn more

FPGA software
Design software
Pin assignment
Design-entry/HDL
Simulation/HDL
Synthesis and P&R

FPGA electronic
SMD technology
Crystals and oscillators

HDL info
HDL tutorials
Verilog tips
VHDL tips

Quick-start guides
ISE
Quartus

Site
News
FPGA links
HDL tutorials
Forum


What is a CNC?

A CNC is a controller that drives a cutting machine. The most popular cutting machine is a milling machine.

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?

Motors and loop control

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 typeStepperCC
Loop controlOpenClosed
ComplexityLowhigh
CostLowHigh
Motion speedMediumHigh
PrecisionVery highHigh
Axes sync.Very goodGood
Idle stabilityGoodFair
EfficiencyLowHigh

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.

>>> NEXT: Stepper control >>>



This page was last updated on June 18 2007.