How to Build a CNC Drilling PCB Machine
This guide walks through the mechanics, drives, spindle and firmware you need to build a CNC drilling PCB machine that holds ±0.05 mm hole position on 1.6 mm FR-4. It is written for electronics engineers and lab technicians who want in-house drilling for prototypes. You will see which parts to buy, which to machine, and when the build stops making sense.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
- 7
Key takeaways
Frame, axes and the bed of a build a CNC drilling PCB machine
The frame decides the accuracy ceiling of everything above it. A moving-table design with a fixed gantry and a 12 mm aluminum tooling plate gives a stiff base and lets you clamp a 300 × 200 mm copper-clad panel flat. Welded steel tube also works, but it needs stress relief and a machined top face before you bolt rails to it.
For the X and Y axes, 16 mm linear rail and preloaded carriages are the practical choice for a hobby-scale machine. Ballscrews with a 5 mm lead hold backlash under 0.02 mm and repeat well. Belt drives of 9 mm width move faster, but belt stretch and tooth engagement cost you position accuracy in the 0.05–0.1 mm range, which is too loose for a 0.8 mm pitch via field.
The Z axis carries the spindle and needs short travel: 40–60 mm is plenty for panel thickness, tool length and retract clearance. A fine-pitch leadscrew is the usual drive. Some builders use a pneumatic cylinder for fast retraction during peck cycles, which shortens cycle time, but it adds a solenoid, a regulator and another failure point.
Level the bed to the spindle before you cut anything. Sweep a dial indicator across a 300 mm span and shim under the rails until the variation is under 0.03 mm. A bed that is 0.1 mm out of parallel will drill shallow at one corner and burr the exit at the other, even if your steps per mm are perfect.
- 1Fixed gantry, moving tableKeeps the spindle over a single clamp point and simplifies dust collection.
- 216 mm rails, 5 mm lead screwsA reliable balance of stiffness, backlash and cost for panel work.
- 3Z travel 40–60 mmEnough for tool changes and peck retracts without adding flex.
Steppers, drivers and the spindle circuit
NEMA 23 steppers rated 1.8° per step with a 2–3 A phase current move a table this size without stalling. Pair them with digital drivers set to 1/8 or 1/16 microstepping. Microstepping smooths motion, but it does not increase real accuracy; the mechanical resolution comes from the screw lead and the torque margin you keep.
The spindle is the part that separates a usable PCB drill from a toy. A 300 W to 500 W brushless spindle with an ER11 collet and measured runout under 0.01 mm covers 0.3–3.175 mm shank bits. A trim router will spin, but its runout and 6 mm collet are wrong for micro-drilling. If you already own one, budget for a dedicated spindle before you chase other accuracy problems.
Wire the spindle through a relay or a logic-level MOSFET so the controller can start and stop it. Add a separate 24 V supply for the steppers. Sharing one supply for motors and spindle invites brownouts that show up as skipped steps in the middle of a panel. Route spindle cable away from limit switch wires, or the noise will trigger false stops.
A small control board running GRBL or LinuxCNC handles the step and direction pulses. GRBL is enough for 3 axes and simple drilling cycles. LinuxCNC gives you canned peck cycles, probing and better feed control if you plan to add a probe for tool length or bed leveling.
Feeds, speeds and peck cycles for FR-4
FR-4 is abrasive because of the woven glass. A 0.8 mm carbide bit wants roughly 15,000–20,000 rpm and a feed around 300–500 mm/min. Spin too slow and the bit rubs, heats and dulls in a few hundred holes. Spin too fast with a slow feed and you burn the resin, which smears the hole wall.
Peck depth matters more than most builders expect. Take 0.3 mm per peck on a 1.6 mm panel, retracting fully to clear dust. A single plunge to full depth on a 0.5 mm bit almost always snaps it, and the broken stub stays in the hole. If a bit does break, stop, blow out the hole and start again; drilling over a broken bit will deflect the next one.
Entry and exit quality depend on what is under the panel. A sacrificial backing board of phenolic or MDF supports the copper and stops the exit burr. Many shops also use an entry foil on top to reduce copper burrs on the drill entry side. Neither is exotic, and both save you a deburring step.
Keep a drill log per bit. Count holes and retire the bit before it fails. A dull bit drills oversize and rough, and the failure mode is usually a snap that costs you a panel, not just a tool.
- 1Spindle speed15,000–20,000 rpm for bits from 0.5 mm to 1.0 mm.
- 2Feed rate300–500 mm/min on 1.6 mm FR-4 with a sharp carbide bit.
- 3Peck depth0.3 mm per peck, full retract, on panels up to 1.6 mm.
- 4Backing boardPhenolic or MDF under the panel to control exit burr.
Where a home-built drill hits its limits
Hole position tolerance is the first thing to degrade. A well-built machine can hold ±0.05 mm on a small panel, but thermal growth in a warm room, dust on the rails and a slightly worn screw all push that number. Fine-pitch via fields at 0.4 mm pitch need tighter control than most home builds deliver.
Tool life is the second limit. Drilling 1.6 mm FR-4 wears a carbide bit faster than most people expect. If you are drilling more than a few hundred holes per session, you will spend real time changing and re-zeroing bits. A second spindle with a different collet size reduces that downtime.
Machine time is the third. A single-spindle machine drills one hole at a time. A panel with 800 holes at 0.5 s per hole plus travel is roughly 15–20 minutes. That is fine for a prototype. It becomes painful when you need ten panels the same week.
None of this means the build is a bad idea. It means you should size the machine to the job. A two-panel-per-week prototype bench does not need the same machine as a small production line, and pretending otherwise is how builders end up with a machine that is slow and still not accurate.
Step-by-step assembly and calibration
Work through these in order. Skipping the squaring step makes every later measurement meaningless.
- 11. Square the frame before you mount railsClamp the base plate to a flat surface and measure corner-to-corner diagonals. Adjust until the difference is under 0.2 mm. Bolt the gantry uprights only after the base is square.
- 22. Mount and align the linear railsUse a straight edge or dial indicator along the rail. Push each rail against a machined shoulder if one exists. Tighten from the center outward in small steps so the rail does not bow.
- 33. Fit ballscrews and set backlashCouple the screw to the motor with a flexible jaw coupling, not a rigid one. Measure backlash by jogging 10 mm forward and back with a dial indicator; target under 0.02 mm. Adjust the anti-backlash nut if it is higher.
- 44. Tram the spindle to the bedSweep an indicator on a 150 mm arm in a full circle. Shim the spindle mount until the total variation is under 0.03 mm over the 300 mm panel area.
- 55. Set steps per mm and test a 100 mm moveCalculate steps per mm from motor steps, microstepping and screw lead. Command a 100 mm move and measure with calipers. Adjust the value so the error is under 0.05 mm over 100 mm.
- 66. Probe the bed and dry-run the fileZero Z on a scrap panel, then run the G-code with the spindle off and Z raised 5 mm to confirm the hole pattern lands where the CAD says it should.
- 77. Cut a test coupon before a real boardDrill a 20-hole grid at 2.54 mm pitch in scrap FR-4 at 15,000 rpm, 300 mm/min feed and 0.3 mm peck depth. Check position and burr with a loupe.
Build in-house or outsource the fixture and drilling
Match the option to your volume and tolerance, not to the price of the machine alone.
| Situation | In-house build | Outsource to a machining partner |
|---|---|---|
| Fewer than 20 panels per year | Reasonable; build time pays back over a year or two | Often cheaper once you count your own labor |
| 0.4 mm pitch vias | Hard; needs sub-0.03 mm bed level and low runout | Standard capability on a rigid machine |
| Holes over 3.175 mm shank | Needs a spindle swap and a stiffer Z | Routed or milled in one setup |
| Panels over 300 × 200 mm | Table size and stiffness become the limit | Fits a 750 × 1,150 mm travel envelope |
| One-off prototype this week | Build time delays the board | Quote in 12 hours, parts in 3–5 days |
| Custom drilled fixture plate | You still need to machine the plate | Drilled and tapped to ±0.005 mm on request |
Build for prototypes, machine the fixture
A home-built drill is a good fit for a few prototype panels a week and holes above 0.5 mm. Once you need fine-pitch vias, large panels or a drilled and tapped fixture plate, the numbers favor a partner. We machine drill fixtures, backing plates and spindle mounts to ±0.005 mm and quote in 12 hours.
Frequently asked questions
What spindle runout should I aim for when I build a CNC drilling PCB machine?
Measure at the collet taper with a dial indicator. Aim for under 0.01 mm total indicated runout. Above 0.02 mm, a 0.5 mm bit will wander on entry and the hole wall will show a spiral mark.
Replace the collet if runout grows after a few hundred holes. Collets wear and chip, and a damaged collet is a common cause of sudden bit breakage.
Can I drill FR-4 with a trim router as the spindle?
It will spin, but the 6 mm collet and typical runout make small bits wander. The high RPM range is also usually too narrow for carbide micro-drilling.
Use it only for holes above 2 mm where position tolerance is loose. For vias and component holes, fit a proper ER11 spindle.
How deep should each peck be?
On 1.6 mm FR-4, use 0.3 mm pecks with a full retract. That clears dust and lets the bit cool. On thicker panels, keep the same peck depth rather than increasing it.
If you hear a change in pitch during the cut, stop and inspect the bit. A chipped edge breaks within the next few holes.
Why do my holes come out oversize?
Common causes are a dull bit, spindle runout, or a Z axis that flexes under load. Check runout first, then inspect the bit under magnification.
A dull bit on glass-filled FR-4 drills oversize because the cutting edges rub instead of shear. Replace it and re-cut a test coupon.
Do I need dust extraction?
Yes. The dust is abrasive and slightly conductive. It settles on rails and screws and shows up later as position error or a stalled axis.
A vacuum shoe around the bit plus a simple enclosure keeps the machine cleaner and the operator safer.
When should I stop building and send the drilling out?
When your panel count climbs above roughly 200 a year, or when your design moves to 0.4 mm via pitch. At that point the machine time and tooling cost usually exceed the cost of outsourcing.
Another signal is a custom fixture plate. If you need one drilled and tapped to tight tolerance, that is a machining job in itself.
Need the fixture plate or spindle mount machined?
Send your drawing and we will return a quote with DFM notes within 12 hours. From one prototype to 10,000+ parts, no minimum order quantity, and your files stay confidential.
12-hour quote100% inspectionNo minimum order quantityNDA on request