Hi,
I’ve just finished the Marlin set up of my Root 3 CNC, and since I did it from scratch and learned a lot of things about it, I wanted to share this process with you.
Marlin firmware is mostly used for 3D printers, but they also made is CNC ready, and very flexible to allow you to do a lot of modifications to suit your needs.
There is a Marlin Firmware fork made by Pete on Github, but I wanted to understand what modifications are to be made to make it work with the Root CNC.
So I’ve downladed the latest version of Marlin, and did the following modifications :
In Configuration.h :
#define EXTRUDERS 0
This is a very important step. You have to define that no extruder is used on the board, so that the extuder stepper moto slot can be used to power the second motor on your Y axis.
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
#define USE_XMAX_PLUG
#define USE_YMAX_PLUG
#define USE_ZMAX_PLUG
The way of using the endstops is up to you. I’ll just say here that I’m using a touching plate for the Z min, and that I’ll show you how to set up the double endstop for the Y axis.
Since you are here, you can fine tune your machine by modifying the junction deviation factor, or add the S curve acceleration.
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
Again, this is to allow you to use the touching plate for homing the Z axis.
In Configuration_adv.h :
#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#define INVERT_Y2_VS_Y_DIR true // Set ‘true’ if Y motors should rotate in opposite directions
#define Y_DUAL_ENDSTOPS
#if ENABLED(Y_DUAL_ENDSTOPS)
#define Y2_USE_ENDSTOP YMAX
#define Y2_ENDSTOP_ADJUSTMENT 0
#endif
#endif
This is where the magic happens. Since you’re delared 0 extruder, and defined Y dual stepper drivers, the extruder slot will be used to power your second motor on your Y axis. So no need to re-map any pins on your board.
And this is it ! Don’t forget to fien tune your machine by calibrating the stemps per mm, the bed size, the accelerations/feed rate, and maybe the skew factor, and you are good to go.
I haven’t hooked up the spindle on the board directly yet, but if I do so, I’ll complete this topic with the method I’ve used.
Happy CNCing !
