prn_stepper_XL.cfg 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. # XL_CS PC4 DRIVE0
  2. # XL_DIR PF12 DRIVE0
  3. # XL_STEP PF13 DRIVE0
  4. # XL_ENABLE PF14 DRIVE0
  5. # XL_DIAG0 PG6
  6. [stepper_x]
  7. step_pin: PF13
  8. dir_pin: PF12
  9. enable_pin: !PF14
  10. rotation_distance: 20 # 19.25
  11. microsteps: 256
  12. full_steps_per_rotation: 200 # for 0.9° motors - 400
  13. #gear_ratio:
  14. # The gear ratio if the stepper motor is connected to the axis via a
  15. # gearbox. For example, one may specify "5:1" if a 5 to 1 gearbox is
  16. # in use. If the axis has multiple gearboxes one may specify a comma
  17. # separated list of gear ratios (for example, "57:11, 2:1"). If a
  18. # gear_ratio is specified then rotation_distance specifies the
  19. # distance the axis travels for one full rotation of the final gear.
  20. # The default is to not use a gear ratio.
  21. #step_pulse_duration:
  22. # The minimum time between the step pulse signal edge and the
  23. # following "unstep" signal edge. This is also used to set the
  24. # minimum time between a step pulse and a direction change signal.
  25. # The default is 0.000000100 (100ns) for TMC steppers that are
  26. # configured in UART or SPI mode, and the default is 0.000002 (which
  27. # is 2us) for all other steppers.
  28. endstop_pin: tmc5160_stepper_x:virtual_endstop
  29. #endstop_pin: ^!PG6
  30. position_min: -33
  31. position_endstop: -33
  32. position_max: 360
  33. homing_speed: 50
  34. homing_retract_dist: 5
  35. second_homing_speed: 2
  36. #homing_positive_dir:
  37. # If true, homing will cause the stepper to move in a positive
  38. # direction (away from zero); if false, home towards zero. It is
  39. # better to use the default than to specify this parameter. The
  40. # default is true if position_endstop is near position_max and false
  41. # if near position_min.
  42. [tmc5160 stepper_x]
  43. cs_pin: PC4
  44. # The pin corresponding to the TMC5160 chip select line. This pin
  45. # will be set to low at the start of SPI messages and raised to high
  46. # after the message completes. This parameter must be provided.
  47. #spi_speed: 100000
  48. spi_bus: spi1
  49. #spi_software_sclk_pin: PA5
  50. #spi_software_mosi_pin: PA7
  51. #spi_software_miso_pin: PA6
  52. # See the "common SPI settings" section for a description of the
  53. # above parameters.
  54. #chain_position:
  55. #chain_length:
  56. # These parameters configure an SPI daisy chain. The two parameters
  57. # define the stepper position in the chain and the total chain length.
  58. # Position 1 corresponds to the stepper that connects to the MOSI signal.
  59. # The default is to not use an SPI daisy chain.
  60. interpolate: False
  61. # If true, enable step interpolation (the driver will internally
  62. # step at a rate of 256 micro-steps). The default is True.
  63. run_current: 1.4 # (1.8) Imax / squart(2) * 80%; Imax = Irms / squart(2)
  64. # The amount of current (in amps RMS) to configure the driver to use
  65. # during stepper movement. This parameter must be provided.
  66. #hold_current: 0.7 # ~~ run_current/2
  67. # The amount of current (in amps RMS) to configure the driver to use
  68. # when the stepper is not moving. Setting a hold_current is not
  69. # recommended (see TMC_Drivers.md for details). The default is to
  70. # not reduce the current.
  71. sense_resistor: 0.075
  72. # The resistance (in ohms) of the motor sense resistor. The default
  73. # is 0.075 ohms.
  74. stealthchop_threshold: 999999
  75. # The velocity (in mm/s) to set the "stealthChop" threshold to. When
  76. # set, "stealthChop" mode will be enabled if the stepper motor
  77. # velocity is below this value. The default is 0, which disables
  78. # "stealthChop" mode.
  79. #driver_MSLUT0: 2863314260
  80. #driver_MSLUT1: 1251300522
  81. #driver_MSLUT2: 608774441
  82. #driver_MSLUT3: 269500962
  83. #driver_MSLUT4: 4227858431
  84. #driver_MSLUT5: 3048961917
  85. #driver_MSLUT6: 1227445590
  86. #driver_MSLUT7: 4211234
  87. #driver_W0: 2
  88. #driver_W1: 1
  89. #driver_W2: 1
  90. #driver_W3: 1
  91. #driver_X1: 128
  92. #driver_X2: 255
  93. #driver_X3: 255
  94. #driver_START_SIN: 0
  95. #driver_START_SIN90: 247
  96. # These fields control the Microstep Table registers directly. The optimal
  97. # wave table is specific to each motor and might vary with current. An
  98. # optimal configuration will have minimal print artifacts caused by
  99. # non-linear stepper movement. The values specified above are the default
  100. # values used by the driver. The value must be specified as a decimal integer
  101. # (hex form is not supported). In order to compute the wave table fields,
  102. # see the tmc2130 "Calculation Sheet" from the Trinamic website.
  103. #driver_MULTISTEP_FILT: True
  104. #driver_IHOLDDELAY: 6
  105. #driver_TPOWERDOWN: 10
  106. #driver_TBL: 2
  107. #driver_TOFF: 3
  108. #driver_HEND: 2
  109. #driver_HSTRT: 5
  110. #driver_FD3: 0
  111. #driver_TPFD: 4
  112. #driver_CHM: 0
  113. #driver_VHIGHFS: 0
  114. #driver_VHIGHCHM: 0
  115. #driver_DISS2G: 0
  116. #driver_DISS2VS: 0
  117. #driver_PWM_AUTOSCALE: True
  118. #driver_PWM_AUTOGRAD: True
  119. #driver_PWM_FREQ: 0
  120. #driver_FREEWHEEL: 0
  121. #driver_PWM_GRAD: 0
  122. #driver_PWM_OFS: 30
  123. #driver_PWM_REG: 4
  124. #driver_PWM_LIM: 12
  125. driver_SGT: 6 # -2 / 10 10+(-2-10)/3
  126. #driver_SEMIN: 0
  127. #driver_SEUP: 0
  128. #driver_SEMAX: 0
  129. #driver_SEDN: 0
  130. #driver_SEIMIN: 0
  131. #driver_SFILT: 0
  132. #driver_DRVSTRENGTH: 0
  133. #driver_BBMCLKS: 4
  134. #driver_BBMTIME: 0
  135. #driver_FILT_ISENSE: 0
  136. # Set the given register during the configuration of the TMC5160
  137. # chip. This may be used to set custom motor parameters. The
  138. # defaults for each parameter are next to the parameter name in the
  139. # above list.
  140. #diag0_pin:
  141. diag1_pin: ^!PG6
  142. # The micro-controller pin attached to one of the DIAG lines of the
  143. # TMC5160 chip. Only a single diag pin should be specified. The pin
  144. # is "active low" and is thus normally prefaced with "^!". Setting
  145. # this creates a "tmc5160_stepper_x:virtual_endstop" virtual pin
  146. # which may be used as the stepper's endstop_pin. Doing this enables
  147. # "sensorless homing". (Be sure to also set driver_SGT to an
  148. # appropriate sensitivity value.) The default is to not enable
  149. # sensorless homing.