hi All,
I’m trying to get a servo to work with a D1 mini, ultimately it will control the tilt on my blinds should I get it to work.
to the best of my ability I have followed the instructions and tutorials found both on here and on youtube (Dr Zzzs) but I can’t get the servo to move.
all and any help is greatly appreciated…
my D1 mini has this…
esphome:
name: blind-servo
friendly_name: Blind Servo
platform: esp8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: control_servo
variables:
level: float
then:
- servo.write:
id: stairs_tilt
level: !lambda 'return level /100.0;'
ota:
password: "*************"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Blind-Servo Fallback Hotspot"
password: "****************"
captive_portal:
servo:
- id: stairs_tilt
output: 'pwm_output'
output:
- platform: esp8266_pwm #this is for the servo
id: 'pwm_output'
pin: GPIO2 #D4
frequency: 50 Hz
in my configuration.yaml I have …
input_number:
stair_blind:
name: Stair Blind
initial: 0
min: -100
max: 100
step: 1
mode: slider
and in an Automation I have
id: 'stairblindtiltservoinput123459'
alias: stair blind tilt servo input
initial_state: true
trigger:
- platform: state
entity_id: input_number.stair_blind
action:
- service: esphome.blind_servo_control_servo
data_template:
level: "{{ trigger.to_state.state | int }}"
I’ve added a slider to my dashboard using input_number.stair_blind
My Wireing is as follows
D1 mini connected to USB for power with cable on D4 to orange cable on servo, gnd is connected to gnd (brown) on servo and negative on external power 6.99v.
12v 3a power supply is connected to a buck stepdown converter set to 6.99v positive of the 6.99v is connected to (red) positive of Servo, negative of 6.99v is connected to GND on D1 mini and GND (brown) of servo.
when I try to move the slider on HA the servo does not move… any help?
I’ll try to do a diagram of the wiring to make it easier to understand
thank you in advance