Modified servo for continuous rotation turns one direction only

Hello,

I modified an HITEC HS-422 servo for continuous rotation, then it has a strange behavior. When I run code on it:

  • values below 90 seems to behave as angle positioning (servo turns, positions and stops)
  • values above 90 with the servo.write(90) instruction, make it run clockwise continuously, and mainly big values such as 150-180, and I have not observed speed difference between those values.
  • values between 90-150 make it behave hazardously, it turns, slows down, turn again...

My goal is to make it turn in BOTH directions to make a winch.
Maybe I missed something in my servo modification. Should I maybe replace the internal potentiometer? Any trick is welcome.

Thanks in advance

I used the following code with the different values:

#include <Servo.h> 

Servo myservo;

void setup() 
{ 
  myservo.attach(9);
 // myservo.write(0)
 // myservo.write(90)
 // myservo.write(150)
  myservo.write(180);  // 
} 

void loop() {}

For a continuous rotation servo the internal potentiometer must at least be mechanically disconnected from the output shaft. If it is going to be used to set the "off" angle then it should be permanently set at about the middle of its movement.

When I modified a servo I removed the pot and used a couple of fixed resistors as a voltage divider to set the off angle.

...R

Thanks for the answer.
I finally decided to remove the potentiometer and replace it by 2 x 2.7 K Ohm resistors (it was a 4.7 K Ohm pot).
And now the servo works in all directions around the mid-point position of 95.

Thanks again. Note that I did not understand why it did not work previously...

Terry

Terry_Robot:
Thanks again. Note that I did not understand why it did not work previously...

Servos are a negative feedback loop. To oversimplify slightly, they run a variant of this formula constantly:
drive = A * (setpoint - current position) - B * velocity

Where A and B are its internal control parameters (it may have some others) that define how fast it reacts, etc. When converting for continuous rotation, you are taking away the feedback (potentiometer) and lying to it about its position. By using two fixed resistors, the servo thinks that it is in a particular position and not moving. Therefore it becomes:

drive = A * (setpoint - some_constant)

And therefore you get a variable-speed motor controlled by the setpoint input.

Hope that helps...

Thanks a lot for this very good clarification !
Terry

When making a continuous rotation servo, one should "calibrate" the servo for best positioning. One way is to send the servo a 90 1500us position command and then carefully take the servo apart for the mod and secure the pot shaft with out moving the shaft. Another way is when the servo is apart, power it up and send it a 1500us command, then carefully adjusrt the pot until the motor stops, then secure the pot shaft in place.