From 8597001c23f707789e4c950c9a5b21b339adbb61 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 11 Feb 2025 21:34:27 +0000 Subject: [PATCH] Reduce current, set microsteps to 1, speed to 500 steps/s Hopefully no longer triggering the USB PD to cut out during motion --- blind.yaml | 26 ++++++++++++++++++++++++-- landing-blind-3.yaml | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/blind.yaml b/blind.yaml index 9f0ca69..ef96e88 100644 --- a/blind.yaml +++ b/blind.yaml @@ -24,7 +24,7 @@ esphome: tpowerdown: 0 iholddelay: 0 # irun: 16 - run_current: 800m #Set your desired current here (800m = 800mA, 1 = 1A etc.) + run_current: 100m #Set your desired current here (800m = 800mA, 1 = 1A etc.) standstill_mode: coil_short_ls # set PD voltage # 5V 9V 12V 15V 20V @@ -97,6 +97,7 @@ sun: external_components: - source: github://slimcdk/esphome-custom-components components: [tmc2209_hub, tmc2209, stepper] + refresh: 0s mqtt: on_connect: @@ -162,7 +163,7 @@ globals: stepper: - platform: tmc2209 id: motor - max_speed: 600 steps/s + max_speed: 500 steps/s acceleration: 400 steps/s^2 deceleration: 400 steps/s^2 rsense: 100 mOhm @@ -305,6 +306,27 @@ sensor: filters: - multiply: 8.47742 + - platform: tmc2209 + type: motor_load + name: Motor load + update_interval: 250ms + filters: + delta: 1 + + - platform: tmc2209 + type: stallguard_result + name: StallGuard result + update_interval: 250ms + filters: + delta: 1 + + - platform: tmc2209 + type: actual_current + name: Actual current + update_interval: 250ms + filters: + delta: 1 + cover: - platform: template id: pd_blinds diff --git a/landing-blind-3.yaml b/landing-blind-3.yaml index ce7ebfc..69c69df 100644 --- a/landing-blind-3.yaml +++ b/landing-blind-3.yaml @@ -1,7 +1,7 @@ substitutions: name: "landing-blind-3" encoder_closed_pos: "230000" # full blinds length (in encoder counts) !! CHANGE TO SUIT YOUR SETUP !! - microsteps: "2" + microsteps: "1" packages: blind: !include blind.yaml -- 2.49.0