360 degree servos?

Hey guys.

Im doing a project involving robotic arms with 2 servos - pan and a tilt.

Ive had no problems with the tilt mechanism as i only need to move 100 degrees, finding a motor for this was easy and the ones i got work in the way i expected - i e send it a number through PWM which moves it to a position.

But with the 360 degree ones it works differently. for example send it an 80 and it moves slowly clockwise, 85 it moves faster then send it a 70 and it moves the other way. This is completely useless to me!

So, can anyone tell me how i can make these work differently or where i can get 360 degree servos that work normally??

thanks in advance!

Rich

It sounds like that is a continuous rotation servo - you can't control its position, just turn it at variable speed in two directions or stop it. Folks here often refer to them as "ex-servos". If you look for servos for model yachts - sail or winch servos, you'll find examples that can turn 360 degrees or more.

Thanks wildbill.

I did come across winch servos, but the guy in the shop said they worked in a different way again. something along the lines of having to rotate a certain amount of times one way to be able to go back the other?! this seemed very strange, do you know what he was reffering to or is this just false?!

cheers
Rich

this seemed very strange, do you know what he was reffering to or is this just false?!

I suspect just a false or misguided opinion.

This appears to operate just as a standard servo except total travel is rated as 360 degrees rather then 180:

thanks. will go ahead & order one to test.

Be aware that the sail winch servos may turn from three to six turns, with rotatio position accuracy possibly being reduced by 2x the number of turns.

Ok so i bought a "hitec hs785 hb" sail winch servo.

Cant believe it but im having exactly the same problem! I thought it might be to do with the code i was sending from processing so tried it with examples/servo/sweep. it just doesn't do what the code says it should. Instead of moving 180 degrees, it moves about 280. I think it is controlled in exactly the same way as the motors i had the original problem with.

Can anyone help?!

cheers
Rich

The sweep example uses servo.write, which is a wrapper for servo.writeMicroseconds. It assumes a servo with a 180 degree range of motion. That isn't true of your new server so you won't get the 180 you expect. Try using writeMicroseconds directly and experiment with the range of values the servo will accept.

Simple servo test code for use with the serial monitor that you can try.

// zoomkat 10-22-11 serial servo test
// type servo position 0 to 180 in serial monitor
// or for writeMicroseconds, use a value like 1500
// for IDE 0022 and later
// Powering a servo from the arduino usually *DOES NOT WORK*.

String readString;
#include <Servo.h> 
Servo myservo;  // create servo object to control a servo 

void setup() {
  Serial.begin(9600);
  myservo.writeMicroseconds(1500); //set initial servo position if desired
  myservo.attach(7);  //the pin for the servo control 
  Serial.println("servo-test-22-dual-input"); // so I can keep track of what is loaded
}

void loop() {
  while (Serial.available()) {
    char c = Serial.read();  //gets one byte from serial buffer
    readString += c; //makes the string readString
    delay(2);  //slow looping to allow buffer to fill with next character
  }

  if (readString.length() >0) {
    Serial.println(readString);  //so you can see the captured string 
    int n = readString.toInt();  //convert readString into a number

    // auto select appropriate value, copied from someone elses code.
    if(n >= 500)
    {
      Serial.print("writing Microseconds: ");
      Serial.println(n);
      myservo.writeMicroseconds(n);
    }
    else
    {   
      Serial.print("writing Angle: ");
      Serial.println(n);
      myservo.write(n);
    }

    readString=""; //empty for next input
  } 
}

cheers zoomkat.

but still i get the same result. if i type 180 into serial monitor it goes fast continually 1 way, if 0, the other way and 90 it stops.
dohh!!

i have spoken to someone on an rc shop techline and he said maybe i was sending a digital signal instead of an analog one. But am i write to think PWM is analog?

if not has anyone ever controlled a servo with on of the analog outputs? and would this make it act differently? (not PWM)

cheers
Rich

i have spoken to someone on an rc shop techline and he said maybe i was sending a digital signal instead of an analog one. But am i write to think PWM is analog?

Servo control pulses are digital.
I've never seen an analogue-controlled R/C servo (except maybe in historical references) - your techline man is talking out an orifice not normally associated with verbal communication.

lol!!

ok problem solved! found a reference to the position/microsecond value, which is different for this servo -

http://www.robotshop.com/ca/hitec-hs785hb-servo-motor-2.html

then used zoomkat's test code for the win!

thanks guys!!