Servo SM-S3317S SpringRC

Hi,

I bought this servo, but I can not make it work right.
when I put it on the Arduino, it just begins to turn up to the maximum. He does not respect the position that I put.

here's the code:

#include <Servo.h>
Servo myservo;

void setup() {
myservo.attach(9);
}
void loop() {
myservo.write(90);
delay(1000);
}

thanks

Sounds like it may be wired incorrectly. Usually it is Red to +5V (or +6), Black to Ground, and White or Yellow to the signal pin (D9).V

Is correct.

Red +5V, Black GROUND and White for the signal.

I don't know if this servo needs a special command to work properly.

here a video showing the problem Servo SM-S3317S problem with Arduino - YouTube

Thanks for the reply.

Vinicius Teixeira Coelho

What bothers me is that the LED on pin 13 flickers every time the servo moves. The code you show doesn't manipulate D13. Are you sure you have the sketch above loaded?

Servo test code you can try with the serial monitor.

// 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
  } 
}

john, is very strange. it seens the arduino reset when send the signal to the servo.

zoomkat, the code doesn't work too. same problem.

thanks for the replys.

Vinicius Teixeira Coelho

I make a test. I write this code:

#include <Servo.h>
Servo myservo;

void setup() {
myservo.attach(9);
}

void loop() {

}

Same problem =[

Vinicius Teixeira Coelho

My guess is that the servo is drawing too much power and causing the Arduino to reset. Try running the servo off a separate power supply, like four AA batteries in series. Connect battery + to the red wire of the servo and battery - to the black wire. Then connect Arduino ground ALSO to the black wire and the signal pin to the white wire.

john,

thank you very much. You are right, the servo need more that the arduino can give.

Vinicius Teixeira Coelho