Servo gets hot after setting position

I’m working on automated blinds with an D1 mini and a DS3225 servo (25 kg). I uploaded the following code to the D1 mini and it all works great, but after setting a position, the servo gets real hot (read: more than 72 degrees celsius) I think this is way to hot and shouldn’t be necessary. Is this normal behaviour, or can this problem be avoided? Thank in advance!

esphome:
  name: servo
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Servo Fallback Hotspot"
    password: "xxxxx"

captive_portal:

# Enable logging
logger:
  level: verbose

ota:
  password: !secret ota_password
  
# Enable Web server.
web_server:
  port: 80


# Enable Home Assistant API
api:
  password: !secret ota_password
  services:
    - service: control_servo
      variables:
        level: float
      then:
        - servo.write:
            id: my_servo
            level: !lambda 'return level / 100.0;'
        - delay: 1000ms    
        - lambda: 'id(my_servo).detach();'    
        - delay: 1000ms
        - servo.detach: my_servo


output:
  - platform: esp8266_pwm
    id: pwm_output
    pin: D3
    frequency: 50 Hz
 
servo:
  - id: my_servo
    output: pwm_output
    min_level: 3.0%
    idle_level: 7.5%
    max_level: 12.0%

dallas:
  - pin: D1
    update_interval: 10s

sensor:
  - platform: dallas
    address: 0xA20300A2793F0128
    name: "Temperatuur servo jaloezieën"
    

cover:
  - platform: template
    name: "jaloezieën servo keuken"
    optimistic: true
    
    open_action:
      - servo.write:
          id: my_servo
          level: -80%
      - delay: 2500ms
      - servo.detach: my_servo
      
    close_action:
      - servo.write:
          id: my_servo
          level: 30%
      - delay: 2500ms
      - servo.detach: my_servo
      
    stop_action:
      - servo.detach: my_servo


This is the wiring:

Hi, did you solve it?

Unfortunately not…

I have a similar problem :frowning:

Offhand, it sounds like the PWM going to the servo may be causing it to oscillate around that stopped position - but at full power. Just a wild guess. I expect it’s wrong because I’m not familiar with whatever model servo that is, and if it needs the signal line to hold at either 0 or 1 when idle, or not, or if it needs the PWM rate to be faster than 50Hz so as to allow the internal capacitor to hold a flatter voltage at idle.

Or, perhaps you need to use the servo.detach Action when the servo is to be idle.

I didn’t update but around a month ago I found this and solved my problem:

  - id: my_servo
    output: pwm_output
    auto_detach_time: 2s

auto_detach will detach the servo (make it powerless)
This will work, but it will also cause the servo to be able to move freely, it will not keep its position.