Problem with 2 Servos

Hellow!! i have two servos trying to move a 10kg bar, so if one starts at 0º, the other starts at 180º, because they are looking at each other, so for example when i want to move a little bit the bar one servo goes to 0º at 45º and the other goes to 180º at 135º, up to here everything correct, the problem is that when i stop , the servos start to move a little bit between them, so twice servos starts moving very few degrees back and forth every time, as if they never found the position, because when one moves to get to his position, he deviates the position of the other and they never stop shaking.

They must be big servos if they are moving a 10kg bar - please post a link to their datasheet.

How are you powering the servos?

Also, post the program you are using.

...R

Datasheet link: SERVO MOTOR SG90

Servos are the Micro Servo SG90 (blue) with 5V DC power

code:

#include <Servo.h>
#include <TimerOne.h>
Servo esquerra;
Servo dret;

int valor1,valor2=0;

int pot=A0;

void setup() {
Serial.begin(9600) ;
esquerra.attach(2);
dret.attach(3);

pinMode (pot,INPUT);

}

void loop() {

valor1=analogRead(pot);
valor1=map(valor1,0,1023,0,3000);
valor2=map(valor1,0,3000,3000,0);
delay(5);
esquerra.writeMicroseconds(valor1);
dret.writeMicroseconds(valor2);
delay(5);

}

The program it's simple, but i don't know how to solve the problem... thank you Robin!

You will have to provide a diagram to illustrate the thing you are trying to create. I have several SG90 servos and there is no way I would expect them to lift 5kg - probably not even 1kg.

I presume you are NOT drawing power for the servos from the Arduino 5v pin - but you have not actually said so.

...R

You could try writing values to the servos which are not way outside their range. Mapping from about 600 to 2400 instead of 0 to 3000 would make a lot more sense.

But I have real trouble believing that SG90s are moving a 10Kg bar anywhere.

Steve

You need to describe or post a picture of your mechanical setup as I can't figure how an SG90 servo moves a 10kg bar.

Having two servos fighting each other is going to bake one or both of them - rethink the design...

I think I exaggerate a little with 10 kg, surely it will be 3 or 4kg

and yes, maybe i have to do it with only one...

aragones10:
I think I exaggerate a little with 10 kg, surely it will be 3 or 4kg

That is still a huge load for an SG90 servo.

Why not just post the diagram we have been asking for?

...R

aragones10, as has been mentioned, we want a better understanding of what you are trying to do.
New users often use servos in some bad ways.

Knowing how you are going to power the servos is on thing. Google "arduino servo separate power supply" for a lot of information about that.

Knowing how you will be doing things mechanically is also something we want. Draw a picture of your intended project. use a phone to take a picture of that and post it here.

A pair of SG90 servos can lift a 10kg mass if the mechanical setup is done right. But I suspect that it will not really be what you are looking for.


2.5kg-cm means one servo can lift 2.5kg if it is attached 1cm out on the servo arm.
If you attach the mass 1/4cm from the center of rotation, the servo can lift 10kg.
BUT, it will only be able to lift it a fraction of a cm.
Not very practical, and operating right at the theoretical limit of performance.

So, show us a picture of what you want to do. We can help.

This are the images, it's for moving a light, and i use a apple phone charger to get 5v to the servos and the arduino. Also i have seen that when i connect the usb cable to the arduino the behaviour of the servos changes, i supose because they have more current.

Image from Reply #10 so we don't have to download it. See this Simple Image Posting Guide

...R

Is that image intended to tell us that the servos are being used to rotate something?

If so why didn't you tell us that in the first place? That is very different from the loads that would be involved in lifting something.

Are you sure that the axis of rotation is at the centre of gravity of the light fixture? If not the loads on the servos will change as the object rotates.

If you are using a servo at each end you may need to experiment to find the value that gives the same rotation. I would not assume that 33° on one servo would be same as 180° - 33° = 147° on the other. If the motion is not matched the servos will be working against each other. Using a single bigger servo would probably be simpler.

...R

aragones10:
Also i have seen that when i connect the usb cable to the arduino the behaviour of the servos changes, i supose because they have more current.

This bothers me. How are the servos powered? A wiring diagram will help.
Pen, paper and a camera are great for this.

You do realize a cheap hobby servo's torque is not a continuous rating - they cook themselves if you load
them to stall continuously.

i think the best way it's doing it only with a one and bigger servo, thank you for responses!!