Servos are confusing me...

Okay, so I have this servo:

Futaaba S9452 High-Torque High-Speed

It’s a digital servo.

Here are the specs:

4.8V 102 oz-in (7.4 kg-cm) 0.13 sec/60°
6.0V 128 oz-in (9.2 kg-cm) 0.11 sec/60°

When turning the motor without power, I can rotate a bit over 180 degrees.

I’m trying to sweep the servo from 0 to 180 degrees as fast as possible.

So here’s the problem… sweep is slow. Real slow. I futzed with settings and I’m getting no consistent results.

Half the time I can’t even get it rotating 90 degrees… then sometimes it seems to be “oversteering” and bouncing back a bit from the overturn… I don’t get it.

I would think I could get the servo to go to 180 degrees in 0.39 seconds… but it won’t even go 180 degrees at all, and when it gets close, it’s nowhere near that fast.

I’ve tried various examples with all sorts of mixed results but I’m left just as lost as when I started.

Also noting... it's not staying locked in place when power is applied to it... what the heck is going on? I can just push the servo horn around while it has 6v running to it.

Typically a servo with this much torque would stay firmly in place with power applied to it... no? I don't have this issue with the analog servos I've used in the past. Is this a digital servo thing or maybe my servo is just malfunctioning?

I have a 120 oz-inch torque analog servo and I'd probably have trouble trying to even turn it with my hand when power is applied to it.

This would also explain why this servo is slipping when it turns... the torque just isn't being constantly applied...

Are you sure the horn is not slipping on the shaft? Change the 15mS delay in Sweep to vary speed. And make sure your power wiring is not loose.

#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(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(5);                       // change this to vary speed, lower number, higher speed ***<<<< 
  } 
  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(5);                       // change this to vary speed, lower number, higher speed
  } 
}

And surely, you’re not trying to power it from Arduino’s 5V pin. Are you?

konidias:
I’ve tried various examples with all sorts of mixed results but I’m left just as lost as when I started.

You need to post the program you are using to give the results you are describing.

…R

We need to see the code you're using. There are many ways to (accidentally) slow servos down in software.

But in general if you want full speed you need to initialise by sending write(0). Then when you send write(180) the servo will go as fast as it can. The actual speed will depend on if you're providing enough power to it - digital servos are notoriously power hungry.

Steve

Steve mentioned power. We want ot know how you are powering the servos. Can you provide a wiring diagram? A pic of a hand drawn diagram is OK. See this image guide.

I'm positive it's not the horn slipping on the shaft.

I'm using the Sweep example.

I'm powering the servo with a 6v 2A DC adapter. It's plugged into the wall, and power and ground are being fed into the + and - of a breadboard. The red wire of the servo is connected to the + breadboard. The black wire is connected to the -.

The white wire of the servo is running to pin 9.

A wire is also running from ground/- on the breadboard to ground on the Arduino.

I'm using an Arduino Mega.

When I run the code, it moves very slowly and not 180 degrees of rotation. It also slips very easily like the proper amount of torque is not being provided.

I've seen similar slippage when not providing enough power to a servo... but this servo is designed for 6v and that's exactly what I'm using... so I'm confused as to why it is performing like this. I've concluded that the inconsistency is due to the servo shaft not firmly staying in place with power applied.

This is a brand new servo and I haven't done anything to it to cause it to break or have issues... as far as I know. I literally just hooked it up like I described.

Powering via a breadboard often doesn't work...the connections are pretty high resistance so you don't get full power. Power isn't just voltage, it includes current.

And then with no real information, your DC adapter might be one of the common ones that isn't well regulated and won't supply any where near it's specified current without a serious volt drop.

Steve

So I hook the power directly to the servo?

I feel like I've tried that already without any change...

I'm using this for power:

https://www.amazon.com/gp/product/B00DID6C0S/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1

I've used the same adapter on a 6v analog servo with no problems.

I'm really just lost as to what the issue could be... short of the servo being defective. But it's brand new so I just find that a bit unlikely. Especially considering it is showing signs of not getting enough power.

konidias: So I hook the power directly to the servo?

Make a simple pencil drawing showing how you have everything connected and post a photo of the drawing.

And please don't use Fritzing.

...R

Robin2:
Make a simple pencil drawing showing how you have everything connected and post a photo of the drawing.

And please don't use Fritzing.

...R

Alright here

I ran the code posted above and it goes about 120-130 degrees and that's it... It definitely can manually go more than that... but you'd think going from 0 to 180 would actually mean the shaft rotates 180 degrees... it does not.

I'm not sure how to fix. Still at a loss with this.

Also with this code just like any code, the servo seems to not be getting full power. I can easily push the servo off course with my fingers... which should not be the case with a high torque servo like this.

konidias:
I ran the code posted above and it goes about 120-130 degrees and that’s it… It definitely can manually go more than that… but you’d think going from 0 to 180 would actually mean the shaft rotates 180 degrees… it does not.

Your wiring diagram looks OK although it does not show how the Arduino is powered.

When you get into that sort of muddle you need to simplify.

Try this program

#include <Servo.h>
Servo myservo; 


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

}

and see what happens.

Then change it the microseconds value to 1800 and see what happens. Then make small changes until you find the limits within which your servo can operate.

I’m using writeMicroseconds() because it can accommodate the possibility that the servo can move before 0 degrees.

Servos don’t all move through the same range so you do need to experiment

…R

A normal servo, digital or not, will rarely travel 180 degrees. A maximum of 120 degrees is more normal. Some can be programmed (in the servo) for extended range. I know some Hitec servos can but I don't think any Futabas are programmable so if you really need a genuine 180 degrees of travel you'll probably have to find a different servo.

And I still think you need to power that high power servo directly not through a breadboard. And you may need a better power supply. The instantaneous current load of those things can be several amps.

Steve

I'm currently powering the Arduino from serial port USB connection. I wouldn't think that should effect the servo since the servo is getting power from another source though.

I don't have anything else connected to the Arduino, so the power load is literally just the Arduino running the Sweep sketch.

I think I'm going to have to just try and get a better power adapter then? It's weird that I've used analog servos that are just slightly less torque and they worked just fine with this same power adapter....

Maybe it's the fact that it's digital, or that it's twice as fast as the analog one so it requires more amps?

At the very least I can rule out the power adapter by doing that.

Also, how would I power it directly? Just hook the power wire directly to the power supply, or would I also hook the ground? I thought it needs to ground to the Arduino.

Power supply + and ground go to the servo (red and black wires) and the ground also needs to connect to the Arduino ground.

But I don't think you're going to get 180 degrees movement out of that servo. It's intended for steering RC trucks and around 90 - 100 degrees is all they usually need.

Steve