This project has been abandoned!
In order to do some proper testing after you've build your SMuFF, you have the option to control it over a connected PC/MAC via the serial interface.
if you don't have one laying around already.
This is a so called "UART to USB" or "TTL2USB" interface. The USB connects to your PC/MAC. The opposite side, where the pin header is located, has 3 pins we'll need for the communication named RX, TX and GND (sometimes also labeled as RXD, TXD, GND).
Make sure you connect these pins to the SKR mini V1.1 TFT header and use a crossover connection for RX (Receive) and TX (Transmit). This means:
RX0 of the TFT header goes to TX(D) of the UART to USB interface
TX0 of the TFT header goes to RX(D) of the UART to USB interface
GND of the TFT header goes to GND of the UART to USB interface
Never connect any power pins (+5V / +3.3V), you don't need them. The interface gets powered by the PC and the SMuFF has to be powered on its own.
NEVER CONNECT THE TFT SERIAL LINES OF THE CONTROLLER DIRECTLY TO A V.24 / RS232 INTERFACE!
Such interfaces operate on a logic level of +12V/-12V and will destroy your controller board instantly. You can recognize them by their Sub-D 9 or Sub-D 25 connector.
if you happen to have a spare Arduino board (such as the Uno, Nano), you may use this one to connect the SMuFF to your PC.
Simply follow the instructions in this video. Keep in mind not to cross over the TX and RX wires and wire the Arduino Reset signal to GND, as explained in the video.
to get in touch with the SMuFF.
You don't need to install anything, just follow this link, click connect and pick the right COM port. It's the most convenient option to control and set up the SMuFF, since you don't have to key in cryptic GCode commands.
All you need to know about the WebInterface is summarized here.
such as TeraTerm for example.
Install the app, run it and pick the Serial communication and the port where the UART to USB interface is connected to.
from the Setup -> Terminal... menu as shown in the picture to the left.
Make sure the New-line settings match and the Local echo is turned on.
Also, make sure in the Setup -> General... menu the Language option has been set to UTF-8.
is setup according to the settings on your SMuFF by opening the Setup -> Serial port... menu.
Pick the right Speed from the drop-down . For the other values use the defaults, i.e.
Data 8-Bit
Parity none
Stop bits 1
Flow control none
Now hit the New setting button to connect to your SMuFF.
in the terminal window, such as M115. If everything is working as expected, the SMuFF will answer by printing the firmware info on the screen.
If that's not the case check the connection of the wires, the port used and the baudrate settings on both, the SMuFF and the terminal app and try again.
Now you're able to control your SMuFF remotely by sending GCode commands.
Enter a 'M' or a 'G' followed by a <CR> into the terminal window and the SMuFF will print you a list of all available commands for this category.
You can, for example, turn the stepper motors off or on (M18) list the contents of the SD-Card (M20) turn the fan on or off (M106/M107) but also alternate the config settings, such as the stepper motors speeds (M203) or the stepper motors acceleration (M201).
Using M503 will print the current loaded configuration on screen, just as you see it in the SMUFF.CFG. After you have modified settings, you can save those to the SD-Card using the M500 GCode.
The G0/G1 commands will move the according stepper to a given position, whereas G0 expects a tool number as parameter and G1 expects a value as parameter. Please keep in mind that the axes X, Y, Z correlate to Selector, Revolver and Feeder. See down below for examples.
By using the T GCode command, you can easily instruct the SMuFF to switch filaments, i.e.:
T1 - will switch to the 2nd filament
T3 S1 - will switch to the 4th filament and automatically load it
T - will report the current filament (T255 means: no filament, Selector is at Home position)
behave just as on your 3D printer. Though, there are some commands which have a special meaning for the SMuFF:
M205 for example is used to setup advanced parameters. The format is M205 P"xxx" Sn, whereas S represents the value and xxx the advanced parameter (see details below).
Some of those GCode commands are being used from within the test scripts.
M17 is very special and it's being used to switch the relay from internal to external state. This GCode is used in conjunction with the "Shared Stepper" feature described here.
Most of the commands will print out their current setting if no parameter follows, i.e.:
M119 will show:
Selector: open Revolver: open Feeder: triggered
to depict the states of the endstops.
M203 for example will show:
X (Selector): 250 mm/s, Delay: 0
Y (Revolver): 40 mm/s, Delay: 2
Z (Feeder): 300 mm/s, Delay: 0
to report the currently set max. speeds and delays for each stepper motor.
To get an overview of all settings at once, use the M503 GCode command.
Some of the GCodes differ slightly from the standard and have been adopted for the SMuFF for convenience reasons.
moves the given axis to the according tool position, i.e. G0 Y3 moves the Revolver into position for tool 3. Only X and Y axes can be addressed by G0.
moves the axis given into the according position in steps (ticks) or, if the parameter T is omitted, in millimetres. Additionally, you may apply the F parameter to override the configured moving speed, i.e.:
G1 X100 F450 - moves the Selector 100 mm with a speed of 450 mm/s
is being used to control a wiper servo (SERVO1). This GCode accepts a list of parameters which are:
Sn the speed in ms for moving the servo back and forth (default: n = 200)
In the minimum position in degrees of the servo while wiping (default: n = 20)
Jn the maximum position in degrees of the servo while wiping (default: n = 45)
Pn the resting position in degrees of the servo (default: n = 100)
Rn the number of repeats or movements between min. and max. position (default: n = 0)
So, in order to use wiping, simply send at least a G12 R10 command or put the according sequence into the SMUFF.CFG file - then a simple G12 will do the job.
switches the relay board from I (internal) to E (external) state, whereas internal means to the N.O. and external to the N.C. terminals. For further details on this topic read this.
will execute (run) a test script located on the SD-Card. The name of the script has to be passed as a parameter in the format P"name".
does not only report the endstop status but can also be utilized to set the status of the Feeder endstop (Z) internally, which is needed in case you have set the ExternalControl parameter to true in the configuration file.
will set the acceleration value for the given stepper (X/Y/Z). It's the same value as stored in SMUFF.CFG.
will set the max. speed value for the given stepper (X/Y/Z). If you apply an additional D parameter, you're able to modify the step delay if necessary. This is the same value as stored in SMUFF.CFG.
is used to setup parameters that are usually defined in SMUFF.CFG but not accessible through GCode commands. The format is:
M205 P"adv_param" Sn [ X | Y | Z ]
whereas S represents the set command of value n and adv_param correlates to the SMUFF.CFG parameter names must be one of the following:
ToolCount
ToolSpacing
BowdenLength
InsertLength
ReinforceLength
SelectorDist
HomeAfterFeed
ResetBeforeFeed
EmulatePrusa
UseServo
ServoOffPos
ServoOnPos
WipeSequence
StepsPerMillimeter - requires axis X | Z
StepsPerRevolution
MenuAutoClose
PowerSaveTimeout
SendActionCmds
BacklightColor
HasPanelDue
EncoderTicks
SendPeriodicalStats
SharedStepper
DuetLaser
InvertDir - requires axis X | Y | Z
EndstopTrigger - requires axis X | Y | Z
Power - requires axis X | Y | Z
RSense - requires axis X | Y | Z
Mode - requires axis X | Y | Z
Microsteps - requires axis X | Y | Z
Stall - requires axis X | Y | Z
CoolStepMin - requires axis X | Y | Z
CoolStepMax - requires axis X | Y | Z
CoolStepDown - requires axis X | Y | Z
DriverAddress - requires axis X | Y | Z
TOff - requires axis X | Y | Z
MaxStallCount - requires axis X | Y | Z
StopOnStall - requires axis X | Y | Z
Parameters with [ X | Y | Z ] require the axis letter as an additional information which item (axis / stepper driver) to address.
For WipeSequence the S parameter has to be a string and hence encapsulated in quotes ("). To check the current settings, use the M503 GCode command.
After setting one or more of these parameters, it's recommended to save them onto the SD-Card using the M500 GCode command. Restart the SMuFF to get the new settings being initialized correctly.
is the Servo Position command and has got some special parameters:
Pn is the servo index (0 = Wiper servo, 1 = Lid servo)
Sn is the desired servo position (0-180 deg)
In is the minimum PWM frequency (default: n = 800 depicts 0 deg.)
Jn is the maximum PWM frequency (default: n = 2400 depicts 180 deg.)
Fn is the desired servo position in microseconds (800-2400 uS)
Rn is used as shortcut to open / close the Lid servo (n: 0 = open, 1 = close)
An additional parameter "T" let's you spin the servo from 0 deg. to 180 deg. automatically. This way you can test the servo position settings easily.
is being used to play a tone or a tune on the buzzer. Parameters are:
Sn is the frequency for a single tone
Pn is the duration for a single tone
T"..." is being used to play a tune in the format: F{frequency}D{duration}P{pause}. The dot (.) plays the tone and must not be omitted. Pause may be omitted. You're allowed to pass a string with a max. length of 500 characters for your tune.
F"..." is being used to play a tune file on the SD-Card, whereas the "..." mark the name of the file (usually xxx.dat).
is used to print out the current configuration values. In contrast to a 3D printer, the printout is in the same format as the configuration file (SMUFF.CFG).
is used to set the TMC RMS current. In addition to the X, Y and Z parameters, you may also use the R and H parameters to set the IRUN (R) and IHOLD (H) values along with this command, whereas the value range of those parameters is 0...31, just as specified in the TMC2209 datasheet .
sets the stall threshold on the TMC2209 stepper drivers. In contrast to Marlin, you also have the option to set the CoolStep threshold using parameter C and the MaxStallCount value using the T parameter for the given axes (X, Y, Z).
are additional GCodes for the SMuFF and you won't find those in the GCode standard. They're used to convert text into a decimal string or vice versa. This commands were used on the Duet3D controller board for the communication over the I2C channel and got obsolete by now.
In this mode, the GCode interpreter additionally will recognize the following commands:
S Init command (S0-S3)
P Get FINDA status (P0)
C Push filament into extruder (C0)
L Load filament (Lx)
U Unload filament (U0)
E Eject filament (Ex)
K Cut filament (no function) (Kx)
X Reset (X0)
F Set filament type (no function) (F0)
R Recover from Eject (no function) (R0)
W Wait for user to press button (W0)
The "no function" in the description above means: There's no code behind but the SMuFF will respond with "ok" anyway.
The commands shown here, were taken from the Prusa MMU-Control source code, function process_commands.
The SMuFF GCode parser eliminates all spaces while parsing, except text in quotes ("). It will also convert all characters received into upper case characters, except text in quotes (") and will recognize and handle backspace characters correctly (in case you key in GCodes directly).
Hence, you don't necessarily have to put spaces into your commands - means "T0 S1" or "t0 S1" will behave the same as "T0S1".
Keep in mind: If you want to send a User Message (M117), you have to enclose your message within quotes, otherwise it'll get upper cased and spaces are being removed.