Understanding the Remora Config file
The Remora config file has many options for the user customize for their specific use cases. We will cover each module and how to configure it.
Board
This definition is a user note only and is not used by the firmware. Examples
"Board": "BIGTREETECH SKR v1.3 & v1.4"
"Board": "MKS SBASE v1.3"
Pin
Pin names and definations need to match your boards schematics and pin naming structure. The LPC176x based boards use pins with an n.nn naming scheme. STM32 based boards use a Px_n naming scheme. Examples
"Board": "BIGTREETECH SKR v1.3 & v1.4"
"Pin": "1.31"
"Board": "SKR v2.0 & Octopus"
"Pin": "PC_4"
MCP4451
{
"Thread": "On load",
"Type": "MCP4451",
"Comment": "Digipot for joints/Axis 0 - 3",
"I2C SDA pin": "0.0",
"I2C SCL pin": "0.1",
"I2C address": 0,
"Max current": 2.0,
"Factor": 113.33,
"Current 0": 0.8,
"Current 1": 0.8,
"Current 2": 0.8,
"Current 3": 0.8
},
{
"Thread": "On load",
"Type": "MCP4451",
"Comment": "Digipot for joints/Axis 4 - 7",
"I2C SDA pin": "0.0",
"I2C SCL pin": "0.1",
"I2C address": 2,
"Max current": 2.0,
"Factor": 113.33,
"Current 0": 0.8,
"Current 1": 0.8,
"Current 2": 0.8,
"Current 3": 0.8
},
Current 0-3 (0.0-2.0) The value enter here sets the current in amps. Note the comment on the above the first entry is for the first 4 joints/Axis (X,Y,Z,E0) and the second is for the last 4 joints/Axis (E1,E2,E3,E4)
TMC stepper
{
"Thread": "On load",
"Type": "TMC2208",
"Comment": "X - Joint 0 TMC driver",
"RX pin": "1.10",
"RSense": 0.11,
"Current": 800,
"Microsteps": 16,
"Stealth chop": "on",
},
Stepgen
This module defines the axis and how it is connected to the main board and LinuxCNC.
{
"Thread": "Base",
"Type": "Stepgen",
"Comment": "x axis",
"Joint Number": 0,
"Step Pin": "2.2",
"Direction Pin": "2.6",
"Enable Pin": "2.1"
},
Digital Pin
This module can create an input or output. This is useful for things like home and limit switches or controlling relays and such.
{
"Thread": "Servo",
"Type": "Digital Pin",
"Comment": "spindle enable",
"Pin": "2.5",
"Mode": "Output",
"Modifier": "Pull None",
"Invert": "False",
"Data Bit": 0
},
PWM
This module create a PWM output. this can be used to control lasers, fans, spindles ect.
{
"Thread": "Servo",
"Type": "PWM",
"Comment": "PWM0",
"SP[i]": 0,
"PWM Pin": "1.24",
"PWM Max": 256,
"Hardware PWM": "True",
"Variable Freq": "True",
"Period SP[i]": 1,
"Period us": 200
},
RCServo
{
"Thread": "Base",
"Type": "RCServo",
"Comment": "servo",
"Servo Pin": "2.0",
"SP[i]": 7
},
QEI
{
"Thread": "Servo",
"Type": "QEI",
"Comment": "Spindle encoder",
"Modifier": "Pull Up",
"PV[i]": 0,
"Data Bit": 7,
"Enable Index": "True"
},
Encoder
This is a software encoder module for low to mid speed encoders useful for axis and servo motors and has max input of 30KHz.
{
"Thread": "Base",
"Type": "Encoder",
"Comment": "X encoder",
"ChA Pin": "1.22",
"ChB Pin": "1.20",
"Modifier": "Pull Up",
"PV[i]": 1,
"Data Bit": 6,
"Index Pin": "1.18"
},
Temperature
This is a thermistor module for sensing temperatures. useful for 3d printers and CNC machine spindle max temp
{
"Thread": "Servo",
"Type": "Temperature",
"Comment": "temp0",
"PV[i]": "2",
"Sensor": "thermistor",
"thermistor":
{
"Pin": "0.23",
"beta": 5,
"r0": 10000,
"t0": 200
}
},
Switch
The switch can turn on and off a pin based on the value of a thermistor or other module with a PV[i]
{
"Thread": "Servo",
"Type": "Switch",
"Comment": "temp0 fan",
"Pin": "2.3",
"Mode": "On",
"PV[i]": 2,
"SP": 25
},
Blink
This will turn a pin on and off useful for leds
{
"Thread": "Servo",
"Type": "Blink",
"Pin": "1.18",
"Frequency": 2
},
Motor Power
The Motor Power module can turn on a pin at startup with no user interaction. This is required for boards with motor power hardware that needs an io to be turned on. For boards like the SKRv2 this is required for the motors to recive power. Example
{
"Thread": "On load",
"Type": "Motor Power",
"Comment": "Enable motor power SKR2",
"Pin": "PC_13"
}
Reset Pin
The reset pin allows for a controller board reset initiated from LinuxCNC. The Pin can be freely assigned to any free pin on the controller board, but it is hard coded to pin 25 on the Raspberry Pi.
{
"Thread": "Servo",
"Type": "Reset Pin",
"Comment": "Reset pin",
"Pin": "1.31"
}
ESTOP pin
The ESTOP pin allows for a controller board to Estop directy from PRU instead of from LinuxCNC via a DigitalPin. The Pin can be freely assigned to any free pin on the controller board.
Base Thread Frequency
The Base thread frequecny configuration default is 40000. Depending on the chip you are using, this number can be higher or lower. Some boards with faster chips can acheave higher steprates by setting to a higher base thread frequency. The base thread frequency set in the config.txt file must match the base thread frequency set in your hal file for Linuxcnc.