M
MotionTek
Drive Systems
Home › Products › How To Build a CNC Machine  ·  Builder's Guide · Ontario, Canada

How To Build a CNC Machine

A practical guide for CNC builders — Router · Plasma · Laser · Mill — from planning and gantry design to motor sizing, wiring, software, commissioning and safety
⚙ CNC Gantry Kits ⚡ CNC Stepper Kits ✉ Ask an Engineer ▶ Watch on YouTube
Product Categories
What do I need to build a CNC machine? Every CNC machine — router, plasma, laser, mill or a special automation machine — is built from the same building blocks: a rigid structure, linear guides on each axis, a drive system (ball screw, rack & pinion or belt), motors and drivers sized for the load, a motion controller and software, and a tool (spindle, torch or laser head). This guide walks through each block in the order most builders design them, with the rules of thumb, formulas and checklists we use every day at Global Motion Technology Inc. Any machine with mechanical movement can become a CNC machine — CNC simply means Computer Numerical Control.
Step 1 — Define the Machine↑ Go To Top
1

Start With the Application, Not the Parts

Before buying anything, write down four numbers: the working area (X × Y × Z), the material and thickness you will cut, the speed you need, and the accuracy you expect. These decide the frame, the drive system, the motors and the budget. Remember that the machine's footprint is always larger than the working area — add room for the gantry, the Z-axis, motors, cable chain and end stops.

MachineCutting ForceTypical PrioritiesCommon Drive ChoiceKey Add-ons
CNC RouterMedium–HighRigidity, chip load, large tableRack & pinion on long X/Y, ball screw on ZSpindle + VFD, dust collection, vacuum or T-slot table
CNC PlasmaVery LowFast, smooth travel; noise immunityRack & pinion or beltTorch height control (THC), water/down-draft table, fume extraction
CNC LaserNone (non-contact)Speed, acceleration, low moving massBelt or rack & pinionEnclosure & interlocks, air assist, chiller, exhaust
CNC MillHighStiffness, precision, low backlashBall screw on all axesCoolant, spindle speed control, tool setter
CNC LatheHighSpindle sync, precisionBall screw (X/Z)Spindle encoder for threading
Automation / Pick & PlaceLowRepeatability, cycle timeBelt, ball screw or actuator modulesVision, I/O, PLC or custom programming

Mechanical Consideration — Weight & Force

Estimate the gantry or table weight for router, mill, plasma, laser, or lathe. Weight is not the only factor — also consider the force, which is the sum of inertia (accelerating the mass), friction, gravity on vertical axes, and the cutting resistance. In CNC machines, the cutting material and thickness determine the force required by the X, Y and Z axes.

Mechanical Consideration — Speed

Travel (rapid) speed is when the machine moves from one point to another without any resistance. Cutting (feed) speed is when the machine is engaged with the material, and varies with material hardness, thickness and tooling. Plasma and laser need fast, smooth feed; routers and mills need force at moderate feed.

Step 2 — Frame & Gantry↑ Go To Top
2

Build a Rigid Structure

Rigidity = Accuracy

The frame is the foundation of accuracy. Any flex in the table, the gantry beam or the Z-axis shows up directly as poor surface finish, chatter, and parts out of tolerance — and no amount of motor torque or software tuning can fix it. Most gantry-style machines use a fixed table with a moving gantry (X across the beam, Y along the table, Z vertical). Long gantries are usually driven from both sides (dual Y motors) to prevent racking.

CNC router mechanical drawing - Ball screw XYZ axis
Simple Mechanical Drawing — CNC Router with Ball Screw XYZ Axis
Lego L2 Gantry XYYZ
Lego L2 Pre-Assembled Gantry XYYZ
  1. Aluminum extrusion (8020 / T-slot) — fast to build, easy to adjust, ideal for routers, plasma, laser and automation. Use deep profiles (e.g. 3060 or larger) for gantry beams.
  2. Welded steel tube — heavy and stiff, damps vibration; best for large router and plasma tables. Stress-relieve or let welds settle, then machine or shim rail mounting surfaces flat.
  3. Epoxy granite / cast iron — best damping for mills, but costly and heavy.
  4. Keep the Z-axis overhang short — the distance from the gantry beam to the tool tip multiplies every deflection.
  5. Gantry clearance should cover your thickest stock plus fixtures — but every extra inch of clearance costs rigidity.
  6. Mount rails on flat, parallel reference surfaces; check with a straight edge and dial indicator before final tightening.
  7. Plan cable routing (drag chain), dust/fume paths and enclosure space from day one.
💡 Save months of fabrication: a pre-assembled gantry kit gives you an aligned gantry, sides and Z-axis ready to bolt onto your own table — see our Lego Gantry series.
Lego L1 Gantry heavy duty
Lego L1 — Heavy Duty Router / Mill Gantry
Lego L1+ Super Heavy Duty Gantry
Lego L1+ — Super Heavy Duty, Large Working Area
Lego L3 light gantry for plasma and laser
Lego L3 — Light Gantry for Plasma & Laser
Mechanical kit bolted on customer steel table
Mechanical Kit on Customer Steel Table — Sides Bolted on Top
Step 3 — Linear Guides & Drive System↑ Go To Top
3

Choose Linear Guides and How Each Axis Is Driven

Linear guides carry the load and keep the axis straight. Profiled square rails (e.g. 15, 20 or 25 mm with recirculating ball carriages) are the standard for any machine that cuts; supported round rails are acceptable only for light-duty work. Use two rails per axis and at least two carriages per rail on the gantry sides. The drive system converts motor rotation into linear motion:

DriveBest ForStrengthsLimitations
Ball ScrewMills, Z-axes, short-to-medium axesHigh force, high precision, very efficient (about 90%), can be preloaded for near-zero backlashLong screws “whip” at high RPM, which limits speed on long axes; needs end supports and protection from chips
Rack & PinionLong router / plasma axes (8–20 ft+)Length is practically unlimited; high speed; helical racks run smoother and quieterSome backlash unless spring-loaded or geared; lower resolution per motor turn — often paired with a reduction
Timing BeltLaser, plasma, light automationFast, quiet, inexpensive, low moving massStretches under cutting load; not suited to heavy routing or milling
Lead Screw (Acme)Light hobby machines, vertical liftsLow cost; low-efficiency screws resist back-drivingLower efficiency (roughly 20–80% depending on lead); wears; more backlash
Rack and pinion drive gantry
Rack & Pinion XYYZ — Direct Drive on X and Dual Y
Ball screw on Y axis in the middle
All Ball Screw XYZ — One Ball Screw in the Middle of Y
Two ball screws on Y axis sides
All Ball Screw XYYZ — Two Ball Screws on the Y Sides
Compact belt driven gantry
Belt Drive — Compact High-Speed Gantry with 3:1 Pulley Reduction

The Z-Axis Deserves Extra Attention

The Z-axis carries the spindle or torch, fights gravity and takes the cutting load at the end of a lever. Use a thick plate, square rails with four carriages, and a ball screw sized for the spindle weight. Because ball screws are efficient enough to back-drive, a heavy Z can drop when power is removed — consider a motor brake, counter-balance or a lower-lead screw for heavy heads.

Z axis front view
Z Axis — 4 to 24 Inch Travel, Front View
Z axis top view
Z Axis Top View — Rails, Carriages & Ball Screw
Z axis side view
Z Axis Side View — Motor Bracket & Support Units
Step 4 — Motors & Sizing↑ Go To Top
4

Stepper or Servo — and How Much Torque?

Most modern automation machines, especially CNC, use stepper or servo systems. The most popular stepper motors are the 2-phase bipolar and the 4-phase unipolar motor. Servo motors may be DC or AC, brushed or brushless — all require an encoder to control the motor shaft and provide feedback on the shaft position.

FeatureStepper Motor (open loop)Closed-Loop StepperAC Servo
Position feedbackNone — can lose steps silentlyEncoder corrects / alarms on lost stepsEncoder, full closed loop
Torque vs speedHighest at low speed, falls off as RPM risesSimilar, better use of torqueNearly flat to rated speed; short-term overload
Typical useHobby & light-industrial routers, plasma, laserUpgraded routers & plasmaProduction machines, high speed, heavy gantries
Cost & setupLowest, simplestModerateHighest; requires tuning

Estimating the force on an axis

F_total = m·a + μ·m·g + F_cut (+ m·g on a vertical Z axis)
m = moving mass (kg) · a = acceleration (m/s²) · μ = rail friction (~0.01 for ball rails) · g = 9.81 m/s²

Converting force to motor torque

Ball screw: T = F × Lead / (2π × η) η ≈ 0.9, Lead in m/rev → T in N·m
Rack & pinion: T = F × r / η r = pinion pitch radius = (module × teeth) / 2
Belt & pulley: T = F × r / η r = pulley pitch radius
Divide by the gear / pulley reduction ratio if one is used. 1 N·m ≈ 141.6 oz·in.
💡 Rules of thumb: size steppers with at least a 2× torque safety margin, and read the motor's torque-speed curve at your target RPM — never the holding torque alone. A stepper delivers only a fraction of its holding torque at high speed.

Power Supply Voltage

Higher supply voltage pushes current into the windings faster, so the motor keeps torque at higher speed. A widely used guideline is a maximum supply of about 32 × √(winding inductance in mH) — e.g. a 2 mH motor ≈ 45 VDC — while staying roughly 10% below the driver's maximum rated voltage. Excess voltage mostly adds motor heat.

Driver Current & Microstepping

Set driver current to the motor's rated phase current (lower it if the motor runs too hot). Microstepping (e.g. 1/8 or 1/10) gives smoother, quieter motion and reduces resonance, but does not add real accuracy or torque. Wire 8-wire motors in parallel for best high-speed performance.

NEMA34 stepper motor kit
NEMA34 Stepper Kit — Motors, Drivers, Breakout Board & Power Supply
Delta AC servo controller 4 axis
Delta AC Servo Controller 4 Axis with Spindle Inverter

Matched motor + driver + power supply packages: CNC Stepper Retrofit Kits ›

Step 5 — Electronics & Wiring↑ Go To Top
5

Build the Control Box

Electronic Parts & Software You Will Need

  1. Electronic enclosure — ABS, aluminum or metal structure as you prefer (metal helps shield electrical noise)
  2. Copper wires 18 & 22 AWG for internal DC wiring, sized for the current and voltage in each connection
  3. 4 or 8 conductor 18 AWG (or heavier) shielded stepper motor cable rated 300V, sized for motor current and cable length
  4. Stepper motor cable connectors (optional) for more flexibility and easy disconnect
  5. Main power: fuse or breaker, power switch and a hard-wired emergency stop
  6. Home / limit switches and a probe or tool-setter input
  7. Mach3/4 CNC Router, Plasma and Mill controller — click here to buy
  8. Instructions and wiring diagram are provided with each MotionTek CNC KIT
Electrical wiring diagram example
Electrical Wiring Diagram Example

Wiring Best Practices

  • Separate AC mains / VFD power from low-voltage signal wiring; cross at 90° if they must meet.
  • Ground motor cable shields at one end (drive side) to a common star ground point.
  • Use a shielded cable between VFD and spindle and follow the VFD manual for grounding.
  • Use ferrules, label every wire and keep a printed schematic inside the enclosure door.
  • Provide enclosure cooling: filtered fan in, vent out, drives mounted with airflow across heat sinks.

Home, Limit & E-Stop Circuits

  • Wire limit switches normally closed (NC) where possible — a broken wire then reads as a tripped switch (fail-safe).
  • Inductive (NPN/PNP) sensors are more repeatable than mechanical switches; check the input voltage of your breakout board / controller.
  • The E-stop must remove power or enable from the drives in hardware — not rely only on software.
  • Dual-motor gantries: use a home switch on each side so the controller can square the gantry automatically.
⚠ Mains voltage can kill. AC wiring (110/230VAC, VFDs, plasma cutters) must be done or inspected by a qualified person and comply with your local electrical code. Plasma cutters generate strong high-frequency noise — keep plasma leads away from control wiring and ground the table properly.
Step 6 — Controller & Software↑ Go To Top
6

CNC Operation Software / Motion Controller

CNC operation software controls the motion of a CNC machine — from 1 up to 6+ axis machines — and advanced controllers coordinate 2 or more axes simultaneously. The full chain from idea to cut looks like this:

CADdraw the part
→
CAMtoolpaths & feeds
→
Post-processorG-code for your controller
→
Control softwareMach3 / Mach4 / Masso / LinuxCNC
→
Step / Dir signalsbreakout board or motion card
→
Drivers → Motorsmachine moves

Choosing a Controller

MotionTek primarily uses Mach3 and Mach4; however our CNC products are standard and can be used with any step/dir controller on the market. Mach3 is open software that allows users to write their own VB Script code to control the machine as needed.

Classic Mach3 setups use the PC's DB25 parallel port with a breakout board. Modern PCs rarely have one, so a USB or Ethernet motion controller (or a stand-alone controller such as Masso) is the usual choice for new builds.

Typical Controller Features to Plan For

  • Number of axes (incl. slaved dual-Y and a rotary 4th axis)
  • Spindle ON/OFF and 0–10V speed control to the VFD
  • Coolant / air / dust collector relay outputs
  • Z auto-zero touch plate, XY edge and center finder
  • Torch height control (plasma) or laser PWM output
4 Axis control with rotary, Spindle on/off speed control, cooling control
4 Axis Control with Rotary · Spindle ON/OFF Speed Control · Cooling Control
3 Axis control with XY Axis Edge Finder, XY Center Finder, Z Axis Auto Zero
3 Axis Control · XY Edge Finder · XY Center Finder · Z Axis Auto Zero
Step 7 — Tool Head & Options↑ Go To Top
7

Spindle, Torch, Laser and the 4th Axis

  1. Router / trim router — low cost, loud, manual speed. Fine for wood and plastics.
  2. Spindle + VFD (air- or water-cooled) — quieter, speed controlled from the software, runs for hours. The usual choice for serious routers and mills.
  3. Plasma torch — needs a machine torch, a floating head or touch-off for initial height, and THC for warped sheet.
  4. Laser head — needs focus height control, air assist, an enclosure with interlocks and fume extraction.
  5. Rotary 4th axis — a geared indexer (e.g. 5:1 to 20:1) driven by a stepper or servo for cylindrical work.
  6. Remember: the spindle mounting plate and tool head attachment are part of your design — check weight on the Z-axis.
Rotary R5 4th axis indexer
R5 4th Rotary Axis — 5″ Chuck, Geared
Gantry side in 3x3 extrusion
Heavy Gantry Side in 3″×3″ Extrusion
Step 8 — Commissioning & Calibration↑ Go To Top
8

First Power-Up, Calibration and Tuning

  1. Power the control box with motors disconnected; verify supply voltages, E-stop and input status in the software.
  2. Set driver current and microstep switches; connect one motor at a time and jog slowly.
  3. Confirm direction of each axis and that each limit / home switch is read correctly before any fast move.
  4. Calculate and enter steps per unit (formula below), then verify with a dial indicator or ruler over the longest possible move.
  5. Square the gantry (measure diagonals of a large test rectangle) and tram the spindle to the table.
  6. Increase velocity and acceleration until the motor stalls, then back off 20–30% for a safe working margin.
  7. Check backlash by reversing direction against a dial indicator; adjust mechanically before compensating in software.
  8. Surface the spoilboard, run your first G-code “in the air” above the work, then cut a test part.
Steps per mm = (motor steps/rev × microstep) / (travel per motor revolution in mm)
Ball screw, 5 mm lead, 200-step motor at 1/8: (200 × 8) / 5 = 320 steps/mm
Rack & pinion, module 1, 20 teeth, 1/8: (200 × 8) / (π × 1 × 20) ≈ 25.46 steps/mm
Belt, 5 mm pitch, 15-tooth pulley, 3:1 reduction: (200 × 8 × 3) / (5 × 15) = 64 steps/mm
Safety First↑ Go To Top

⚠ Safety Considerations for Every CNC Build

  • Emergency stop within reach of the operator, cutting power or enable to all motion in hardware.
  • Guarding: keep hands out of the work envelope; consider enclosures, light curtains or interlocked doors on production machines.
  • Never leave a laser or plasma machine unattended — both can start fires. Keep an extinguisher nearby.
  • Laser: use a fully enclosed, interlocked cabinet and laser-rated eye protection for the wavelength in use.
  • Plasma: eye/face protection, fume extraction or water table, proper grounding of the work clamp.
  • Router / Mill: eye and hearing protection, dust collection (wood and MDF dust is a health hazard), secure work-holding.
  • Lock out power before maintenance; verify a heavy Z-axis cannot fall when power is removed.
  • Follow your local electrical code and workplace health & safety regulations.
Builder's Checklist↑ Go To Top

CNC Build Checklist

Print Me
  • Working area X × Y × Z and machine footprint defined
  • Materials, thickness and target feed rates listed
  • Frame material chosen; rail mounting surfaces flat & parallel
  • Linear rails & carriages sized for load
  • Drive type per axis selected (ball screw / rack / belt)
  • Moving mass & axis force estimated
  • Motor torque checked on the torque-speed curve with 2× margin
  • Power supply voltage & current matched to motors and drivers
  • Controller chosen (Mach3 / Mach4 / Masso / other) with enough I/O
  • Enclosure, wire gauges, shielded cables & connectors listed
  • Home / limit switches and E-stop circuit designed
  • Spindle / torch / laser and its mounting designed
  • Cable chain, dust or fume extraction, cooling planned
  • CAD / CAM software and post-processor selected
  • Steps per unit, squaring and tramming completed
  • Safety review completed before first cut
Built With MotionTek Components↑ Go To Top

Custom Machines & Gantries Built by Our Customers and Our Team

Large scale CNC router and wire cutting machine
Custom X-100 Y-140 Z-36 Inch CNC Router + Wire Cutting on the Same Table
CNC borescope camera inspection machine
CNC Borescope Camera Inspection Machine
Lego L2 manual with crank wheel
Lego L2 — Manual Version with Crank Wheel
Lego L2 gantry crank wheel view
Lego L2 — Crank Wheel Detail
CNC Routers & Mills
CNC Plasma & Laser
Filling Machines
Packaging Machines
Laser with Conveyors
Pick & Place / Glue Dispensing
Inspection & Testing
4-Axis Custom Machines

→ See all Custom CNC Machines

Watch & Learn↑ Go To Top
Full Turn-Key CNC Router Based on the Lego Gantry Kit
KIT625XYZ — High Performance 3 Axis Stepper Motor Kit
Custom Gantry CNC Systems
Lego L3 Gantry for Plasma & Laser
Belt Linear Actuator — High Speed
Z Axis Linear Actuator — Heavy Duty 75 lb Lift

Our Commitment

Global Motion Technology Inc. continues to provide affordable CNC machine parts for businesses. Hundreds of customers in North America and worldwide have built or retrofitted their CNC machines and many other automation machines using our components. Wiring diagrams and instructions for our CNC Stepper kits and CNC Servo DC and AC kits are provided with each purchase. Software setup for motors, home/limit switches, and relays is provided with each purchase of CNC operation software.

We have programmed many applications including filling machines, 4-axis CNC, special automated laser machines with conveyors, packaging machines, and retrofitted Mill, Router, Laser & Plasma CNC. We welcome serious automation application inquiries.

Further Reading (External References)

External links are provided for convenience only; Global Motion Technology Inc. does not control or endorse third-party content.

⚖ Disclaimer & Limitation of Liability — Global Motion Technology Inc.

All information on this page — including text, tables, formulas, rules of thumb, examples, checklists, drawings, wiring diagrams, photographs, videos and external references — is provided by Global Motion Technology Inc. (“MotionTek”) for general educational and informational purposes only. It is provided “as is”, without warranty of any kind, express or implied, including any warranty of accuracy, completeness, merchantability or fitness for a particular purpose.

  1. Not an engineering design. Nothing on this page is a design, specification, engineering approval or recommendation for any specific machine. Formulas and figures are simplified guidelines and examples; real machines must be engineered for their actual loads, speeds, materials and operating conditions.
  2. Builder's sole responsibility. The final decision on the machine's design, component selection, sizing, fabrication, assembly, wiring, programming, testing, commissioning, guarding, operation and maintenance rests entirely with the CNC machine builder (the person or company designing and fabricating the machine) and the machine owner.
  3. Codes & safety compliance. The builder is solely responsible for compliance with all applicable electrical codes, machine-safety standards, certification requirements (e.g. CSA / UL) and workplace health and safety regulations. Electrical work should be performed or inspected by qualified, licensed personnel.
  4. No liability. To the maximum extent permitted by law, Global Motion Technology Inc., its owners, employees and representatives shall not be liable for any direct, indirect, incidental, special or consequential loss, damage, injury, death, property damage, production loss or expense arising from the use of, or reliance on, any information on this page, or from the design, fabrication or operation of any machine built with or without MotionTek components.
  5. Advisory only. Any consultation, pre-sales advice or design suggestion provided by MotionTek is advisory only; MotionTek is not involved in, and assumes no responsibility for, the final machine design, electrical or software setup.
  6. Products. Purchases of MotionTek products are governed solely by our Terms of Use, Purchase Policy and Warranty Policy. Specifications are subject to change without prior notice.

By using the information on this page you acknowledge that you have read and accept this disclaimer. If you do not have the expertise to design or build a machine safely, consult a qualified professional engineer before proceeding.

— Global Motion Technology Inc.

Ready to Build Your CNC Machine?

Tell us your working area, material, and application — we will help you select the right gantry, motors and controller.

📧 Contact Us
Product Categories
🔍 All Products
New Products
Select Province / State
Privacy & Confidentiality Disclaimer
Loading…

🔒 Account

🔒 Signed in. Sign out to register.
Contact
Billing Address
Shipping
Password
8–12 characters
1 uppercase letter (A–Z)
1 lowercase letter (a–z)
1 number (0–9)
1 special character ( ! @ # & )

Please sign in.

🛒 Your Cart

🛒

Your cart is empty.