gregs.jpg

Extruder module

Extruders are used to push plastic filament thru a hotend, to achieve the awesome feat of 3D Printing.

This module controls the motor that pushes the filament, it does not take care of the hotend itself, which is the job of TemperatureControl.

The most important parameter to get your extruder module to work properly, is extruder.module-name.steps_per_mm.

You can create as many Extruder modules as you want, as long as you give them different module names. You can name those modules whatever you want ( as long as you stick to only alphanumerical characters ).

Configuration

All options

All of the options currently supported by the Extruder module : 

Option Example value Explanation
extruder.module_name.enable true Whether to activate the extruder module at all. All configuration is ignored if false. Each time an extruder.module_name.enable line is encountered, an extruder module with the name «module_name» will be created.
extruder.module_name.steps_per_mm 140 Steps/millimetre for the extruder stepper motor. This is the number of steps to move one millimetre of filament. Learn more
extruder.module_name.filament_diameter 1.74 Filament diameter, in millimetres, used for volumetric extrusion control. Learn more
extruder.module_name.default_feed_rate 600 Default rate in millimetres/minute for moves where only the extruder moves. This is only used if you have never provided a feedrate via the F parameter. Once you specify a F parameter, it will be used as the Extruder feed rate until you reset the board.
extruder.module_name.acceleration 500 Acceleration for the extruder stepper motor, in millimetres/second/second
extruder.module_name.max_speed 50 Maximum allowable speed for the extruder stepper motor, in millimetres/second
extruder.module_name.step_pin 2.3 Pin for extruder stepper motor driver's step signal
extruder.module_name.dir_pin 0.22 Pin for extruder stepper motor driver's direction signal
extruder.module_name.en_pin 0.21 Pin for extruder stepper motor driver's enable signal
extruder.module_name.x_offset 0 Extruder offset from origin in millimetres for the X axis. This is useful when you have multiple extruders to specify the offset from each extruder to the first one.
extruder.module_name.y_offset 0 Extruder offset from origin in millimetres for the Y axis.
extruder.module_name.z_offset 0 Extruder offset from origin in millimetres for the Z axis.
extruder.module_name.retract_length 3 Retract length in millimetres. Retract is a retractation of the filament called using the G10 G-code. It is recovered ( reverted ) using the G11 G-code. Learn more about retractation
extruder.module_name.retract_feedrate 45 Retract feed-rate ( filament speed ) in millimetres/second
extruder.module_name.retract_recover_length 0 Additional length when recovering ( if you retract by 1mm, you will be recovering by 1mm plus this value )
extruder.module_name.retract_recover_feedrate 8 Recovery feed-rate in millimetres/second (should be less than retract feedrate)
extruder.module_name.retract_zlift_length 0 Z-lift on retract in millimeters, set to 0 if you want to disable retraction Z-lift. Z-lift is a small increase in the Z axis position when retracting.
extruder.module_name.retract_zlift_feedrate 6000 Z-lift feed-rate in millimetres/minute ( Note : mm/min NOT mm/sec)
delta_current 1.5 First extruder stepper motor driver ( M4 ) current in Amperes
epsilon_current 1.5 Second extruder stepper motor driver ( M5 ) current in Amperes

Format

This is the new format which allows multiple extruders. The old format is deprecated. The old "one-extruder-only" configuration options will still be valid for backward compatibility, but it is recommended not to use them.

For example where before you used extruder_steps_per_mm you must now use extruder.module-name.steps_per_mm.

Steps per millimeter

The number of steps on the stepper motor drivers smoothie needs to generate if it wants to move the filament 1 millimeter.

This value depends on your stepper motor, the microstepping on your stepper motor drivers, the gear reduction ratio on the extruder assembly if any and the diameter of your hobbed pulley/bolt.

A very good guide on how to find this value can be found here : http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide#E_steps

extruder.hotend.steps_per_mm                        140

Filament diameter

This is an optional parameter for those who want to use volumetric extrusion, but are too lazy to do their own math. ;) Simply enter the machine's filament diameter here and set your slicer's filament diameter to 1.128379mm ( 2*sqrt(1/pi) ) and enjoy portable gcode! Further explanation can be found in Triffid_Hunter's guide, linked above.

Marlin differences

Smoothie differs from Marlin here, Smoothie only applies the volumetric extrusion to printing moves, so when you click extrude 10mm in Pronterface Smoothie will still do that. There is no need to calculate what 10mm is in volumetric units. Also when firmware retraction is used, the retraction length is still in mm not mm^3.

However if you wish to have both E only moves (retracts) and printing moves in volumetric units you still can, do not set M200 or filament_diameter and set your E steps/mm to E steps/mm³ as per triffid hunters guide linked above.

extruder.hotend.filament_diameter                   3.0

The filament diameter can also be saved at run time with this M code

M200 Set E units for volumetric extrusion - D<filament diameter> set to 0 to disable volumetric extrusion M200 D3.0

and saved with M500.

Firmware Retract

G10/G11 will cause the filament to retract and unretract, this option can be set in most current slicers.

The amounts of extrusion and speed can be set with the following M codes

M207 set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop] Q[zlift feedrate mm/min] M207 S4 F30 Z1
M208 set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/min] M208 S0 F8

or can be set in config with the following settings…

extruder.hotend.retract_length                  3               # retract length in mm
extruder.hotend.retract_feedrate                45              # retract feedrate in mm/sec
extruder.hotend.retract_recover_length          0               # additional length for recover
extruder.hotend.retract_recover_feedrate        8               # recover feedrate in mm/sec (should be less than retract feedrate)
extruder.hotend.retract_zlift_length            0               # zlift on retract in mm, 0 disables
extruder.hotend.retract_zlift_feedrate          6000            # zlift feedrate in mm/min (Note mm/min NOT mm/sec)

These can be set differently for each extruder defined.

Config/Gcode difference

Please note the inconsistency here with the config specifying mm/sec and the M206/207 specifying mm/min.

Sorry about that.

Pins

As all stepper motors, the extruder stepper motor needs 3 pins to be controlled : step, direction and enable (Pin Reference):

1st Extruder (delta)

extruder.hotend.step_pin                     2.3
extruder.hotend.dir_pin                      0.22
extruder.hotend.en_pin                       0.21

Note

These pins are for the delta ( 4th ) driver on a Smoothieboard. This is what is most commonly used, but in another board or setup, you may have to use other pins.

2nd Extruder (epsilon)

extruder.hotend2.step_pin                     2.8
extruder.hotend2.dir_pin                     2.13
extruder.hotend2.en_pin                      4.29

Note

These pins are for the epsilon ( 5th ) driver on a Smoothieboard. This is what is most commonly used, but in another board or setup, you may have to use other pins.

Advanced pin configuration

You can have a pin's output inverted by adding a "!" after this pin's number in the config line, example :

my_pin_name                      19!

There are other modifiers for pins :

All options

! invert pin
o set pin to open drain
^ set pin to pull up
v set pin to pull down
- to set no pullup
@ to set repeater mode

Current

On boards which feature current control of the stepper motor drivers ( Smoothieboard or 4pi ), you have to set that value for the extruder too.

This is handled by the Currentcontrol module, but usually, the line for the configuration of a given stepper motor is written along with it's pins, for clarity.

delta_current                                1.5

Set the value to the exact value your stepper motor is rated for ( or less, for less noise, but less torque ).

Setting the current to a value higher than the recommended one causes overheating, and skipped steps.

G-code

Here are the G-code commands currently supported by the Extruder module : 

  • G0/G1 : Move to the given coordinates. The F parameter defines speed and is remembered by subsequent commands ( specified in millimetres/minute ) (command is modal)
  • G10 : Do firmware extruder retract
  • G11 : Do firmware extruder un-retract
  • G90 : Absolute mode ( default ) : passed coordinates will be considered absolute (command is modal)
  • G91 : Relative mode : passed coordinates will be considered relative to the current point (command is modal )
  • G92 : Set current position to specified coordinates
  • M17 : Turn the active stepper motor driver's off
  • M18 : Turn the active stepper motor driver's on
  • M82 : Set absolute mode for extruder only
  • M83 : Set relative mode for extruder only
  • M84 : Turn the active stepper motor driver's on
  • M92 : Set this axis' steps per millimetre. For example M92 E100 to set for the currently active Extruder, and M92 E100 P2 to set for the second extruder.
  • M114 : Displays XYZ position, as well as the E position of the currently active Extruder
  • M200 : Set E units for volumetric extrusion - D<filament diameter> set to 0 to disable volumetric extrusion, for example : M200 D3.0 to set for the currently active Extruder, and M200 D3.0 P3 to set for the third Extruder.
  • M203 : Set maximum rate for axis, set E for Extruder axis or V for volumetric extrusion limit, for example : M203 V10 will limit extrusion moves to no faster than 10mm^3/s. M203 V0 disables.
  • M204 : Set acceleration in mm/sec^2, E<nnn> sets extruder only move acceleration, for example : M204 E500. P selects the extruder, uses the currently active extruder if omitted.
  • M207 : Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop] Q[zlift feedrate mm/min], for example : M207 S4 F30 Z1
  • M208 : Set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/min], for example : M208 S0 F8
  • M221 : S<flow rate factor in percent> : Set flow rate factor override percentage for current extruder
  • M500 : Save volatile settings to an override file
  • M503 : Display volatile settings