Finally, my first attempt of turning a micro servo into a 360 rotation servo is succeeded. It's very hard to solder wires that small in a micro servo.
The hardware is okay, now the software. I find that the regular servo.write(xx) is working, if the xx is between 180 and 540, it turns anti-clockwise, otherwise, it turns clockwise, but I have to use external power source for that even only one servo operating.
So I wonder what is the proper way to control rotation direction and the speed of 360 servo?
There are two ways to make a continuous rotation servo, after removing the mechanical stop:
1: Mechanically decouple the feedback pot and set it to the mid-point.
2: Remove the feedback pot and replace with two equal fixed resistors between the wiper terminal and each end. The resistors should each be half the resistance of the pot.
Sounds like you didn't get the conversion right. Perhaps one end of the pot is open or shorted.
The servo should rotate one way for values less than approximately 90 and the other way for values greater than that.
Thank you. I took the wires out and resoldered them, now I can find the "stop" value 82 because I use 2.7k and 2.4k resistors as the pot has 5k resistance.
But something strange happened, I find the mid point and the servo stops.........for awhile, it stays still for a moment and then it MOVES again, very slow and then stops again.
it's spooky, every time I uploaded a sketch to arduino, the mid point value changed! And even when the servo sits still, if I wait a couple minutes, It moves again by itself......
For DIY continous rotation servos, it is best to use the writeMicroseconds function to have better control over the servo. The "neutral" point can drift with temperature and such. Below is some simple code that detaches the servo control signal instead of using the sometimes changing neutral valuewhen it is desired to stop the servo.
// zoomkat 10-14-11 serial servo test
// type servo position 0 to 180 in serial monitor
// 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(2000); //set initial servo position if desired
myservo.attach(7); //the pin for the servo control
Serial.println("servo-test-22"); // 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); // 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();
if (n < 500) {
myservo.detach();
}
else {
myservo.attach(7);
myservo.writeMicroseconds(n); //convert readString to number for servo
//myservo.write(readString.toInt()); //for degees 0-180
}
readString=""; //empty for next input
}
}
ttttkk:
Thank you. I took the wires out and resoldered them, now I can find the "stop" value 82 because I use 2.7k and 2.4k resistors as the pot has 5k resistance.
But something strange happened, I find the mid point and the servo stops.........for awhile, it stays still for a moment and then it MOVES again, very slow and then stops again.
I would just use the same value resistors (say 2- 2.4k or 2- 2.7k ) rather than trying to get the resistance to be exactly 5k by your using the 2.7k and the 2.4k .
The myservo.detach() command works like charm, thank you. I use two buttons to control the rotation direction and speed, the servo won't rotate until I command it to, pressing those buttons simultaneously will stop the servo, and it works . But I can not achieve it without an external power supply, my guess is that when a servo is rotating 360 deg, it draws too much power from USB plug which arduino can handle.
But here comes a problem again, if I unplugged the USB and left the 9V Wall Adapter plugged in arduino, the servo rotates itself and the control buttons won't do anything, the servo just keeps spinning, but if I put back the USB (and the 9v wall adapter plug), it stops and waits for my command.
It sounds like you are running the servo off the same 5V that is supplying the arduino processor. This normally causes interference of the sort you are seeing. You need to run your servos off a different supply capable of providing all the current it needs. Don't forget to join the grounds of the two supplies together.
Short answer: No.
You can modify a "standard servo" into a "continuous" sort only by modifying the servo itself.
It's strictly a physical matter.
[This is from 4 years ago, but it shows that you're looking for answers before asking questions.]
Different servos may be constructed differently and require different methods to modify for continuous rotation. youtube probably has hundreds of tutorials on the subject for different types of servos. I use the below servos and they modify very easily for continuous rotation.