What kind of ESP controlled servo should I use to rotate a volume control safely?

I’ve never tried one, but I knew they were available. Newer audio gear uses optical rotary encoders instead of mechanical pots because the mechanical pots were prone to getting dirty and noisy.

I should get the sevos in a week or so, we’ll see how that works before I get more advanced. :grin:

Got them today. I am testing now, but there’s something weird: The first time I use the servo after a reboot of the ESP32 and press to minimum or maximum, it jumps far too fast to the midpoint, before it starts going slow, the way I want it to (I have 3 second transition) to the desired position. And it moves when I reboot the ESP32 as well. Are those two things avoidable? This is the code:

output:
  - platform: ledc
    pin: 21
    id: frontforsterkerpinne
    frequency: 50 Hz

servo:
  - id: frontforsterker
    output: frontforsterkerpinne
    auto_detach_time: 6s
    transition_length: 3s

button:
  - platform: template
    name: "Servo to minimum"
    on_press:
      - servo.write:
          id: frontforsterker
          level: -100.0%

  - platform: template
    name: "Servo to max"
    on_press:
      - servo.write:
          id: frontforsterker
          level: 100.0%

  - platform: template
    name: "Servo to middle position"
    on_press:
      - servo.write:
          id: frontforsterker
          level: 0%

Edit: I found a thread about that, seems like it’s unavoidable on these servos: ESPHome servo slow to the intial position? - #5 by zenzay42

I think it moves too fast for the volume control, it has too much inertia for this jump. I need to think about what I can do with that.

Edit 2: restore: true fixed that big jump. Maybe a relay on the 5V power supply to the servo can stop the jump when the ESP32 restarts. But that’s a much smaller jump as well.

Edit 3: Nope, then I got about the same jump when starting the move,so I’ll use it without that relay and hope that the flex in the connection will take care of that smal jump.