From: David Woodhouse Date: Wed, 12 Feb 2025 20:28:59 +0000 (+0000) Subject: parameterise current/speed/stallguard X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5d230f016114e16790e16b53084a85847cb2fcdd;p=users%2Fdwmw2%2Fesp32-pool.git parameterise current/speed/stallguard --- diff --git a/blind.yaml b/blind.yaml index 38da551..09d52b5 100644 --- a/blind.yaml +++ b/blind.yaml @@ -18,13 +18,13 @@ esphome: interpolation: true tcool_threshold: 400 - tmc2209.stallguard: - threshold: 70 #set lower if stall gaurd triggering too often + threshold: ${stallguard_threshold} #set lower if stall gaurd triggering too often - tmc2209.currents: ihold: 0 tpowerdown: 0 iholddelay: 0 # irun: 16 - run_current: 20m #Set your desired current here (800m = 800mA, 1 = 1A etc.) + run_current: ${run_current} #Set your desired current here (800m = 800mA, 1 = 1A etc.) standstill_mode: coil_short_ls # set PD voltage # 5V 9V 12V 15V 20V @@ -155,7 +155,7 @@ globals: stepper: - platform: tmc2209 id: motor - max_speed: 750 steps/s + max_speed: ${max_speed} acceleration: 400 steps/s^2 deceleration: 400 steps/s^2 rsense: 100 mOhm diff --git a/landing-blind-3.yaml b/landing-blind-3.yaml index dafcd0c..314124d 100644 --- a/landing-blind-3.yaml +++ b/landing-blind-3.yaml @@ -2,6 +2,9 @@ substitutions: name: "landing-blind-3" encoder_closed_pos: "230000" # full blinds length (in encoder counts) !! CHANGE TO SUIT YOUR SETUP !! microsteps: "2" + run_current: "100m" + max_speed: "750 steps/s" + stallguard_threshold: "70" packages: blind: !include blind.yaml