Modified SG90 servo for continuous rotation, now only going clockwise?

Hi,

Firstly apologies if this is in the wrong section, I'm new to this!

I've modified an SG90 servo for continuous rotation by replacing the potentiometer with a couple of 2200 ohm resistors and removing the physical stop from the gear. The servo now continuously runs clockwise whenever powered up. I've tried to set the mid point using the following code:

#include <Servo.h>

Servo myservo;

void setup()
{
myservo.attach(9);
myservo.write(90); // set servo to mid-point
}

void loop() {}

I've changed the mid point, but this doesn't change the speed or direction of rotation at any point between 0 -180 so I don't know where to go next! I've modified a 2nd servo (just in case there is a problem with the first), same result.

Any help would be appreciated.

Thanks

Scott

Have you tried a range of values between 0 and 180 - say 10, 30, 50, 70, 90, 110, 130, 150, 170 ?

If it only runs one way for all values it means your modification is probably wrong. Have you 3 connections from the 2 resistors to the servo? (from each end and from the middle)

...R

Yeah, I've tried from 0 - 180 in increments of 10, no difference for speed or direction.

I do have 3 connections - I'm confident the mod is correct, I used a couple of different sources for reference, and did it twice - exactly the same is happening on both servos.

Also probably worth noting that when I initially connected the servo to the board it made a small movement counter clockwise.

It sounds like the "wiper" of your fake potentiometer isn't sitting at mid-rail like
it should - a short or open circuit somewhere could explain this - actually measuring the
"wiper" voltage with a meter with the servo powered up (if possible to get at) would
settle this.

I haven't got a meter, so measuring is out of the question for now.

I did open one back up, made sure the resistor connections were all isolated with tape, powered back up and now it only goes anti clockwise, same issues? Really confused now.....

scott82:
I'm confident the mod is correct, I used a couple of different sources for reference, and did it twice - exactly the same is happening on both servos.

You may be but I am not - especially if it is the same with 2 servos.

I have successfully converted servos myself.

Can you provide a link to the instructions you followed?

...R

below is some servo test code you can use to possibly determine what the issue is with your servo. You may have miss wired the resistors in your servo mod.

// zoomkat 3-28-14 serial servo incremental test code
// using serial monitor type a character (s to increase or a 
// to decrease) and enter to change servo position 
// (two hands required, one for letter entry and one for enter key)
// use strings like 90x or 1500x for new servo position 
// for IDE 1.0.5 and later
// Powering a servo from the arduino usually *DOES NOT WORK*.

#include<Servo.h>
String readString;
Servo myservo;
int pos=1500; //~neutral value for continous rotation servo
//int pos=90;

void setup()
{
  myservo.attach(7, 400, 2600); //servo control pin, and range if desired
  Serial.begin(9600);
  Serial.println("serial servo incremental test code");
  Serial.println("type a character (s to increase or a to decrease)");
  Serial.println("and enter to change servo position");
  Serial.println("use strings like 90x or 1500x for new servo position");
  Serial.println();
}

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) {
    if(readString.indexOf('x') >0) { 
      pos = readString.toInt();
    }

    if(readString =="a"){
      (pos=pos-1); //use larger numbers for larger increments
      if(pos<0) (pos=0); //prevent negative number
    }
    if (readString =="s"){
      (pos=pos+1);
    }

    if(pos >= 400) //determine servo write method
    {
      Serial.println(pos);
      myservo.writeMicroseconds(pos);
    }
    else
    {   
      Serial.println(pos);
      myservo.write(pos); 
    }
  }
  readString=""; //empty for next input
}