Hack a TowerPro Micro Servo to Spin 360 / Continuous Rotation

189K24779

Intro: Hack a TowerPro Micro Servo to Spin 360 / Continuous Rotation

Hey guys! Since I've got my servos, I've had two that I set aside for hacking. So, coming to my favorite website for help, I was sorely disappointed when I couldn't seem to find any instructables on how to mod a micro servo. After viewing a few, I went to my workbench and got to work. I was very surprised when I opened up my micro servo and found it to be slightly different then the bigger servos. So, I decided I would make a guide on how to hack into your servo! So what are we waiting for? Lets get started.
But then you ask, doesn't this defeat the whole purpose of a servo? Well, no. We just utilize the gearbox, so that we can use this motor as a drive motor for a robot. So now, let's really get started!

STEP 1: Ingredients:

Ingredients needed: (no, not food ingredients unfortunately)

  • Rotary tool or a utility knife
  • Very small screwdriver (phillips)
  • Soldering pencil* and solder
  • Wire snips
  • Needle noes pliers
  • 2x 2.2k resistors
  • Helping Hands (AKA 3rd hand) BTW check out this awesome instructable on making helping hands. Thanks rstraugh!

    &

  • 10 minutes

STEP 2: Disassembly

First remove any servo arms, legs, and limbs from the servo.
Then, using a very small screwdriver, unscrew the four screws on the bottom of the servo. Be very careful not to lose these.
Watch the video for the disassembly of the gears. The top main gear my be hard in coming off. You can see I had a little trouble getting it off in the video.

Clip #285 from AJ on Vimeo.

STEP 3: That 5k Potentiometer

Now we are going to turn our focus on the 5k pot. Here is were it's different from the bigger servos. The shaft of the pot is also the shaft on which the gears sit on. So, we cannot get rid of the potentiometer, but we must keep it.

That being said, we must unsolder the 5k variable potentiometer, and solder on 2 [2.2K] resistors. Unsolder the wires on both ends, off of the PCB and potentiometer. Save these wires for a later project.

Take two 2.2K resistors and and bend the top leads over. Then, using the helping hands secure them like you see in the picture. Now solder these two top ends together. Get them as close to each other as you possible can. There should be two leads in the middle. Since this would make it harder to solder bend this wire up and cut it off. You should now have 3 leads.

Solder this new resistor to the PCB as shown in the last picture. Upon request, I made a horrible video of me soldering these on. It's not the best, but at least it held. For instructions on soldering. . .

Noahw and his amazing instructable https://www.instructables.com/id/How-to-solder/
&
CuriousInventor.com https://www.instructables.com/id/How-to-Solder-Videos%3a-Why-is-soldering-difficult-s/

Clip #364 from AJ on Vimeo.

Now we must remove the collar that stops the potentiometer from spinning 360. Note, you may need to use needle nose pliers to peel off this plastic. In my case, I had already broken the collar when I was trying to get the gears out. See the video, and see what needs to happen. There also might be a metal stop like my other servo had. Your smart, just figure out how to allow the potentiometer to spin freely, but keeping it intact.

Clip #288 from AJ on Vimeo.

Finally, we need to put the potentiometer back into its original place. But first, we need to bend the leads over them selves inward, so that it won't be in our way later on. Bend the leads over, the put back in it's spot. Make sure it's sitting properly on the plastic. See pictures.

STEP 4: Chop Time

Now, we need to get rid of that mechanical stop. Using a dremel or other cutting device, just chop it off level with the gear. 

Oh, and please turn your volume down! My dremel is annoyingly loud for it's tiny size! Sorry, I didn't feel like editing any of my videos!

Clip #313 from AJ on Vimeo.


STEP 5: Putting It All Back Together

Now all we need to do is to put it back together! Put the gears back on, the tiny circuit and resistors back in, and screw it together!
The first video shows stuffing the board back in, and the second is the gears.  In the first I was at an awkward angle becuase of the camera, so I couldn't  close the case all the way. You get the Idea. 

Clip #308 from AJ on Vimeo.


Clip #315 from AJ on Vimeo.


STEP 6: Code

Here is a link to some test code. Just hook up the ground and power of the servo to the Arduino 5v and GND, then hook up the yellow or orange PWM control wire to pin 9 on Arduino. Copy and paste this code into the program, upload, and see if if works! 
I hope this helps you guys out with your servos. Check out Make Magazine's page on servos. 

74 Comments

Just me or are a heap of the videos missing on this page?

Um, hello? I am a 9 year old kid who plays with electronic stuff. I am using a BBC Micro:Bit, a Tower Pro SG90 micro servo and a AX-microBIT extension board. I do not have an Arduino. Can this method be used with the Micro:Bit too?

after all the hack, can this servo rotate with 2 directions? and how about degree rotation ? can we set that ?

thanks so much

OH yeah, I accidentially deleted my vimeo account. I'll try to make a new one here soon

Please send me the link when you re-create your account

I am looking forward to seeing your videos!

Thanks alot.

Please give me your name on vimeo after you re-uploaded the videos

thanks

do you know what is the max voltage input for the motor if i wanted to control the motor bypassing the board?
https://www.google.com/webhp?sourceid=chrome-instant&rlz=1C1CHBF_enUS712US712&ion=1&espv=2&ie=UTF-8#q=micro%20servo%20specs

I Used two 2.2K resistor and this code. It works fine for rotate in two directions. sorry my english

#include <Servo.h>

Servo myservo;

void setup() {

Serial.begin(9600);

}

void loop() {

if ( Serial.available())

{

char ch = Serial.read();

switch(ch) {

case '1': // direction 1

delay(50);

myservo.attach(9);

myservo.write(148); //you can change from 76 to 180 for change speed

break;

case '2': // direction 2

delay(50);

myservo.attach(9);

myservo.write(0); //you can change from 72 to 0 for change speed

break;

case '3': // stop

myservo.detach();

break;

}

}

now, I have to find a solution for rotate in an angle with presition

}

i have removed the collar from pot and the mechanical stopper so can i use the motor without 2.2k resistor? plz help am stuck at this thing...thank you
You need to make a voltage divider of some sorts. Use a 1k -3.3k resistor if you have to.

My SG90 had the pot directly soldered to the board, which made it difficult to remove. So I read the comments and chose to leave it in place. Instead I stripped out the keyway on the main/final/potentiometer gear by twisting it, then eyeballed mid-position on the pot and epoxied the pot wiper and shaft in place.

Testing it with the Arduino Servo:Sweep example works great. The speed then sweeps up, slows down, and reverses, and repeats endlessly.

Has anyone found a good way to control the speed? I tried setting the signal pin high and adding a delay then setting it low, but that doesn't accurately work below about a 20 millisecond delay. Thanks.

Did you try changing this? delayMicroseconds(servoPosition);
servoPosition is set at 2000, try changing that.

Thanks! That's Works!

Here's a shortcut that worked for me: only break the plastic stopper on the top most gear (as shown in Clip #313). I didn't have to remove the pot nor the black sleeve thingy. Use the following code:

#include

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

int val = 0; // variable to store the servo position

void setup()
{
Serial.begin(9600);
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}


void loop()
{
if ( Serial.available())
{
delay(1000);
char ch = Serial.read();
switch(ch) {
case '1':
myservo.attach(9);
myservo.write(180);
break;
case '2':
myservo.detach();
break;
}
}
}

by writing 180 degree position you make the servo make infinite ccw rotations and by using the detach command you make it stop!

I can't get it to rotate in the cw direction though..If anyone has a solution please let me know!
More Comments