.yaml file for FluidNC Pen/Laser CNC Controller TMC2209

I purchased one of these boards from the V1 store and have the components installed and moving in the right right directions (optical end stops not installed yet) . It came with FluidNC installed so I downloaded the .yaml file to try to make sense of the settings. I found a post with settings that appeared to be from the same or similar board:

Comparing the settings from both files, I see the following differences:

Preloaded / Forum

stepping:
pulse_us: 4 / pulse_us: 2

axes:
x:
acceleration_mm_per_sec2: 100 / acceleration_mm_per_sec2: 25
soft_limits: false / soft_limits: truue
homing:
cycle: 0 / cycle: 2
pulloff_mm: .5 / no setting
mpos 0.0 / mpos 28
seek_mm_per_min: 100.000 / seek_mm_per_min: 5000.000

motor0:
limit_neg_pin: gpio.36:high / limit_neg_pin: gpio.39:
tmc_2209:
run_amps: 0.450 / run_amps: 0.500
hold_amps: 0.200 / hold_amps: 0.250

y: same differences as x except for
limit_neg_pin: gpio.39:high / limit_neg_pin: gpio.36:

Questions:

  1. I realize the some of these are just desired performance but, could someone explain the the settings that I have highlighted?
  2. There are settings for “z” but do they matter?
  3. There were other settings for “coolant”, “probe”, etc. Do they need to be there?
  4. If I change any of these settings from the FluidNC WebUI, do they change in the .yaml as well?

Thanks for the help!

So the / separates the actual config from a comment (typically the previous or default value.) Ignore what comes after it.

The pulse_us is microseconds to have a pin high for. Looks like it was set to be a bit longer.

Soft limits are to set the machine so that it must know where it js, and cannot try to go out of its defined boundary. Most V1 machines have this turned off, as it mostly gets in the way with typical work flow.

Cycle defines when an axis homes. For the ZenXY, the Y axis must home first, or the X end stop cannot trigger.

The limit pins must be told that they trigger on logic high for the optical end stops. Default behaviour is to trigger on logic low.

  1. See above

  2. Not for the ZenXY, but it doesnt hurt anything.

  3. Ditto. Coolant or air assist pins exist, but nothing will be connected to them.

  4. Actually, I don’t know… I haven’t tried it.

1 Like

No. You are changing the “running config” in memory when you change it in the UI.

In order to write it back to the file, you need to issue the command $CD=config.yaml in the terminal. If you are using Ryan’s config with his macros, this is what his “SAVE” macro does for you

Thanks for all the answers.

I was having trouble making what I wanted to show appear correctly in the preview. No matter what I did, I couldn’t get it to look like a table. The “/” on each of these just separates the the 2 different settings noted on the files (Preloaded file / Forum file).

Couple more questions:

  1. What is mpos:?
  2. What is pulloff_mm: and is this a new setting that the forum file would not have had? The WebUI has a setting of 1.000 and preloaded file has .500 . Why would they be different?
  3. Should the cycle setting be the same for both axis? The files have different settings but they are the same for both axis.

Thanks again

During a homing cycle, the axis will move until the switch is triggered, then back off the switch. This controls how far (in millimeters) is needed to back off. Different switches may have different distances to be deactivated. A full mm is probably a pretty safe default, the preloaded file may be better tuned for the actual switch being used.

It’s machine position.

Thanks. I’m making my way though the Wiki while building the machine. I’m kind of a new at this but starting to wrap my head around it.

My yaml below - think it required a couple of tweaks to home. I think my hardware is vanilla and I have the same electronics, ordered about 2 months ago.
HTH

name: TMC2209 XY Servo Laser
board: FluidNC Pen/Laser 2209
meta: 8-10-23 Ryan Z

stepping:
  engine: RMT
  idle_ms: 255
  dir_delay_us: 1
  pulse_us: 2
  disable_delay_us: 0

uart1:
          txd_pin: gpio.17
          rxd_pin: gpio.16
          rts_pin: NO_PIN
          cts_pin: NO_PIN
          baud: 115200
          mode: 8N1

kinematics:
  corexy:

start:
  must_home: false
  
axes:
  shared_stepper_disable_pin: gpio.13:high
  x:
    steps_per_mm: 100
    max_rate_mm_per_min: 2000
    acceleration_mm_per_sec2: 100
    max_travel_mm: 1000
    soft_limits: false
    homing:
      cycle: 2
      positive_direction: false
      pulloff_mm: .5
      mpos_mm: 0
      feed_mm_per_min: 200.000
      seek_mm_per_min: 100.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100
    
    motor0:
      limit_neg_pin: gpio.36:high
      #Diag pin is gpio.34
      tmc_2209:
        uart_num: 1
        addr: 0
        r_sense_ohms: 0.110
        run_amps: 0.450
        hold_amps: 0.200
        microsteps: 16
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        homing_mode: StealthChop
        use_enable: false
        direction_pin: gpio.12
        step_pin: gpio.14
        disable_pin: NO_PIN
    
    
    motor1:
      null_motor:

  y:
    steps_per_mm: 100
    max_rate_mm_per_min: 2000
    acceleration_mm_per_sec2: 100
    max_travel_mm: 1000
    soft_limits: false
    homing:
      cycle: 1
      positive_direction: false
      pulloff_mm: .5
      mpos_mm: 0
      feed_mm_per_min: 200.000
      seek_mm_per_min: 100.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.39:high
      #diag pin is gpio.35
      tmc_2209:
        uart_num: 1
        addr: 1
        r_sense_ohms: 0.110
        run_amps: 0.450
        hold_amps: 0.200
        microsteps: 16
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        homing_mode: StealthChop
        use_enable: false
        direction_pin: gpio.26
        step_pin: gpio.25
        disable_pin: NO_PIN
    motor1:
      null_motor:

  z:
    steps_per_mm: 100
    max_rate_mm_per_min: 1000
    acceleration_mm_per_sec2: 50
    max_travel_mm: 5.00
    soft_limits: false
    homing:
      cycle: -1
      positive_direction: true
      mpos_mm: 5
      feed_mm_per_min: 100.000
      seek_mm_per_min: 200.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100
    
    motor0:
      rc_servo:
        pwm_hz: 50
        output_pin: gpio.22
        min_pulse_us: 1000
        max_pulse_us: 2100
        
spi:
  miso_pin: gpio.19
  mosi_pin: gpio.23
  sck_pin: gpio.18

sdcard:
  cs_pin: gpio.5
  card_detect_pin: NO_PIN

coolant:
  flood_pin: NO_PIN
  mist_pin:  gpio.21

probe:
  pin: gpio.32:low:pu
  
control:
  reset_pin: gpio.33:low:pu
  feed_hold_pin: gpio.4:low:pu
  cycle_start_pin: gpio.15:low:pu
  
# Laser:
#  pwm_hz: 5000
#  output_pin: gpio.27
#  enable_pin: gpio.2
#  disable_with_s0: false
#  s0_with_disable: true
#  tool_num: 0
#  speed_map: 0=0.000% 255=100.000%

From the WIKI

pulloff_mm:

  • Type: Float
  • Range: 0.100 to 100000.000
  • Default: 1.000
  • Details: This is the distance to pull off a touched switch with this motor. This value should be greater than the amount you can travel after the switch is activated. This makes sure you can always clear the switch during homing.

Does this affect the1st, 2nd or both pulloffs during the homing cycle?