Traducido del English por IA ·
Hice esto con un montón de SG90 para un montaje didáctico. La modificación:
1. Abre la carcasa, saca el engranaje de salida. Corta o lima la pequeña lengüeta de plástico de su parte inferior que choca con el tope final.
2. El potenciómetro bajo el eje de salida es la realimentación de posición. Desuéldalo y pon dos resistencias de 2,2 kΩ en su lugar como divisor fijo (los extremos a las pistas exteriores, el centro a la pista del cursor). El servo ahora siempre cree que está en el centro.
3. Vuelve a montarlo. Ahora el ancho de pulso controla la velocidad y la dirección en lugar de la posición: unos 1,5 ms lo detienen, más corto gira en un sentido y más largo en el otro. Encuentra el valor exacto de parada por prueba y error, ya que la tolerancia de las resistencias lo desplaza.
A tu segunda pregunta: no, ya no sabe dónde está, igual que un FS90R. En una persiana eso importa, así que haz lo que dijo Keisha: añade un interruptor reed o un microinterruptor en totalmente abierta y totalmente cerrada, y cuenta el tiempo o añade un encoder barato intermedio. Sinceramente, un SG90 también es débil para una persiana real; un motor paso a paso 28BYJ-48 con placa ULN2003 te da la posición gratis y más par.
En cuanto a la placa: añade blind.set con un parámetro Number de 0 a 100 en la pestaña Commands del perfil del ESP32, nivel Basic. El Slider envía el valor una vez al soltarlo, no mientras arrastras, lo que encaja con un motor. Haz que el ESP32 publique su posición real como blind_pct y vincula el Current value del Slider a ella, para que la tarjeta muestre dónde está realmente la persiana.
Alimenta el servo o el paso a paso con su propia fuente de 5 V, no con el pin del ESP32.
Did this to a pile of SG90s for a teaching rig. The mod:
1. Open the case, take out the output gear. Cut or file off the little plastic tab on its underside that hits the end stop.
2. The potentiometer under the output shaft is the position feedback. Unsolder it and put two 2.2k resistors in its place as a fixed divider (ends to the outer pads, the middle to the wiper pad). The servo now always thinks it’s at centre.
3. Reassemble. Now the pulse width sets speed and direction instead of position: about 1.5 ms stops it, shorter turns one way, longer the other. Find the exact stop value by trial, resistor tolerance shifts it.
To your second question: no, it no longer knows where it is, same as an FS90R. For a blind that matters, so do what Keisha said, add a reed switch or microswitch at fully open and fully closed, and count time or add a cheap encoder in between. Honestly, an SG90 is also weak for a real blind, a 28BYJ-48 stepper with a ULN2003 board gives you position for free and more torque.
On the board side: add blind.set with a Number parameter 0-100 to the ESP32’s profile Commands tab, Basic tier. The Slider sends the value once on release, not while you drag, which suits a motor. Have the ESP32 publish its real position as blind_pct and bind the Slider’s Current value to it, so the card shows where the blind actually is.
Power the servo or stepper from its own 5 V supply, not the ESP32’s pin.

