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
and sorry for the big post, but I tried to provide as much information as possible!
Videos showing the problem:
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);
}





