Problem with Servo QY14-UK

I’ve problems with those servos
When I ask to reach a specific position they ar buzzing and move really slow, pushing them the reach the correcto position.
If I make them sweep the work well

EDIT: I use a AC/DC adaptor as power supply, it can deliver 7.5 V and 1800 mA to power up the servo

They work well for that code

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}

but not for this one

/* Sweep
 by BARRAGAN <http://barraganstudio.com>
 This example code is in the public domain.

 modified 8 Nov 2013
 by Scott Fitzgerald
 http://www.arduino.cc/en/Tutorial/Sweep
*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(10);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  myservo.write(90);
  delay(500);  
  myservo.write(10);
  delay(500);   
  myservo.write(40);
  delay(500);   
  myservo.write(160); 
  
}

I upload a video of them on my youtube channel

Any Idea?

If you are trying to use the 5V output of the Arduino to power the servo, that is the problem.

Use a separate power supply for servos (capable of 1 Ampere per servo) and connect the grounds.

Yes I use a AC/DC adaptor as power supply, it can deliver 7.5 V and 1800 mA

Did you connect the grounds?

Is this line correct? If so, why the comment, and why did you change pin numbers between the two programs?

  myservo.attach(10);  // attaches the servo on pin 9 to the servo object

yes I connect to the ground in a proper way, as I say with the sweep code the servos do their job well

The error in the comment is typing mistake, sorry for that

Those are large digital servos. I would guess that even 3A is not enough to run several of them at full speed. Since Sweep only makes small movements you get away with it. You're not connecting them via a breadboard are you? They won't handle high currents either.

Try with solid connections to something like a 2S 2000mAh Lipo battery or maybe 6 x NiMH rechargeable batteries. These are good at delivering high instantaneous currents.

Steve

slipstick:
Those are large digital servos. I would guess that even 3A is not enough to run several of them at full speed. Since Sweep only makes small movements you get away with it. You're not connecting them via a breadboard are you? They won't handle high currents either.

Try with solid connections to something like a 2S 2000mAh Lipo battery or maybe 6 x NiMH rechargeable batteries. These are good at delivering high instantaneous currents.

Steve

I had thought of the exact same thing, so I went to a friend who repairs home appliances, and I try with a power supply that can reach the 3 Ampere.

And we oberve that, when I make al the servo move in sweeping mode the consume not so much current, at max 1.7 A, but the strangest thing is that, when the servo motors try to make long angles they are consuming a very little quantity of current, at max 0.2 A

I does not try with battery because of that, they seems that when you ask him to do long angles, they do not ask for enough current.

Any idea?

That servo has a fairly large mass attached to it. A lot of metal a long way from the center of rotation. This makes for a large moment of inertia.
When you first tell it to move from 90 to 40, I suspect that it draws very much more than the .2 A you describe. Oh, after it is moving, it might be .2A but there will be a large spike while the motor is stalled. And since you have such a large moment if inertia, that smile will last longer than with an unloaded servo.

For an experiment, remove the pieces attached to that servo and run your sketch. Does it run successfully?

On a side note, your sketch has one issue that may be confusing.
You tell the servo to go to 90 and wait a half second for it to get there.
You tell the servo to go to 10 and wait a half second for it to get there.
You tell the servo to go to 40 and wait a half second for it to get there.
You tell the servo to go to 160 and oddly do not give the servo any time to get there before you immediately start over and tell the servo to go to 90.

This basically ignores the command to go to 160.

vinceherman:
That servo has a fairly large mass attached to it. A lot of metal a long way from the center of rotation. This makes for a large moment of inertia.
When you first tell it to move from 90 to 40, I suspect that it draws very much more than the .2 A you describe. Oh, after it is moving, it might be .2A but there will be a large spike while the motor is stalled. And since you have such a large moment if inertia, that smile will last longer than with an unloaded servo.

For an experiment, remove the pieces attached to that servo and run your sketch. Does it run successfully?

On a side note, your sketch has one issue that may be confusing.
You tell the servo to go to 90 and wait a half second for it to get there.
You tell the servo to go to 10 and wait a half second for it to get there.
You tell the servo to go to 40 and wait a half second for it to get there.
You tell the servo to go to 160 and oddly do not give the servo any time to get there before you immediately start over and tell the servo to go to 90.

This basically ignores the command to go to 160.

vinceherman, unfortunatley the pieces attached to that servo, it's not the problem for the follow reason:
1-the structure are the 3 servo connected to each other, the last one had no weight on hit, and it have the same problem
2-At the beginning, they all work properly, only after some use have they started behaving like this when asked to make wide angles

As regards the current, I agree you when you say "I suspect that it draws very much more than the 0.2 A" and this is the strangeness that I can not explain, because I also expected that for a long angle a lot of current was required, the power supply detected 0.2A, it is as if the servant needed power but does not ask for it.

It is possible that the servants have been ruined?

protossidodiazoto:
It is possible that the servants have been ruined?

Entirely possible. I used to have a box full of broken servos. I use them in radio control planes. I frequently crash those planes. Servo gear trains do not like violent wrenching of the control surfaces that they are attached to.
But you can test for this. Load up the servo sweep tutorial. If the servo behaves properly, then it is probably still good. As it sweeps, use your hand to offer it a bit of resistance. If you hear the servo clicking, it might have a damaged gear.
But if the last servo has no weight on it and it also mis-behaves, then there is probably something other than a damaged gear-set going on.

It has been asked already, but I am going to ask it again. How are you powering the servos? Can you post up some pictures of the wiring? And a wiring diagram (pencil, paper and a camera are good enough)

Servos draw the stall current every time they start moving, even if there is no load.

Your power supply must be able to supply the total stall current required for all servos that will be moving at the same time.

vinceherman:
Entirely possible. I used to have a box full of broken servos. I use them in radio control planes. I frequently crash those planes. Servo gear trains do not like violent wrenching of the control surfaces that they are attached to.
But you can test for this. Load up the servo sweep tutorial. If the servo behaves properly, then it is probably still good. As it sweeps, use your hand to offer it a bit of resistance. If you hear the servo clicking, it might have a damaged gear.
But if the last servo has no weight on it and it also mis-behaves, then there is probably something other than a damaged gear-set going on.

It has been asked already, but I am going to ask it again. How are you powering the servos? Can you post up some pictures of the wiring? And a wiring diagram (pencil, paper and a camera are good enough)

with the sweep they work properly

I'm powering those servos with a AC/DC adaptor who can supply 7.5 V and 1800 mA (but I tried with one who can supply even 3000 mA)

If you still need a schematic i will upload!

jremington:
Servos draw the stall current every time they start moving, even if there is no load.

Your power supply must be able to supply the total stall current required for all servos that will be moving at the same time.

So, if I understood correctly what you're sayng, if I ask to the servo to make a large angle at max speed and they have not enough current they're going in a stall state, and move really slove with low current consumption?

The stall current is measured with the shaft locked, and it is typically 5 to 10 times higher than the no load running current.

When a motor starts up, the shaft is not moving, and for a brief moment, it draws the stall current. If your power supply can't provide that startup current, many things can go wrong, such as the symptoms you are currently observing.

I've already suggested using a good battery instead of a limited power supply to cater for the high startup currents of those very power hungry servos but the OP refused to take that advice. I've given up, if people won't listen you really can't help them.

Steve

slipstick:
I’ve already suggested using a good battery instead of a limited power supply to cater for the high startup currents of those very power hungry servos but the OP refused to take that advice. I’ve given up, if people won’t listen you really can’t help them.

Steve

I’m not refusingyor advice Steve I just want to listen to the opinion of people more experienced than me, liyou, and I answered to your suggestion saying:

"I try with a power supply that can reach the 3 Ampere.

And we oberve that, when I make al the servo move in sweeping mode the consume not so much current, at max 1.7 A, but the strangest thing is that, when the servo motors try to make long angles they are consuming a very little quantity of current, at max 0.2 A"

But I can’t understand, probably because I have no experience, why a battery who can supply 2000 mA can do a better job then a power supply who can supply up to 3000 mA

you said “These are good at delivering high instantaneous currents.” that’s means who battery are more fast to give current, and in this case is more important to have fast current supply rather than much current supply?

I’m a student I cannot buy random thing until one of them works, it is for this reason that I want to understand the problem well and listen to more possible opinions, so please do not be angry, I did not want to neglect your advice

protossidodiazoto:
But I can't understand, probably because I have no experience, why a battery who can supply 2000 mA can do a better job then a power supply who can supply up to 3000 mA

That is because you are confusing the CAPACITY of the battery measured in mAh with the maximum CURRENT it can supply which is measured in mA or Amps. They are not the same thing.

A 2000mAh capacity NiMH battery can typically supply 10A or more. A 2000mAh capacity Lipo battery may be able to supply anything up to about 40 or 50A for a short while.

Steve

slipstick:
That is because you are confusing the CAPACITY of the battery measured in mAh with the maximum CURRENT it can supply which is measured in mA or Amps. They are not the same thing.

A 2000mAh capacity NiMH battery can typically supply 10A or more. A 2000mAh capacity Lipo battery may be able to supply anything up to about 40 or 50A for a short while.

Steve

Thanks Steve, it's like you say, I was confusing capacity with the maximum current it can supply,
and it was for this reason that I could not fully understand the meaning of your proposal.

So for example if I take 6 rechargeable Ni-MH 1.2V min.1900mAh AA, and I put them in series they can supply my device and deliver high instantaneous currents when there is the need?

In any case thank you

protossidodiazoto:
If you still need a schematic i will upload!

Please do.
As I mentioned earlier, How are you powering the servos? Can you post up some pictures of the wiring? And a wiring diagram (pencil, paper and a camera are good enough)

A fritzing diagram will only provide some information. I want to know how the power is routed, all the way from the power supply to the servos. Please do include some pics of your project that will allow us to see the power distribution.

slipstick:
That is because you are confusing the CAPACITY of the battery measured in mAh with the maximum CURRENT it can supply which is measured in mA or Amps. They are not the same thing.

A 2000mAh capacity NiMH battery can typically supply 10A or more. A 2000mAh capacity Lipo battery may be able to supply anything up to about 40 or 50A for a short while.

Steve

I tried with battery, but the result it's the same