Servo vibration problem with robot arm

Hi guys,

I'm using PWM servos to move a 6-degrees-of-freedom robot arm but I'm having a lousy vibration problem with the smaller ones.

The first 3 axes are moved by Tower Pro MG996R servos and work fine. Axes 4 and 5 use MG90S servos, and axis 6 an SG90.

The issue with the last 3 axes (especially the 4th and 5th) is that they vibrate quite a bit when moving, and it seems to be a mechanical problem due to backlash. Since I want them to rotate slowly, I have to incrementally increase the desired position. Because of the small backlash at each increment, they begin to vibrate, and sometimes it seems that they even resonate, causing a very large vibration.

When I increase the torque on the shaft by adding weight, the vibrations clearly decrease, so it really seems to be mechanical and something that some sort of damper or having a heavier structure would solve. I didn't want however to have to make the structure heavier just to solve this issue, as it would then reduce the load the gripper would be able to carry.

Below are my circuit and some videos showing the problem. I'm using a 12V LiPo battery and a voltage converter that outputs 5V to power it, but it wasn't available with the program I used to make the diagram. When there's no load at all on the horn, it moves fine, as you can see.

I'm using the EasingServo library to interpolate between two positions using a cubic equation, but the exact same problem occurs when I just linearly interpolate between them using a simple for loop. Moreover, the EasingServo library also uses the standard Servo library to move the servos, so I don't believe the problem is related to code or software. When I write a position and let it go directly to it, that is without interpolating, this problem doesn't happen, but it's obviously not how you want to operate a robot arm.

I already did some research and couldn't find a solution to a similar problem in the forum. The vibration problems that I found are related to not using an external power supply, which isn't my case, or external interruptions. Also, I'm using a breadboard, but during the tests I was only powering one MG90S servo, so it shouldn't be the case of powering the servo directly as well, since the current draw is very small in this case.

The exact same problem happens with the 4th axis. With the 6th axis I can notice a small vibration, but it's acceptable.

Things I have already tried:

  • Powering it with 5V and 6+V.
  • Using a different servo (I tested it with another MG90S and also with an SG90 and the same problem occurs).
  • Using different libraries (I tested with both standard Servo library and the ServoEasing one)

I don't want to use bigger servos that have no backlash, since these small ones already provide enough torque for my project.

Please what could be the source of the problem? Is it really mechanical? How could I solve it?

Thanks :slightly_smiling_face: and sorry for the big post, but I tried to provide as much information as possible!

Videos showing the problem:

Horn Only
No Load
With Load

Circuit

Code

#include <ServoEasing.hpp>

ServoEasing Servo1;

void setup() { 
  Servo1.attach(3,45); 
}

void loop() {
    Servo1.setEasingType(EASE_CUBIC_IN_OUT); //type of trajectory
    Servo1.easeTo(0, 50); //first argument is the position and the second is the speed in degrees/sec
    Servo1.easeTo(180, 50); 
}

The same problem happens with this code:

#include <Servo.h>

Servo Servo1;
int pos = 0;

void setup() { 
  Servo1.attach(3); 
  Servo1.write(pos);
}

void loop() {
  for(pos = 0; pos < 180; pos++) {
    Servo1.write(pos); 
    delay(10);
  }

 delay(200);
 
  for(pos = 180; pos > 0; pos--) {
    Servo1.write(pos);
    delay(10);
  }

 delay(1000);
}

Please post real schematics.

Thanks for replying. Added to the original post. Between the battery and the breadboard is a voltage converter outputting 5V.

You didn't get it as I would like.
Jerky servos, or motors, often come from insufficient powering.
I find nothing new in Your post.

Hopefully it's better now. Please watch the videos as they give a better idea of the problem.

Hi,
If all your servo current is running through those two wires, red and black and the protoboard, then you may have some serious power problems.
Can you measure the voltage where the servo wires connect to the protoboard and see if the voltage varies as your problem occurs.
Those wires for all those servos looks to light in gauge too.

Move all your 5V wiring as close to the 5V DC-DC converter as possible.

How much current does the converter tell you is running when you have the system operating.
It looks like that DC-DC converter has a current limit facility, what is it set at?

Tom... :smiley: :+1: :coffee: :australia:

Use writeMicroseconds. Its much better granularity than degrees.

  for(int pos = 1000; pos < 2000; pos++) {
    Servo1.writeMicroseconds(pos); 
    delay(1);
  }

The mid-point is at 1500 microseconds.

Hi Tom,

Thanks, you are correct. When running all the 6 motors I will have in fact to use a different way to supply the power, since the combined current of all servos if stalled can reach 8.5A. However, in this test, only one microservo, the MG90S was powered. I'm only testing one servo at a time. This servo has a stall current of 400mA, which was never reached since it never stalled.

The wires I'm using to power each servo are thicker than the servo ones, so they can definitely handle the current. The voltage regulator's max current is 3A, also way above the microservo's. The value you read on its digital display is the output voltage, it doesn't show the current. I believe the breadboard could also handle the 400mA, right?

In sum, I don't see how this could be a power supply problem, since only a microservo was being used in my test.

Unfortunately I don't have a multimeter that I can use to measure the voltage and current, but I have an Arduino MKR Motor Carrier with which I would be able to connect the components directly without any wires or breadboard. It can handle 3A so it should be okay. I will test it with it and report back.

Any other ideas on what could be the issue ? :grinning:

I just used an MG996R instead of the MG90S to move that same axis and the problem doesn't happen, but it's an overkill for my application. I don't need that much torque on that joint. So I'm still thinking the issue is mechanical and related to the backlash.

EDIT:
I tested it with the MKR1000 + MKR Motor Carrier which involves no wire at all and got the same problem. So it's definitely not related to power supply.

I did that but the problem happens still :sweat:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.