Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
from-marlin [2017/02/20 16:24]
arthur
from-marlin [2021/02/22 17:50] (current)
Line 1: Line 1:
 +~~NOTOC~~
 +
 == Moving from Marlin to Smoothie == Moving from Marlin to Smoothie
  
 If you are a Marlin user moving to a Smoothie system, you might have an existing configuration you want to port over. If you are a Marlin user moving to a Smoothie system, you might have an existing configuration you want to port over.
 +
 +<callout type="warning" icon="true" title="This is not an alternative to reading the documentation">
  
 Please note it is imperative you read the whole documentation before using Smoothie. Skipping this step **will** almost certainly result in damage and danger. Please note it is imperative you read the whole documentation before using Smoothie. Skipping this step **will** almost certainly result in damage and danger.
 +
 +Again, read the whole documentation, do not only rely on this guide.
 +
 +</callout>
  
 Assuming you have read the documentation ( again : do it, do not skip the documentation ), this page is aimed at helping you understand what Marlin options correspond to what Smoothie options. Assuming you have read the documentation ( again : do it, do not skip the documentation ), this page is aimed at helping you understand what Marlin options correspond to what Smoothie options.
Line 10: Line 18:
  
 This assumes you start from the [[configuring-smoothie|default configuration file]]. This assumes you start from the [[configuring-smoothie|default configuration file]].
- 
-Again, read the whole documentation, do not only rely on this guide. 
  
 === Baud rate === Baud rate
Line 19: Line 25:
 When talking to your Smoothieboard over the UART port, you have to set the baud rate. In Marlin that is done with :  When talking to your Smoothieboard over the UART port, you have to set the baud rate. In Marlin that is done with : 
  
-<code>+<code cpp>
 #define BAUDRATE 115200 #define BAUDRATE 115200
 </code> </code>
Line 33: Line 39:
 In Marlin, you define the number of extruders by changing this value :  In Marlin, you define the number of extruders by changing this value : 
  
-<code>+<code cpp>
 #define EXTRUDERS 1 #define EXTRUDERS 1
 </code> </code>
  
-in Smoothie, things are very much more modular, and you configure extruders by creating new extruder modules. If you have one extruder, you create one extruder module, if you have three, you create three extruder modules.+in Smoothie, things are much more modular, and you configure extruders by creating new extruder modules. If you have one extruder, you create one extruder module, if you have three, you create three extruder modules.
  
 For details see [[extruder|Extruder]] and [[multiple-extruders|Multiple extruders]]. For details see [[extruder|Extruder]] and [[multiple-extruders|Multiple extruders]].
Line 45: Line 51:
 If you have multiple extruders but a single nozzle, in Marlin you set the following value :  If you have multiple extruders but a single nozzle, in Marlin you set the following value : 
  
-<code>+<code cpp>
 #define SINGLENOZZLE #define SINGLENOZZLE
 </code> </code>
Line 55: Line 61:
 If you have multiple nozzles, you need to tell your firmware where they are located relative to each other, in Marlin you do :  If you have multiple nozzles, you need to tell your firmware where they are located relative to each other, in Marlin you do : 
  
-<code>+<code cpp>
 //#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
 //#define HOTEND_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis //#define HOTEND_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
Line 84: Line 90:
 In Marlin, you tell Marlin you want to control a power supply by doing :  In Marlin, you tell Marlin you want to control a power supply by doing : 
  
-<code>+<code cpp>
 #define POWER_SUPPLY 1 #define POWER_SUPPLY 1
 </code> </code>
Line 98: Line 104:
 switch.psu.output_pin                        0.25o!           # open drain, inverted switch.psu.output_pin                        0.25o!           # open drain, inverted
 switch.psu.output_type                       digital          # on/off only switch.psu.output_type                       digital          # on/off only
-switch.psu.fail_safe_set_to                  1                # so the ATX turns off on a system crash+switch.psu.failsafe_set_to                   1                # so the ATX turns off on a system crash
 #switch.psu.ignore_on_halt                   true             # so the ATX does not turn off on a HALT condition (like limit trigger) #switch.psu.ignore_on_halt                   true             # so the ATX does not turn off on a HALT condition (like limit trigger)
                                                               # However leave commented or set to false if you want the ATX                                                               # However leave commented or set to false if you want the ATX
Line 108: Line 114:
 In Marlin, you associate the number of a thermistor type with a given thermistor input :  In Marlin, you associate the number of a thermistor type with a given thermistor input : 
  
-<code>+<code cpp>
 #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_0 5
 #define TEMP_SENSOR_1 0 #define TEMP_SENSOR_1 0
Line 132: Line 138:
 In Marlin, you set the PID parameters for the hotend this way :  In Marlin, you set the PID parameters for the hotend this way : 
  
-<code>+<code cpp>
   #define  DEFAULT_Kp 22.2   #define  DEFAULT_Kp 22.2
   #define  DEFAULT_Ki 1.08   #define  DEFAULT_Ki 1.08
Line 152: Line 158:
 In Marlin, you change kinematics by uncommenting one of the following lines :  In Marlin, you change kinematics by uncommenting one of the following lines : 
  
-<code>+<code cpp>
 //#define COREXY //#define COREXY
 //#define COREXZ //#define COREXZ
Line 184: Line 190:
 In Marlin, you choose which endstops are activated and which are not by changing these values :  In Marlin, you choose which endstops are activated and which are not by changing these values : 
  
-<code>+<code cpp>
 #define USE_XMIN_PLUG #define USE_XMIN_PLUG
 #define USE_YMIN_PLUG #define USE_YMIN_PLUG
Line 201: Line 207:
  
 Has the endstop for the alpha tower ( X axis ) minimum disabled, but the one for the alpha tower ( X axis ) maximum enabled ( as is common for delta machines ). Has the endstop for the alpha tower ( X axis ) minimum disabled, but the one for the alpha tower ( X axis ) maximum enabled ( as is common for delta machines ).
 +
 +Alpha is X, beta is Y, and gamma is Z. 
 +
 +Smoothie uses these to differentiate "axes" from "actuators"
 +
 +They are the same thing on cartesian machines, but are different on other machines, and it is important to distinguish them or the configuration would quickly get confusing. 
 +
 +Essentially cartesian users have to suffer a small discomfort so that other users can have a better life. Thanks Cartesian users !
 +
  
 === Endstop pullups === Endstop pullups
Line 206: Line 221:
 In Marlin you set the pull-up of an endstop by changing :  In Marlin you set the pull-up of an endstop by changing : 
  
-<code>+<code cpp>
  
 #define ENDSTOPPULLUPS #define ENDSTOPPULLUPS
Line 229: Line 244:
 In Marlin you invert an endstop by changing :  In Marlin you invert an endstop by changing : 
  
-<code>+<code cpp>
 // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
 #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
Line 244: Line 259:
 === Homing speed === Homing speed
  
-In Marlin, you change the homing speed by modifying +In Marlin, you change the homing speed by modifying :  
 + 
 +<code cpp> 
 +// Homing speeds (mm/m) 
 +#define HOMING_FEEDRATE_XY (50*60) 
 +#define HOMING_FEEDRATE_Z  (4*60) 
 +</code> 
 + 
 +While in Smoothie you modify :  
 + 
 +<code> 
 +# Endstops home at their fast feedrate first, then once the endstop is found they home again at their slow feedrate for accuracy 
 +alpha_fast_homing_rate_mm_s                  50               # Alpha/X fast homing feedrate in mm/second 
 +alpha_slow_homing_rate_mm_s                  25               # Alpha/X slow homing feedrate in mm/second 
 +beta_fast_homing_rate_mm_s                   50               # Beta/ fast homing feedrate in mm/second 
 +beta_slow_homing_rate_mm_s                   25               # Beta/ slow homing feedrate in mm/second 
 +gamma_fast_homing_rate_mm_s                  4                # Gamma/Z fast homing feedrate in mm/second 
 +gamma_slow_homing_rate_mm_s                  2                # Gamma/Z slow homing feedrate in mm/second 
 +</code> 
 + 
 +Where alpha is X, beta is Y, and gamma is Z. 
 + 
 +=== Steps per millimeters 
 + 
 +In Marlin, you set the steps per millimeters for each axis by changing :  
 + 
 +<code cpp> 
 +/** 
 + * Default Axis Steps Per Unit (steps/mm) 
 + * Override with M92 
 +                                      X, Y, Z, E0 [[,|E1[[,|E2[, E3]]]]] 
 + */ 
 +#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 } 
 +</code> 
 + 
 +While in Smoothie , you edit the steps for the primary axes by changing :  
 + 
 +<code> 
 +# Arm solution configuration : Cartesian robot. Translates mm positions into stepper positions 
 +# See http://smoothieware.org/stepper-motors 
 +alpha_steps_per_mm                           80               # Steps per mm for alpha ( X ) stepper 
 +beta_steps_per_mm                            80               # Steps per mm for beta ( Y ) stepper 
 +gamma_steps_per_mm                           4000             # Steps per mm for gamma ( Z ) stepper 
 +</code> 
 + 
 +Where alpha is X, beta is Y, and gamma is Z. 
 + 
 +And for the extruders, you edit the value in each Extruder's specific module configuration, for example :  
 + 
 +<code> 
 +extruder.hotend.steps_per_mm                    500           # Steps per mm for extruder stepper 
 +</code> 
 + 
 +=== Default max feed rates 
 + 
 +In Marlin, you set the maximum feed rates ( speeds ) by changing :  
 + 
 +<code cpp> 
 +/** 
 + * Default Max Feed Rate (mm/s) 
 + * Override with M203 
 +                                      X, Y, Z, E0 [[,|E1[[,|E2[, E3]]]]] 
 + */ 
 +#define DEFAULT_MAX_FEEDRATE { 500, 500, 2.25, 45 } 
 +</code> 
 + 
 +Note the unit is millimeters per seconds. 
 + 
 +In Smoothie, we can specify maximum values for the axes and for the actuators, which allows to more finely respecting the machine's limits. 
 + 
 +We change the maximum feed rate for the main axes by changing :  
 + 
 +<code> 
 +# Cartesian axis speed limits 
 +x_axis_max_speed                             30000            # Maximum speed in mm/min 
 +y_axis_max_speed                             30000            # Maximum speed in mm/min 
 +z_axis_max_speed                             300              # Maximum speed in mm/min 
 +</code> 
 + 
 +Note the unit is millimeters per minute. 
 + 
 +And the maximum feed rates for the main **actuators** is changed with :  
 + 
 +<code> 
 +alpha_max_rate                               30000.0          # Maximum rate in mm/min 
 +beta_max_rate                                30000.0          # Maxmimum rate in mm/min 
 +gamma_max_rate                               300.0            # Maximum rate in mm/min 
 +</code> 
 + 
 +Note the unit is millimeters per minute. 
 + 
 +We can also set the maximum feedrate for each extruder by modifying each extruder's module configuration :  
 + 
 +<code> 
 +extruder.hotend.max_speed                       50            # Maximum speed in mm/s 
 +</code> 
 + 
 +Note the unit is millimeters per second 
 + 
 +=== Acceleration 
 + 
 +In Marlin you set the acceleration for each axis by doing :  
 + 
 +<code cpp> 
 +#define DEFAULT_MAX_ACCELERATION      { 3000, 3000, 100, 10000 } 
 +</code> 
 + 
 +While in Smoothie you modify :  
 + 
 +<code> 
 +acceleration    3000 
 +</code> 
 + 
 +To set separate values for each axis, see [[motion-control|Motion control]]. 
 + 
 +=== Jerk 
 + 
 +In Marlin, you set how hard axes can accelerate and decelerate at direction changes by modifying :  
 + 
 +<code cpp> 
 +/** 
 + * Default Jerk (mm/s) 
 + * Override with M205 X Y Z E 
 + * 
 + * "Jerk" specifies the minimum speed change that requires acceleration. 
 + * When changing speed and direction, if the difference is less than the 
 + * value set here, it may happen instantaneously. 
 + */ 
 +#define DEFAULT_XJERK                 20.0 
 +#define DEFAULT_YJERK                 20.0 
 +#define DEFAULT_ZJERK                  0.4 
 +#define DEFAULT_EJERK                  5.0 
 +</code> 
 + 
 +However Smoothie uses a different concept, which more finely allows to regulate speeds. You need to modify the value :  
 + 
 +<code> 
 +junction_deviation                           0.05             # See http://smoothieware.org/motion-control#junction-deviation 
 +</code> 
 + 
 +This is not an exact science as smoothie and marlin's methods are different, but if you are looking for a "start" value ( that will still likely have to be tuned ), you can find your junction_deviation by dividing Marlin's jerk by 60 :  
 + 
 +(DEFAULT_XYJERK ) / (60) = (junction_deviation) 
 + 
 + 
 +=== Zprobe 
 + 
 +Marlin and Smoothie are very different in this regard, please carefully read the documentation for the [[zprobe|Probing with Smoothie]] module. 
 + 
 +=== Motor direction 
 + 
 +In Marlin, you change the direction of an axis by modifying :  
 + 
 +<code cpp> 
 +#define INVERT_X_DIR true 
 +#define INVERT_Y_DIR false 
 +#define INVERT_Z_DIR true 
 + 
 +#define INVERT_E0_DIR false 
 +#define INVERT_E1_DIR false 
 +#define INVERT_E2_DIR false 
 +#define INVERT_E3_DIR false 
 +</code> 
 + 
 +While in Smoothie, you do this by adding a <key>!</key> to the direction pin of that axis, for example to invert your alpha ( X ) axis, change it's configuration from :  
 + 
 +<code> 
 +# Stepper module configuration  
 +# Pins are defined as  ports, and pin numbers, appending "!" to the number will invert a pin 
 +# See http://smoothieware.org/pin-configuration and http://smoothieware.org/pinout 
 +alpha_step_pin                               2.0              # Pin for alpha stepper step signal 
 +alpha_dir_pin                                0.5              # Pin for alpha stepper direction, add '!' to reverse direction 
 +alpha_en_pin                                 0.4              # Pin for alpha enable pin 
 +alpha_current                                1.5              # X stepper motor current 
 +alpha_max_rate                               30000.0          # Maximum rate in mm/min 
 +</code> 
 + 
 +to :  
 + 
 +<code> 
 +# Stepper module configuration  
 +# Pins are defined as  ports, and pin numbers, appending "!" to the number will invert a pin 
 +# See http://smoothieware.org/pin-configuration and http://smoothieware.org/pinout 
 +alpha_step_pin                               2.0              # Pin for alpha stepper step signal 
 +alpha_dir_pin                                0.5!             # Pin for alpha stepper direction, add '!' to reverse direction 
 +alpha_en_pin                                 0.4              # Pin for alpha enable pin 
 +alpha_current                                1.5              # X stepper motor current 
 +alpha_max_rate                               30000.0          # Maximum rate in mm/min 
 +</code> 
 + 
 +=== Homing direction 
 + 
 +In Marlin, you change whether an axis is homed to min or homed to max by modifying :  
 + 
 +<code cpp> 
 +#define X_HOME_DIR -1 
 +#define Y_HOME_DIR -1 
 +#define Z_HOME_DIR -1 
 +</code> 
 + 
 +While in Smoothie, you do this by changing the <key>homing_direction</key> parameter for each actuator :  
 + 
 +<code> 
 +alpha_homing_direction                       home_to_min      # Or set to home_to_max and set alpha_max and uncomment the alpha_max_endstop 
 +</code> 
 + 
 +changes to :  
 + 
 +<code> 
 +alpha_homing_direction                       home_to_max      # Or set to home_to_max and set alpha_max and uncomment the alpha_max_endstop 
 +</code> 
 + 
 +=== Filament runout sensors 
 + 
 +In Marlin, you configure this sensor by doing :  
 + 
 +<code cpp> 
 +//#define FILAMENT_RUNOUT_SENSOR 
 +#if ENABLED(FILAMENT_RUNOUT_SENSOR) 
 +  #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. 
 +  #define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined. 
 +  #define FILAMENT_RUNOUT_SCRIPT "M600" 
 +#endif 
 +</code> 
 + 
 +While in Smoothie you use the [[filament-detector|Filament detector]] module 
 + 
 +=== Bed levelling 
 + 
 +In Marlin, you use options such as :  
 + 
 +<code cpp> 
 +//#define MESH_BED_LEVELING 
 +</code> 
 + 
 +Smoothie is sufficently different that a guide wouldn't make much sense, please make sure you **fully** read the documentation on [[zprobe|Probing with Smoothie]]. Smoothie supports 3-point, mesh levelling ( called "grid" ) and calibration. 
 + 
 +=== Homing to center 
 + 
 +Marlin allows you to home to the center of the machine by doing :  
 + 
 +<code cpp> 
 +//#define BED_CENTER_AT_0_0 
 +</code> 
 + 
 +While in Smoothie you can specify the center at any point you wish by defining the min or max values of your axes. 
 + 
 +For example, if your X axis is 400mm wide, it is set to home to min, and you want the center of the axis to be 200mm from each end, you simply set :  
 + 
 +<code> 
 +alpha_min                                    -200                # This gets loaded as the current position after homing when home_to_min is set 
 +</code> 
 + 
 +=== LCD interface 
 + 
 +To configure your LCD interface in Smoothie, see [[panel|Using Panel controllers with Smoothieboard]] 
 + 
 +=== Servos 
 + 
 +To configure a servo in Smoothie, see how to use the [[switch|Switch module]] 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 +