I see, thanks
Was worried I might fry the board or something from what I’ve read online
I’ll be using 20kg servo to turn a 1/2" water valve, would a 5V 2A power supply be enough?
Description:
Brand: DSSERVO
Item: DS3218 20KG Digital Servo
Operating Voltage: 4.8 ~ 6.8 DC Volts
Torque: 18kg.cm(5V), 21.5kg.cm(6.8V)
Speed: 0.16sec/60°(5V), 0.14sec/60°(6.8V)
Dead Brand: 3μs
Motor Type: DC Motor
Gear Type: 25T Copper & Aluminum
Working Frequence: 50-333Hz
Totation: 180°(PWM 500-2500μs) / 270°(PWM 500-2500μs)
Weight: 60 g (2.12 oz)
Size: 40 x 20 x 40.5 mm ( 1.58 x 0.79 x 1.60 in)
From experience with driving servos with an ESP myself, I’d say not. The starting surge of that very high torque RC servo will be way over 2 Amps. You will know if there is an issue if ESP resets the moment you try drive the servo…
To detect this add some yaml code to set a LED only at boot for a second, if that triggers when you drive the servo you will know.
I powered my servo from it’s own 5V supply to avoid potential issues with spikes to the ESP’s 3.3V regulator.
Yes to both, but the UBEC is the better choice. A regular 2A USB charger may just do it, but maybe not. 3A is a bit marginal also, 4A would cover it I think.
Pick a spare digital IO pin (must be one that is output capable, which most are) put a red LED on it.
Use some code inside on_boot to turn on the IO, delay 1 second, turn off the IO. That will be the tell tale…
Gavin, have you been able to get servo.detach to work? I have a servo controlled by esp8266 using ESPhome and after it rotates it keeps buzzing. I see online on many forums that detaching could help with this. However, when I have this implemented in the yaml for my servo, it doesn’t seem to actually detach it. There is current running through the servo still and it continues to buzz/hum.
I tried both the servo.detach and the auto_detach_time but it doesn’t seem to work for me. Did it work for you?
Digging up an old thread here, but is anyone else now having trouble with the servo detach? I havent changed anything but the detach doesnt seem to be working for me anymore. Also I don’t suppose if anyone would know how to add the detach as a switch inside home assistant rather than doing it inside the esphome interface?
servo.detach Action
This Action allows you to disable the output on a servo motor - this will make the servo motor stop immediately and disable its active control.
on_...:
then:
- servo.detach: my_servo
Note
This action can also be expressed as a lambda: id(my_servo).detach();
Which you can utilize with automations to control the servo detaching with a home assistant switch for example by triggering a lambda: Automations and Templates — ESPHome
You can’t just guess or ask someone else to guess if your power supply is enough to run your servo or any other device, I cant stress how important it is to get in the habit of reading a spec sheet or getting on Google and pulling it off the internet. Most, if not all of your questions will be answered in there. Not only that but, any special requirements or things to avoid, pin-outs, wire color ID, etc, etc. Learning this good habit will save you tons of stress, hours in troubleshooting, costly damage to components or even burning your house down.
Three thoughts.
One is the servo is this one - MG996R Servo 90° Rotation - Maker Store PTY LTD.
Two is you may need -100 to +100 to get full rotation either side of center.
Three. Check with a ‘servo tester’ or code one up on an Arduino temporarily to make sure the servo is capable of what you thought. Servo Tester - Maker Store PTY LTD
Given I have not used the new ESPhome ‘servo’ function myself (I used pwm light function long ago) I may be wrong. Somebody will let me know.
I am going crazy with this one, hopefully someone can help me out.
I want to push the washing machine button using a servo, I managed to control the servo using esphome and home assistant but unfortunately I only have a 360 degrees servo that continuously rotates.
but by passing a value the servo starts spinning at a certain speed.
I would like to just have a on/off switch in home assistant and have the movement done in esphome, like when pressed the servo rotates for 0.5s forward (pressing the button) and then it goes back for 0.5 seconds.