Esphome servo continuous rotation coding (Pet Feeder) šŸˆ

Dears,

I found this interesting project https://www.youtube.com/watch?v=sCOkuyH7CPo&t=398s&ab_channel=MomWillBeProudā€¢DIYchannel and I did every step he mentioned.

I just faced a problem when it came to coding. The project was built to work stand alone on Arduino board while I intend to integrate it with home assistant via ESPHome.

I need your kind support with on how I can make a servo (RC SM-S4303R) do continuous rotation in the same deration with ESPhome.

I really appreciate your help.

Thank you. :pray:

1 Like

Thank you @zoogara . I really appreciate your support.
I just could not find out how to make the contiguous rotation for the servo.

I believe if you issue a server.write action with a level of 100%, that will result in continuous rotation.

1 Like

I saw that video a while ago and have been a hair away from building it myself until the Aqara Zigbee feeder came out, but itā€™s cool to see it built!

1 Like

Most servos are not continuous rotation capable. You can find them online and you can modify 180 degree servos to do continuous rotation but, its best to just buy the one you need from the start. If you think about it, whats the difference between a continuous rotation servo and a stepper motor? There really isnt a difference so if you have a stepper motor around, that would work just fine too.

1 Like

Not all servos are capable of 360 degrees, let alone continuous rotation. Commanding a servo to to exceed its limits is a great way to strip the gears in your servo and ruin it. Not answering someones questions is better than answering them by guessing. It wastes peoples time and you risk causing damage or breaking their property with those guesses.

1 Like

Thank you @Fallingaway24 . I appreciate your support .

I will order one of these continuous rotation servos. But what would be the coding for making the servo contentiously rotating for period of time (seconds).

Thank you.

Thats not how they work. They move to a position or number of degrees not a fixed time. I think your confused about what continuous rotation is. Its continuous rotation in the sense tbsy it can rotate more than 360 degrees where other servos have a fixed limit like 0 - 180 degrees. You still have to tell it how far to move, not how long. What are you trying to do? Maybe a servo is the wrong device and you need a regular motor.

I guess you could do some testing and figure out for example how far it spins in say 5 seconds. For example it moves 5 complete rotations in 5 seconds then instead of commanding it to move for a time period you tell it to move 1800 steps which would take 5 seconds. 360 degrees is 1 rotation so 5 rotations is 1800 if that makes sense.

Thank you @Fallingaway24 . I really appreciate it.

Finally, I managed to do it with :

  - service: esphome.petfeeder_control_servo
    data:
      level: -8
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - service: esphome.petfeeder_control_servo
    data:
      level: 0
mode: single

Thank you friends. I really appreciate it.

Sweet! What exactly is that servo turning? Is it one of those food grade auger screws?

it rotates the Portion Wheel
Screenshot 2024-01-21 125836

Check this project. it is really interesting. https://www.youtube.com/watch?v=sCOkuyH7CPo&t=398s&ab_channel=MomWillBeProudā€¢DIYchannel

Ive been DIYā€™ng projects for 3 or 4 years and using stuff i find or saved. I think well past time to get a 3d printer. The stuff i could make and the quality would be huge improvements. Do you have any printer recommendations? Something for a hobbyist and not a $2000 professional one obviously.

I have only used one printer, artillery sidewinder x2 and Iā€™m in love with it. It does what I need and for reasonable price.

Ill check it out. 3d printer reviews seem to be all over the map. You never really know if the bad reviews are legit or its actually user error because people cant read and follow instructions so they put the blame anywhere except on themselves.

That is true. I totally agree with you

My favorites are the ones that go like this, ā€œthe picture of the item shows 2 of them but, i only got 1! Boohooā€

The product description clearly states theres only 1 included but its the sellers fault because the buyer is so lazy, they only look at a picture when buying something and theyre insulted if you expect them to read something!

These types of people ruined completely ruined the online rating system. 2 stars or 5 stars, you cant rely on that anymore.

But you can take the average if there are enough ratings.

Well, we know who the ā€œglass half fullā€ person is here lol
Ya you can do that, im just saying they arent as meaningful as they used to be. Now if were also talking about Aliexpress ratingsā€¦ id find a Bigfoot sighting more credible than Aliexpress ratings.

1 Like