Tuning the Stepper Motors

After you've tested the basic functions of your SMuFF...

...you might want to fine tune your setup.

One important step in setting up the SMuFF for operation, is the (fine) tuning of your stepper motor speeds. The basic settings in the SMuFF configuration are chosen conservatively. Though, on a tool changer, you don't want to waste time on swapping tools and hence increase the print time too much.

The speed, the Feeder stepper motor runs at, directly influences the time needed for a tool change. This can be either 20 seconds or 2 minutes for one single change. Multiply that with the number of tool changes in your print, and you'll get the total time the 3D printer is just sitting there and "waiting".
That's where the fine tuning chimes in and mostly concerns the Feeder stepper motor. 

The trick here is to figure out the max. speed of your steppers, without running them into stalls. This depends on a couple of factors:

The first three are given by the hardware you have, so there's not much to tweak here. The later two can (and should) be configured in the firmware. The stepper motors/drivers mainly use these settings:

Before I explain those settings, please keep in mind that the default speed values shown here are in timer ticks in contrast to your 3D printer, which usually denotes speeds in mm/s or mm/min.
Although the SMuFF firmware is capable of handling speed settings in mm/s, timer ticks are more granular and accurate and hence the default.
The major difference between timer ticks and mm/s to point out is: The lower the timer tick value is, the faster will the stepper motor turn.  

To shed some light on the relation between timer ticks and mm/s or mm/min, here's a spreadsheet for the technically interested, which I've used to tune the firmware: 

Stepper-Timer Clock-Speed Translation

On a side note:
Sending a M205 P"XlateSpeed" Z S100 command to the SMuFF via console, will tell you how many timer ticks are needed to achieve an equivalent of 100 mm/s on the Z-Axis (a.k.a Feeder):

What to fine tune?

Let's put up those settings once again:

There are two important speed settings the firmware uses: The Maximum speed and the Acceleration speed. The Acceleration speed is the (slower) starting speed, which continuously increases over the Acceleration Distance until the stepper reaches Maximum speed. This value is also being used for decelerating the stepper motor, as it is about to reach the end distance.

The Insert speed shown above, is only being used on the Feeder stepper and takes place as the SMuFF is pushing filament out of the Filament-Guides into the Selector, hence this setting isn't available for any of the other steppers (Selector and DDE that is).

The Acceleration Distance is the distance in mm over which the acceleration (and also the deceleration) take place. In this case, it's 10 mm.

The Step Delay isn't really useful from firmware version 3.16 on, so simply ignore this setting and make sure it's set to 0. It has been used in older versions to form a decent waveform for the STEP signal on the stepper driver, but 3.16 has improved this behavior drastically.

As mentioned already in the prologue, there are more settings that come into play for stepper speeds. These can be either set in the SMuFF-WI Settings, if your board is equipped with on-board stepper drivers that can be configured via software, or, these have to be configured via hardware on older controller boards such as the SKR E3-DIP V1.1: Those settings are the Micro Stepping and the Vref voltage (Power) applied to the stepper motors by the driver.

Please note: Since you don't have the option of applying those values comfortably via software on some older controller boards, you have to do it by using the MS1/MS2/MS3 jumpers (as shown here) and set the Vref  voltage via the integrated potentiometer on the stepper driver itself (a.k.a. Stepstick). 

Stepper Motor Power Settings

The Power setting (a.k.a. Vref) depends on the make and brand of your stepper motors and there are several formulas on how to calculate the appropriate value.  A rule of thumb for a standard NEMA17 motor is: Set it to 700-800 mA.

Please keep in mind that this power setting depends on the maximum allowed current per coil of your stepper motor, which is usually denoted somewhere in the datasheet, provided by the manufacturer.

Important fact: The more power you apply to the stepper motor, the higher the motor torque will be, and hence the lower the chance for the motor running into a stall, even at higher speeds. But also, the more power you apply, the hotter the stepper motor will get during operation.
Modern stepper motors can handle quite some temperature with ease (up to 80 C, some even up to 120 C) but the printed part the motor is attached to, may not be as forgiving! There's a high risk of the plastic being either deformed or even melting, if the stepper temperature gets too high, keep that in mind!

Hence: As soon as you change the power settings, make sure you monitor the stepper motor temperature over a given period of "time in operation" to ensure it doesn't get too hot and damage your SMuFF.

Stepper Driver Micro Stepping

The Micro Stepping on the other hand is used to get a more precise positioning of the stepper motor (shaft) and hence the axis it's attached to.
Although 1/16 micro stepping is very common and mostly default on 3D printers nowadays, the SMuFF doesn't necessarily need that grade of precision.
The more steps (pulses) a firmware needs to generate for the stepper driver, the slower the motion of the stepper motor itself will be.

Hence, the first thing you can optimize to achieve higher speeds is to decrease the micro stepping. A 1/8 or even a 1/4 micro stepping is sufficient for what the SMuFF is supposed to do, but keep in mind that changing the micro stepping also directly influences the Steps per mm, so you have to change those as well. 

For example: If your steps/mm are configured to a value of 403 (which is the default for Bondtech gears in 1/16 MS) and you change the micro stepping to 1/8, you have to halve the steps/mm to 202-204. Accordingly, if you go for 1/4 micro stepping, you need to set the steps/mm to 101-102.
To determine the correct steps/mm value, you have to extrude e.g. 100 mm (G1 Z100) of filament on the SMuFF and measure the length of the filament extruded. It is just the same process as if you'd do it to calibrate the steps/mm on your 3D printer. 

Please notice: Even though you reduce the micro stepping, no worries that this will influence your print! This setting applies only to the loading/unloading  filament process. After that, the 3D printer driver takes over again and will continue printing with the resolution (micro steps) you have configured in your printers firmware.

Testing

In order to change and test the speed settings for your SMuFF, I'd highly recommend using SMuFF-WI, since it's the most convenient tool for this task. Not only that you're able to make changes 'on-the-fly' but you can also test them right away, i.e. by loading/unloading the filament.

Please notice: Most of the parameter modifications don't need a reboot of the SMuFF, though, settings for Power or Micro Stepping do, since those are only being applied at startup. Sometimes, even the stepper driver itself (mostly TMC2209) applies certain parameters only after a reset / power cycle.

As soon as you've found the speed settings you're most comfortable with, go and do another Testrun in order to ensure the new settings are legit in a long run.

SMuFF running Feeder on 1/4 Micro Stepping

Here's now an example of a well tuned SMuFF loading/unloading filament: