6 axis
Smoothieboard can be made to work for more than 3 axes.
We are not talking about extruders here ( these are supported separately, see Extruder ), but rotational axes, like those for example used for 4 or 5 axis machining.
This feature is one of the rare ones that requires compiling Smoothie. Because it increases the size of the movement planning queue significantly, we were unfortunately not able to fit it in the “normal” firmware.
There are two resources that were written about this feature when it was released that you might want to read :
- ABC pull request on github.
Workpiece Coordinate System
NOTE that currently WCS is not supported for ABC axis (G10 L2…). G92 A0 resets the A axis and does not set the WCS for it (same for B and C).Extruders
NOTE You cannot define extruders AND ABC axis they are mutually exclusive and smoothie will not run if they are both defined.Compiling 6 axis.
Before attempting this, please read compiling smoothie, and compile Smoothie “normally” for practice.
Once that is done ( and only once that is done ), you need to do the same process, but instead of doing
make
You now do :
make clean make AXIS=6 CNC=1
You can change this number to 5 or 4 if you do not need all 6 axes. It saves memory and allows you to use more of it for other things.
By default, Smoothie calculates distances only on the first three ( XYZ ) axes. You can change this behavior by setting the PAXIS compilation parameter, for example:
make AXIS=5 PAXIS=4 CNC=1
Means Smoothie is compiled with XYZAB axes, and distances are calculated in the XYZA space.
Primary Axes
NOTE that in most cases you DO NOT need to set PAXIS. Only do this if you fully understand the difference between a Cartesian (primary) axis and say a rotary axis.Once your firmware is compiled, you can now flash it to the board and start using it.
Using additional axes
XYZ first
NOTE You MUST fully define the alpha, beta and gamma (XYZ) axis before the other axis. They MUST have valid pin definitions for the step and dir pins (enable is optional) If you do not define valid pins for these first three axis smoothie will not boot.You can now add the following to your configuration file :
# A axis delta_steps_per_mm 100 # may be steps per degree for example delta_step_pin xx # Pin for delta stepper step signal delta_dir_pin xx # Pin for delta stepper direction delta_en_pin xx # Pin for delta enable delta_current 1.5 # Z stepper motor current delta_max_rate 300.0 # mm/min delta_acceleration 500.0 # mm/sec² # B axis epsilon_steps_per_mm 100 # may be steps per degree for example epsilon_step_pin xx # Pin for delta stepper step signal epsilon_dir_pin xx # Pin for delta stepper direction epsilon_en_pin xx # Pin for delta enable epsilon_current 1.5 # Z stepper motor current epsilon_max_rate 300.0 # mm/min epsilon_acceleration 500.0 # mm/sec² # C axis zeta_steps_per_mm 100 # may be steps per degree for example zeta_step_pin xx # Pin for delta stepper step signal zeta_dir_pin xx # Pin for delta stepper direction zeta_en_pin xx # Pin for delta enable zeta_current 1.5 # Z stepper motor current zeta_max_rate 300.0 # mm/min zeta_acceleration 500.0 # mm/sec²
This configuration is very similar to that of your XYZ axes, and you need to change the values to fit your setup.
Optionally if you are using endstops on the A, B or C axis, you need to replace your endstops section with the following ( it is also found in the snippets example ) :
Only for more than 3 axes
NOTE DO NOT use the following syntax if you only have XYZ axis! use the regular endstop config syntax.Hand in hand
NOTE If you define a homing axis then there MUST be a defined axis with the same designation (eg B endstop MUST have B axis defined)NOTE The ABC axis will always home after the XYZ axis home and will home individually, unless homing_order is defined in which case all axis will home individually in the order specified.
## Endstops new syntax (the name is not significant) # NOTE only a min or a max homing endstop maybe defined endstop.minx.enable true # enable an endstop endstop.minx.pin 1.24 # pin endstop.minx.homing_direction home_to_min # direction it moves to the endstop endstop.minx.homing_position 0 # the cartesian coordinate this is set to when it homes endstop.minx.axis X # the axis designator endstop.minx.max_travel 500 # the maximum travel in mm before it times out endstop.minx.fast_rate 50 # fast homing rate in mm/sec endstop.minx.slow_rate 25 # slow homing rate in mm/sec endstop.minx.retract 5 # bounce off endstop in mm # uncomment for homing to max and comment the minx above #endstop.maxx.enable true # enable an endstop #endstop.maxx.pin 1.25 # pin #endstop.maxx.homing_direction home_to_max # direction it moves to the endstop #endstop.maxx.homing_position 200 # the cartesian coordinate this is set to when it homes #endstop.maxx.axis X # the axis designator #endstop.maxx.max_travel 500 # the maximum travel in mm before it times out #endstop.maxx.fast_rate 50 # fast homing rate in mm/sec #endstop.maxx.slow_rate 25 # slow homing rate in mm/sec #endstop.maxx.retract 5 # bounce off endstop in mm endstop.miny.enable true # enable an endstop endstop.miny.pin 1.26 # pin endstop.miny.homing_direction home_to_min # direction it moves to the endstop endstop.miny.homing_position 0 # the cartesian coordinate this is set to when it homes endstop.miny.axis Y # the axis designator endstop.miny.max_travel 500 # the maximum travel in mm before it times out endstop.miny.fast_rate 50 # fast homing rate in mm/sec endstop.miny.slow_rate 25 # slow homing rate in mm/sec endstop.miny.retract 5 # bounce off endstop in mm # uncomment for homing to max and comment the min above #endstop.maxy.enable true # enable an endstop #endstop.maxy.pin 1.27 # pin #endstop.maxy.homing_direction home_to_max # direction it moves to the endstop #endstop.maxy.homing_position 200 # the cartesian coordinate this is set to when it homes #endstop.maxy.axis Y # the axis designator #endstop.maxy.max_travel 500 # the maximum travel in mm before it times out #endstop.maxy.fast_rate 50 # fast homing rate in mm/sec #endstop.maxy.slow_rate 25 # slow homing rate in mm/sec #endstop.maxy.retract 5 # bounce off endstop in mm endstop.minz.enable true # enable an endstop endstop.minz.pin 1.28 # pin endstop.minz.homing_direction home_to_min # direction it moves to the endstop endstop.minz.homing_position 0 # the cartesian coordinate this is set to when it homes endstop.minz.axis Z # the axis designator endstop.minz.max_travel 100 # the maximum travel in mm before it times out endstop.minz.fast_rate 10 # fast homing rate in mm/sec endstop.minz.slow_rate 2 # slow homing rate in mm/sec endstop.minz.retract 5 # bounce off endstop in mm # uncomment for homing to max and comment the min above #endstop.maxz.enable true # enable an endstop #endstop.maxz.pin 1.29 # pin #endstop.maxz.homing_direction home_to_max # direction it moves to the endstop #endstop.maxz.homing_position 200 # the cartesian coordinate this is set to when it homes #endstop.maxz.axis Z # the axis designator #endstop.maxz.max_travel 100 # the maximum travel in mm before it times out #endstop.maxz.fast_rate 10 # fast homing rate in mm/sec #endstop.maxz.slow_rate 2 # slow homing rate in mm/sec #endstop.maxz.retract 5 # bounce off endstop in mm # optional enable limit switches, actions will stop if any enabled limit switch is triggered #endstop.minx.limit_enable false # set to true to enable the limit on this endstop #endstop.miny.limit_enable false # set to true to enable the limit on this endstop #endstop.minz.limit_enable false # set to true to enable the limit on this endstop # also define the pin needed and the Axis designator if limit on a max pin not defined above #endstop.maxx.enable true # enable an endstop #endstop.maxx.pin 1.25 # pin #endstop.maxx.limit_enable true # set to true to enable the limit on this endstop #endstop.maxx.axis X # the axis designator # OPTIONAL uncomment for homing the A axis to min #endstop.mina.enable true # enable an endstop #endstop.mina.pin 1.29 # pin #endstop.mina.homing_direction home_to_min # direction it moves to the endstop #endstop.mina.homing_position 200 # the cartesian coordinate this is set to when it homes #endstop.mina.axis A # the axis designator #endstop.mina.max_travel 100 # the maximum travel in mm before it times out #endstop.mina.fast_rate 10 # fast homing rate in mm/sec #endstop.mina.slow_rate 2 # slow homing rate in mm/sec #endstop.mina.retract 5 # bounce off endstop in mm # type of machine #corexy_homing false # set to true if homing on a hbot or corexy # optional order in which axis will home, default is they all home at the same time, # if this is set it will force each axis to home one at a time in the specified order #homing_order XYZ # x axis followed by y then z last #move_to_origin_after_home false # move XY to 0,0 after homing #endstop_debounce_count 100 # uncomment if you get noise on your endstops, default is 100 #endstop_debounce_ms 1 # uncomment if you get noise on your endstops, default is 1 millisecond debounce #home_z_first true # uncomment and set to true to home the Z first, otherwise Z homes after XY