smoothieware-website-v1

Extruder

Extruders are used to push plastic filament through 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 (although you may run out of memory and Smoothie will no longer boot), 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). NOTE that the default build of Smoothie only supports 2 extruders (5 axis), if you need 3 extruders you need to compile with make AXIS=6.

Configuration

Steps per millimeter

We need to find the number of steps the stepper motor drivers have to generate in order 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: Triffid Hunter’s Calibration Guide

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.

[!WARNING] In the current edge builds, when a filament diameter is specified either from M200 Dxxx or the config setting Smoothie expects all E values specified to be in mm³, so when you click extrude 10mm in Pronterface Smoothie will actually extrude 10mm³. And E values in a gcode file will all be expected to be mm³. Note that when firmware retraction is specified via M207 the retraction length is still in mm not mm³, but will be converted to mm³ based on the filament diameter at the time of extrusion.

In the current master builds, only print moves have E specified in mm³, retract or extrude only moves are still in mm. The change in edge is to be more compliant with other firmwares and user expectations.

extruder.hotend.filament_diameter 3.0

The filament diameter can also be saved at runtime with this M code:

M200 Set E units for volumetric extrusion - D 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.

Note this is optional, you are not obligated to set this up, but it is a nice feature if you want to use it.

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.

[!WARNING] 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 (See Pin Reference and Pinout):

1st Extruder (delta, or M4)

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

[!WARNING] 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, or M5)

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

[!WARNING] 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.

[!TIP] You can do special things to Smoothie pins, for example, you can invert them, which is useful to revert the direction of your extruder if it is wired the wrong way around on your board, see Pin Configuration.

You can make your extruder module use any other stepper motor driver, or even an external stepper motor driver, simply by providing the adequate pins for that driver, see Pinout.

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 its 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.

Example

Here is an example of a common configuration and wiring of an extruder with a Smoothieboard.

This example setup is of an extruder (stepper motor) connected to the M4 stepper motor driver.

If your machine has multiple extruders, you also want to look at multiple-extruders.

Configuration

The default Smoothie configuration example contains an example extruder section, this means you do not need to create a new one, but you can just re-use the sample one.

The configuration looks like this:

## Extruder module configuration
# See http://smoothieware.org/extruder
extruder.hotend.enable true # Whether to activate the extruder module at all. All configuration is ignored if false
extruder.hotend.steps_per_mm 140 # Steps per mm for extruder stepper
extruder.hotend.default_feed_rate 600 # Default rate (mm/minute) for moves where only the extruder moves
extruder.hotend.acceleration 500 # Acceleration for the stepper motor mm/sec²
extruder.hotend.max_speed 50 # Maximum speed in mm/s

extruder.hotend.step_pin 2.3 # Pin for extruder step signal
extruder.hotend.dir_pin 0.22 # Pin for extruder dir signal (add '!' to reverse direction)
extruder.hotend.en_pin 0.21 # Pin for extruder enable signal

delta_current 1.5 # Current setting in Amperes for this motor driver

Now that your extruder is configured, you can wire it:

Wiring

Wiring your extruder stepper motor is very similar to how you wire your X, Y, and Z stepper motors (see adequate documentation): you just wire the 4 wires of the stepper motor, to the output connector of the M4 stepper motor driver.

All options

All of the options currently supported by the Extruder module:

| Option | Example value | Explanation | | —— | ————- | ———– |

Parameter Default Description
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. ONLY used 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. ONLY used for multiple extruders
extruder.module_name.z_offset 0 Extruder offset from origin in millimetres for the Z axis. ONLY used for multiple extruders
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

[!NOTE] 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.

G-code

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

[!TIP] If you want to learn more about this module, or are curious how it works, Smoothie is Open-Source and you can simply go look at the code, here.

External resources