-
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": 250000,
"Serial2Baudrate": 38400,
"ToolCount": 5,
"BowdenLength": 620.0,
"LCDContrast": 190,
"I2CAddress": 136,
"MenuAutoClose": 20,
"FanSpeed": 50,
"DelayBetweenPulses": false,
"PowerSaveTimeout": 30,
"Duet3DDirect": true,
"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": {
"Tool0": "PLA Green",
"Tool1": "PLA White",
"Tool2": "PLA Red",
"Tool3": "PLA Black",
"Tool4": "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 driving the Feeder stepper (which is highly recommended).
The Offset value is the distance in millimeter, the Selector needs to travel from the homing position to Tool 0. 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 in the Tools menu. Simply turn the encoder knob until the first 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 and 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 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.