-
Notifications
You must be signed in to change notification settings - Fork 31
Configuration file (SMuFF.cfg)
The configuration file has a standard JSON file format and needs to be copied onto the SD-Card before you turn on the SMuFF. This is what it looks like:
{
"Serial1Baudrate": 57600,
"Serial2Baudrate": 57600,
"ToolCount": 5,
"BowdenLength": 620.0,
"LCDContrast": 190,
"I2CAddress": 136,
"MenuAutoClose": 20,
"FanSpeed": 50,
"DelayBetweenPulses": false,
"PowerSaveTimeout": 300,
"Duet3DDirect": true,
"EmulatePrusa": false,
"Selector": {
"Offset": 0.5,
"Spacing": 21.0,
"StepsPerMillimeter": 800,
"Acceleration": 900,
"MaxSpeed": 100,
"InvertDir": false,
"EndstopTrigger": 1
},
"Revolver": {
"StepsPerRevolution": 9600,
"Offset": 1740,
"Acceleration": 6000,
"MaxSpeed": 1000,
"ResetBeforeFeed": true,
"HomeAfterFeed": true,
"InvertDir": false,
"EndstopTrigger": 1
},
"Feeder": {
"ExternalControl": false,
"StepsPerMillimeter": 410,
"Acceleration": 1000,
"MaxSpeed": 50,
"InsertSpeed": 1000,
"ReinforceLength": 2.0,
"UnloadRetract": 0,
"UnloadPushback": 0,
"PushbackDelay": 0,
"InvertDir": true,
"EndstopTrigger": 1
},
"Materials": {
"T0": "PLA Green",
"T1": "PLA White",
"T2": "PLA Red",
"T3": "PLA Black",
"T4": "PLA Silver"
}
}
The field names (parameters) should mostly be self-explanatory.
One thing though: Speeds and acceleration values are not in mm/s or mm/min. They're just plain numbers you may have to figure out yourself or - highly recommended - you go with the defaults. Another thing: You may need to change the direction of your stepper drivers, depending of the cables you have. To do so, simply change the InvertDir values in the according section (Selector, Revolver, Feeder). Same goes for the endstops, whereas the value seen here describes the trigger level (HIGH = 1, LOW = 0).
The "Duet3DDirect" setting must be set to true, if the Duet3D is controlling tool changes (i.e. via tool change scripts). In this case, you're no longer able to switch tools directly from within the SMuFF controller, which wouldn't make much sense either, since the Duet3D wouldn't know about.
The "EmulatePrusa" setting enables the SMuFF to process GCodes sent from a printer and act as a "real" Prusa MMU2 device. This setting simplifies the use of the SMuFF under Marlin 2.0, since the firmware already has implemented a tool change feature for the Prusa MMU2. The ReinforceLength option from the Feeder section is used to handle the "C0" command that a Prusa MMU2 receives. It's supposed to push the filament a couple of millimeters further into the Extruder. You may define the "couple of millimeters" within this setting. This feature hasn't been fully tested yet. This option might undergo some modifications in the future.
Please Note: You can't set both Duet3DDirect and EmulatePrusa to true - its either the one or the other.
The Offset value is the distance in millimeter, the Selector needs to travel from the homing position to Tool 0. To determine this value easily, you'll find a Offsets menu within the Tools menu. Open this menu and rotate the encoder knob until the base and the Selector are in line. Usually you don't need to alter this and the Spacing value, since those values are given by the width of the SMuFF printed parts (it matters only if you modify the printed parts for some reason). The StepsPerMillimeter is supposed be a fixed value either, unless your lead screw has a different thread pitch. In this case, you need to measure the distance with your calipers and key in the according value.
The StepsPerRevolution setting needs to be calculated as follows:
Steps per revolution of the stepper motor * 16 microsteps * 3
A standard stepper motor needs 200 steps for one revolution (1.8° per fullstep) and since the i3 mini controller stepper drivers are hard wired to use 16 microsteps, we need to multiply it by 16. The last parameter describes the gear ratio, which usually is 3:1 for the Bondtech gears. Hence, we will get a value of 9600 steps per revolution. If you're using 0.9° steppers, the according value will be 19200 (400 * 16 * 3).
The Offset value depends on the position of your endstop flag for the Revolver and describes the steps needed to reach the position for "Tool 0" from the home position. The easiest way to figure out this value is to use the Offsets function within the Tools menu. Simply turn the encoder knob until the bearing of Revolver wheel 0 reaches its final position and use the value written on the display.
The ExternalControl has to be set to true if the Feeder is controlled by your 3D printer (i.e. plugging the E stepper motor cable of your 3D printer directly into the Feeder stepper motor socket). In this case, SMuFF handles the Revolver and the Selector only. in this case, all other parameters within this section will not be taken into account.
This section may contain the names of your materials. If the names aren't empty (""), SMuFF will display the material name while selecting a specific tool. Otherwise only the tool number will be written on the display.
After you edit/change the configuration file to adopt it to your needs, I'd highly recommend using some sort of (online) JSON parser/checker, just to make sure you have no typos in it. Otherwise the SMuFF will not be able to parse your settings, report an error while starting up and use its default parameters instead. Also, make sure that your configuration file does not exceed the 1.2 KB boundary. This will overrun the input buffer as the SMuFF attempts to read the configuration and will result in an error message. If this happens, shorten (or even remove) the materials names.