Modified servo .. continious rotation problem

Hi all ... have a little problem with a servo i modified for continous rotation 

#include <Servo.h> 

  Servo myservo;  // create servo object to control a servo 

  void setup() 

  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 

  void loop() 

   myservo.write(0);                  // rotate counterclockwise 

  delay(5000);                           

 

  myservo.write(90);                 // stop

  delay(2000);

   myservo.write(180);                 // rotate clockwise

  delay(2000);

will rotate counterclockwise for command myservo.write(0);  ... 

rotates clockwise and then stops  for command myservo.write(0); (uaually in a different position every time program loops)

dose not rotate continually for command myservo.write(180); just rotates to a position (usually a different one every time program loops) and then stops 

have tried different values up to 1024 but cannot get it to rotate continually clockwise

 

to modify servo just had to remove a bit of plastic ..  

took another servo apart and ran that one and could see pot turning ... on (0) pot turned full and motor continues running on (180) pot turned full other way then motor stops .

managed to break a wire on pot and and saw motor tuning full on (180) but as this was a accident i didnt see which wire it was and then other two wires fell of LoL

so wondering how do i get this servo to rotate continually on (180) or do i need to cut one of the pot wires ... if so any suggestions to which one i cut

cutting might not be best solution as i just realised did not stop between rotating clockwise and counterclockwise

https://www.youtube.com/watch?v=IgSfMa8IlxM

thanks guys will try these

thanks guys will try these  out and hopefully get one to work …

ok managed to get this to

ok managed to get this to work reasonably ok … decided against the resistors as there is so little room in servo case … would have being to messy … went with soldering the pot and filing the shaft … centered the pot and soldered but pot must have moved a bit during soldering as when code in  myservo.write(90);  it moves slowly … using myservo.write(92) instead and it stays stopped 90% of the time

so myservo.write(0) i get counterclockwise continuous … myservo.write(180) gets clockwise continuous and myservo.write(92) stops (well mostly)

will probably give it ago again on anothe one and see can i improve now that i know what im doing … but thanks for the help 

have u put resistors in

if so, what’s the volume did you put into the servo instead the potentiometer

That’s pretty normal. It is

That’s pretty normal. It is nearly impossible to get the center stop position fixed reliably. In fact resistance values float a bit with temperatures, etc.

What I tend to do when I want my continuous rotation servos to stop is to disable the servo entirely by detaching it.

myservo.attach(9); 

Then you can attach it again when you want to use it. 

This works fine unless you need the server to stay fixed in the stop position. When you detach it, it will will not be powered, so you can turn it freely, except for the servo’s internal friction.

The replacement resistors

I measured the potentiometer in a small 9g servo the other day and it was 3K ohms.  So i used two 1.5K ohm 1/16 Watt thru hole resisters attached to the wires cut from the potentiometer.  After clipping the pins from the potentiometer and trimming the leads real short i was able to squeeze them into the case.

But next time i will use surface mount resisters.  I think anything from 1.2 to 2K should be fine.

RG