Skip to content

CNC setup & calibrationLink

After building & wiring the CNC and fitting it into the aluminium frame it is required to calibrate some Grbl software parameters like the homing directions or the acceleration rates.

Using GrblLink

Except if you are familiar with Grbl, if you want to know more, have a look at the official Grbl wiki.

Connect to the ArduinoLink

Then you can use picocom to connect to the arduino:

picocom /dev/ttyACM0 -b 115200


See here how to find the right USB port.

Getting helpLink

You can type $ (and press enter) to get help. You should not see any local echo of the $ and enter. Grbl should respond with:

[HLP:$$ $# $G $I $N $x=val $Nx=line $J=line $SLP $C $X $H ~ ! ? ctrl-x]

Accessing the saved configurationLink

To access the saved configuration, type $$ to obtain the parameter values. For example our config is:



See the official Grbl wiki for details & meaning of parameter.

Setup & calibrationLink

Now we will:

  1. verify the cnc respond correctly to homing instruction
  2. calibrate if needed

Homing the X-carveLink

Once you are sure that everything is connected properly (especially the limit switches) you can try to "home" the X-Carve manually using $H in the previous terminal connected to Grbl.


Be ready to use the emergency stop button in case the axes move in the opposite direction of your limit switches!


If you don't see any response in the terminal when you type the commands, it is perfectly normal!

Change homing direction:Link

Parameters named $3 control the homing direction.

From the official wiki:


By default, Grbl assumes that the axes move in a positive direction when the direction pin signal is low, and a negative direction when the pin is high.

To configure the homing direction, you simply need to send the value for the axes you want to invert using the table below.

Setting Value Mask Invert X Invert Y Invert Z
0 00000000 N N N
1 00000001 Y N N
2 00000010 N Y N
3 00000011 Y Y N
4 00000100 N N Y
5 00000101 Y N Y
6 00000110 N Y Y
7 00000111 Y Y Y

For example, if want to invert the Y axis direction only, you'd send $3=2 to Grbl, and the setting should now read $3=2 (dir port invert mask:00000010)

Edit the acceleration ratesLink

Parameters named $120, $121 & $123 control the axes acceleration in mm/second/second.

From the official wiki:


Simplistically, a lower value makes Grbl ease slower into motion, while a higher value yields tighter moves and reaches the desired feed rates much quicker. Much like the max rate setting, each axis has its own acceleration value and are independent of each other. This means that a multi-axis motion will only accelerate as quickly as the lowest contributing axis can.

Since the Z-axis arm is long and have a "heavy weight" (gimbal + camera) at its lower end, it is probably a good to keep low values to avoid blurry image due to shaking!

To determine optimal values, the official wiki is clear, you will have to run some tests:


Again, like the max rate setting, the simplest way to determine the values for this setting is to individually test each axis with slowly increasing values until the motor stalls. Then finalize your acceleration setting with a value 10-20% below this absolute max value. This should account for wear, friction, and mass inertia. We highly recommend that you dry test some G-code programs with your new settings before committing to them. Sometimes the loading on your machine is different when moving in all axes together.

For example, you can send $120=100.0 to set the X axis acceleration rate to 100 mm/second².


Deceleration rates may also create shaking!