CNC milling machine

Last documented status


First planning a 3d model. The goal is to build a small and „cheap“ milling machine for general purpose.
The material which I want to mill will be plastic like polycarbonat, wood and thin metal plates like aluminium.
Another aspect is to have the possibility to mill copper plated pcb’s for prototyping.


New version (driving rails):

Technical specification

Working area:
y-axe: 650 mm
x-axe: 450 mm
z-axe: 125 mm

Used mechanical components:
For the y- and x-axe I used profile rails HGR20 and blocks from type HRC20-FN-V0

portal cheeks:
323 mm x 392 mm x 20 mm

Drag chain:
L – length of calculated drag chain
V – length of trace

L = V/2+pi*R


mounting plate y-axes (ball screw)

Sneak peek of the used components:
Y-spindle 800 mm long
X-, Y- linear rails (4xHRC20-FN-V0)
cable chain
all bearings

Resolution of my configuration with 1605 ballscrew and 1/8 microstepping:
360°/1.8° * Microstepping * 1/screw pitch = 360°/1.8° * 8 * 1/5 mm = 320 steps/mm
This gives me a resolution of 1/320 mm. About 0.003125 mm per step.

With 1/16 microstepping I getting a double in resolution but the motor looses torque.

Stepper Motor Driver

Three Leadshine DM542EU (original no clone!)

Max. possible driving speed with these stepper motor driver with an maximum frequency of 200 kHz results to:

0.003125 mm * 200,000 * 1/s = 625 mm/s = 37500 mm/min = 37.5 m/min

Max. speed of 38 m/min

3D printed components

Cover for NEMA 23 motor with GX16 connector

Limit switch and homing

LJ12A NPN normaly closed (Öffner)
Works with 5V (even is specified 6V..30V)
Pinout: black (ouput), blue (GND), brown (+Vcc)–Proximy-Switch?source=2&refertype=1&referid=177

Switching cabinet

The DIN rails are mounted with sheet metal screws (DIN 7504)

2. Version of Z axis with moving rails

Bezeichnung Schraube Anzahl
— Wagen HRC 20 Flansch M6 x 16 16
— Schienen M5 x 16 12
— KUS M5?? 8
— Winkel M8 x 10 10
Montageplatte Spindel
— Versteifungen M6 x 10 26
— Spindel-Gehäuse M6 x 10 8

Aktueller Designstand
Kreuzplatte 275 x 153 x 35 mm³ 1
Montageplatte Spindel 351 x 153 x 15 mm³ 1 351 x 153 x 18 mm³
Versteifungen Z-Platte 337 x 73 x 15 mm³ 2
Z-Platte-Festlager 121 x 153 x 15 mm² 1
Montageplatte Y-Achse Wagen 200 x 223 x 15 mm² 1

LinuxCNC and Mesa 7i96

Custom keyfiles in LinuxCNC:
cd ~/.
ls -a
sudo nano .axisrc
.axisrc – file:

Howto using the pwm output on step 4 of the mesa card:
Flashing the right bit-file

Tips and Tricks

Remap short key’s:
1. Open Termin in Linux und type in „sudo nano .axisrc“
2. Type in your custom bindings
#choose 0=for x-axis, 1=for y-axis, 2=for Z-axis, 3=A, 4=B, …)
root_window.bind(„<Up>“, lambda e: jog_on(0, get_jog_speed(0)))
root_window.bind(„<Down>“, lambda e: jog_on(0, -get_jog_speed(0)))
root_window.bind(„<KeyRelease-Up>“, lambda e: jog_off(0))
root_window.bind(„<KeyRelease-Down>“, lambda e: jog_off(0))
You need Keyrelease to stop jogging if releasing the key otherwise, the axis jog permanently

Safety first!

In case of an failure of the VFD it is possible that a dc current flows in the protective ground conductor which can exceed a dangerous current. Therefore all VFD manufacturer recommending to use the following RCD type for protection against direct or indirect contact. The RCD has to be installed between the mains supply and VFD input, not the output side of the vfd!

For 1-phase VFD’s: RCD Type F (in german: pulsstromsensitiv Type F)
For 3-pase VFD’s: RCD Type B (in german: allstromsensitiv Type B)

The tripping current should be at least <= 30mA!! Dont use the EV charger RCD’s they are not suitable for this!!!

You can read more about this in the LENZE VFD system manual (like the E82EV222-2C)

Usefull software

3D Cam Simulator which can be integrated in CamBam:

Usefull Links:

3d models of all screws
lowering of cylinderhead srew
Online calculator
Sheet metal screws (Blechschrauben D 7504
Huanyand Modbus Command
Fusion 360 CAM Example
Fusion 360 Generating Gcode LinuxCNC Postprocessor
Fusion 360 Calculating Cutting Parameter