Converting a 3D Printer Motherboard to a CNC Engraver Motherboard

Recently, I have been working on building a small CNC engraver. The mechanical structure is complete, but I have been struggling to find a good solution for the control system. The commonly used options are MACH3, GRBL, and MPCNC based on MALIN firmware. MACH3 is generally just a control board and cannot directly connect to stepper motor driver modules like 8825 or 4988; it requires an external stepper motor controller, which complicates the wiring, so I decided to set it aside for now. There is relatively little information available on MPCNC, so I will also exclude that option. Ultimately, I decided to use the GRBL solution.

GRBL is an open-source CNC system, and the most common setup is ARDUINO UNO R3 + CNC SHIELD, as shown in the image below:

Converting a 3D Printer Motherboard to a CNC Engraver Motherboard

Initially, I also used this setup, but in practice, the connections were messy and it was easily affected by external interference, leading to frequent serial disconnections and poor stability. This forced me to consider other solutions.

While searching for a suitable main control board, I accidentally came across a 3D printer control board. I noticed that it could generally drive four to five stepper motors, has limit switches for the X, Y, and Z axes, and outputs for the heated bed, which seemed like a good alternative solution.

Ultimately, I chose the MKS GEN L control board from the Maker Base, which has a main control chip of MEGA 2560 and is compatible with RAMPS, as shown in the image below:

Converting a 3D Printer Motherboard to a CNC Engraver Motherboard

This board is essentially equivalent to ARDUINO MEGA 2560 + RAMPS1.4. I recall that there is a dedicated project for MEGA on GRBL GITHUB (https://github.com/gnea/grbl-Mega). After downloading it, open the pin definition file cpu_map.h, and you can see that there are two different configurations:

#ifdef CPU_MAP_2560_INITIAL // (Arduino Mega 2560) Working @EliteEng
#ifdef CPU_MAP_2560_RAMPS_BOARD // (Arduino Mega 2560) with Ramps 1.4 Board

MKS GEN L is suitable for the second case. Below, modify the following code in the config.h file.

// #define DEFAULTS_GENERIC// #define CPU_MAP_2560_INITIAL
// To use with RAMPS 1.4 Board, comment out the above defines and uncomment the next two defines#define DEFAULTS_RAMPS_BOARD#define CPU_MAP_2560_RAMPS_BOARD

After modification, place the entire GRBL folder into the libraries folder of the ARDUINO IDE installation directory, and then upload the program to the control board. At this point, the definitions of each part are as shown in the image below:

Converting a 3D Printer Motherboard to a CNC Engraver Motherboard

In actual use, the wiring is much more convenient than the previous ARDUINO UNO R3 + CNC SHIELD setup, and the reliability has greatly improved, with very few occurrences of disconnections.

Leave a Comment