2
\$\begingroup\$

I'm messing around with some servos and one by one they stop working.

I've got a Raspberry Pi to which I connected a pca9685 servo driver board which in turn connects to 3 of these cheap servos. I got it running with this example code in Go. I've edited the example code to my liking, but I didn't change the basics of moving the servos. I kept the same minimum and maximum pulse width.

Now after messing with them for maybe 15 minutes one stopped working. I rebooted the pi and switched the connectors of the servos around to be sure it wasn't a fault in the code, the pi or driver board. One servo just stopped working. I figured it was just bad luck and moved on. After another 15 minutes of moving the other two servos around I disconnected and stored everything.

So a week later I'm trying it again, and now only one is working. Again I checked whether it was really the servo which doesn't work anymore. I switched connectors around and one out of the original 3 servos is now working on any connection, while the other ones never work, whichever connection I connect them to.

I'm powering the servos with 5v straight from an external charger (so not from the pi) and I never attached any weight to the servos (they just move in the air).

Following this trend I guess it's only a matter of minutes until my last servo will die. I don't care about these servos too much but I wonder why they break. I thought of any one or a combination of the following reasons why they could break:

  1. I powered them with a too high voltage. This doesn't seem to be the case though. According to the product information on AliExpress they have an operating voltage of 4.8V-6V. The 5V from the usb connected charger should therefore be perfect.
  2. I chose a wrong minimum or maximum pulse width, which breaks them. This could be. I just kept the default values as they were in the example here. But how would I know what are the correct values?
  3. They are simply really shitty servos so it's only expected that they break within an hour. I guess this could be, but 2 out of 3 breaking within an hour is quite extremely shitty. To me at least.

I guess the most probable is that my code somehow breaks them. is there a way to know whether my code harms/breaks my servos?

Or do you have any other thoughts on this? Are there other reasons which could break them? All tips are welcome!

\$\endgroup\$
7
  • 1
    \$\begingroup\$ I bought some of those, to see just how cheap I could go, and still get something that worked. While I've had no failures yet, I've only run them for minutes, which proves nothing. It would be difficult to destroy them through pulse length errors. It would be easy through over-volting, especially if they're a marginal design. What exact voltage is coming from your USB 'charger' (do you mean power supply?). My vote is for #3, you probably get exactly what you pay for when you buy ultra-cheap, bargain basement, poundland servoes. \$\endgroup\$
    – Neil_UK
    Commented Feb 18, 2019 at 11:01
  • 1
    \$\begingroup\$ Did you apply any load to the servos? \$\endgroup\$
    – po.pe
    Commented Feb 18, 2019 at 11:02
  • \$\begingroup\$ @Humpawumpa - No load was applied to the servos. They just move in the air. \$\endgroup\$
    – kramer65
    Commented Feb 18, 2019 at 11:13
  • 1
    \$\begingroup\$ Did you forget to tie the GND of the rPI and the USB charger of the Servo supply together? \$\endgroup\$ Commented Feb 18, 2019 at 14:39
  • \$\begingroup\$ @MichaelKaras - I indeed didn't do that. I followed this guide: learn.adafruit.com/… And in there it doesn't say anything about connecting the two grounds. Do you think that would solve it, or do you think I permanently damaged the two servos? \$\endgroup\$
    – kramer65
    Commented Feb 18, 2019 at 15:05

1 Answer 1

1
\$\begingroup\$

So a quick look on the datasheet: http://www.ee.ic.ac.uk/pcheung/teaching/DE1_EE/stores/sg90_datasheet.pdf

shows that you should be working on a 50Hz cycle in your code your using a 60 Hz cycle. That's the first thing. The second thing, which looks ok, is the calculation for the PWM it should return 2 for the first call to setPercentage. It should then return 1 for the second call to setPercentage but I think its returning it to 0. Maybe print the results for the setPercentage calls and see whats being returned. Maybe your motors aren't broken their just not working right ;)

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for the insights! I'll test this first thing in the morning tomorrow! \$\endgroup\$
    – kramer65
    Commented Feb 18, 2019 at 15:06
  • \$\begingroup\$ Ok so I just tested it. Unfortunately setting the frequency to 50 gives me the same results; the one servo still works and the other two stil don't work. Could it be that the higher frequency of 60 I used, broke the two servos? \$\endgroup\$
    – kramer65
    Commented Feb 19, 2019 at 4:19
  • \$\begingroup\$ I don't think so a high frequency would likely result in the motor not working right as it wouldn't get any control signals, I have a few of these SG90s and there fairly robust, they can take a bit of punishment, are you sure that your supplying enough power? \$\endgroup\$
    – Jack
    Commented Feb 20, 2019 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.