]> www.infradead.org Git - users/dwmw2/esp32-pool.git/commitdiff
parameterise current/speed/stallguard
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 12 Feb 2025 20:28:59 +0000 (20:28 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 12 Feb 2025 20:29:20 +0000 (20:29 +0000)
blind.yaml
landing-blind-3.yaml

index 38da55130e1e6d4982ce0aa20b0c4699d4888573..09d52b5922b3d6526255c18cd7764217ad6420e8 100644 (file)
@@ -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
index dafcd0cf4efc87ea0dc6eda57b6f9525c8b4a029..314124da0495662e5fb30dee5caceb8de5a4229e 100644 (file)
@@ -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