Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 3, 2024
2 parents fafc046 + f32c1b7 commit de054b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 4 additions & 3 deletions autotune_tmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
PWM_LIM = 4

# SpreadCycle parameters
TPFD = 2
TPFD = 0

# CoolStep parameters
FAST_STANDSTILL = True
Expand Down Expand Up @@ -89,7 +89,7 @@ def __init__(self, config):
% (self.name))

# AutotuneTMC config parameters
self.motor = config.get('motor')
self.motor = config.get('motor').lower()
self.motor_name = "motor_constants " + self.motor
try:
motor = self.printer.lookup_object(self.motor_name)
Expand All @@ -105,9 +105,10 @@ def __init__(self, config):
raise config.error(
"Tuning goal '%s' is invalid for TMC autotuning"
% (tgoal))
self.auto_silent = False # Auto silent off by default
if self.tuning_goal == TuningGoal.AUTO:
# Very small motors may not run in silent mode.
self.auto_silent = not self.name in AUTO_PERFORMANCE_MOTORS and motor.T > 0.3
self.auto_silent = self.name not in AUTO_PERFORMANCE_MOTORS and motor.T > 0.3
self.tuning_goal = TuningGoal.SILENT if self.auto_silent else TuningGoal.PERFORMANCE
self.tmc_object=None # look this up at connect time
self.tmc_cmdhelper=None # Ditto
Expand Down
8 changes: 8 additions & 0 deletions motor_database.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -666,3 +666,11 @@ inductance: 0.0028
holding_torque: 0.40
max_current: 1.70
steps_per_revolution: 200

[motor_constants trianglelab-tl-42bygh20]
# ERCF v1.1 kit motor (NEMA 17)
resistance: 6.8
inductance: 0.0071
holding_torque: 0.21
max_current: 1.0
steps_per_revolution: 200

0 comments on commit de054b7

Please sign in to comment.