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
<p>Thanks! That's Works!</p>
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: <br> <br>#include <br> <br>Servo myservo; // create servo object to control a servo <br> // a maximum of eight servo objects can be created <br> <br>int val = 0; // variable to store the servo position <br> <br>void setup() <br>{ <br> Serial.begin(9600); <br> myservo.attach(9); // attaches the servo on pin 9 to the servo object <br>} <br> <br> <br>void loop() <br>{ <br> if ( Serial.available()) <br> { <br> delay(1000); <br> char ch = Serial.read(); <br> switch(ch) { <br> case '1': <br> myservo.attach(9); <br> myservo.write(180); <br> break; <br> case '2': <br> myservo.detach(); <br> break; <br>} <br>} <br>} <br> <br>by writing 180 degree position you make the servo make infinite ccw rotations and by using the detach command you make it stop! <br> <br>I can't get it to rotate in the cw direction though..If anyone has a solution please let me know!
<p>I like it!</p>
<p>I modified servo before 6 months ,possible i used 2.2 resistance , i am not sure. </p><p>On my servo it is a succes. </p><p>Try this :</p><p>#include &lt;Servo.h&gt;<br><br>Servo myservo;<br>int val = 0;<br><br>void setup()<br>{<br>myservo.attach(9);<br>}<br><br>void loop()<br>{<br>myservo.attach(9);<br>for(val = 0; val &lt; 60; val += 1)<br>{<br>myservo.write(45);<br>delayMicroseconds(1100);<br><br>}<br>myservo.detach();<br>delay(1000);<br>}</p><p>1 .Now i have clockwise 45 degrees ABOUT <br>If i chance myservo.writte(148) i have 45 degrees anticlockwise. </p><p>2 .if i change myservo.write(90) and delayMicroseconds(900) i have step 20 degrees.</p><p> 3.if i change myservo.write(95) and delayMicroseconds(900) i have step 11.25 degrees </p><p>4 PLAY with value myservo.write(X) and delayMicroseconds(Y) to find the correct degree you need to your servo. </p><p>I put after myservo.detach() , delay(1000) to count the steps .</p><p>ZERO in my servo is 102-103 . after that value start anticlockwise.</p><p> GOOD LUCK</p><br>
<p>need same solutions here.</p>
<p>Hey! I just did this in 20 minutes. It works well. Here's code to make it turn in one direction or the other. Can be uploaded directly.</p><p>#include &lt;Servo.h&gt; <br>Servo myservo;<br>void setup() <br>{ <br> myservo.attach(9); <br> myservo.write(0); //this goes backwards</p><p>//or do &quot;myservo.write(180);&quot; to go forwards<br>} <br>void loop() {}</p>
<p>Hey! Do you know also how to stop the motor for a couple seconds and then continue with turning.</p>
<p>Oh... You probably want to power this from something else than usb power!</p><p>I think my ch340 on board chip couldn't handle the current draw and it died.but i can probably still program that same arduino using a cp2102. </p>
<p>I used 1kOhm resistors and it works. How can I make it turn continuously for only 1000msec? I think the original had only ~180 degrees of rotation. So it wasn't possible to turn it for 270 degrees. I suppose doing the hack it isn't possible to rotate for 800 degrees exactly, right? (unless I measure the msec)</p>
<p>The solution was easy:</p><p>myservo.attach(9); </p><p>myservo.write(0); </p><p>delay(1000);</p><p>myservo.detach(); </p><p>:D</p>
<p>help, how can i run it on reverse. using your test code?</p><p>im using the test code to open my sliding door.</p><p>now, i need to run it in reverse to close it.</p>
Just try changing servoPosition to something else! I don't know I've never actually tried it.
<p>Hello,</p><p>I have the same servo and I want it to spin 360 degrees. I just didnt understand collar part of it. Where did you take it from? Can you explain it a little bit more in details please. I have to finish my robot for a contest in my school.</p>
I'm not really sure what's the problem. I even made a video showing exactly where the collar is and taking it off.<br><br>http://vimeo.com/58424222
<p>ıs it a must step? I mean what if I just skip this part because I saw some other videos in the web and the only thing they do is soldering the resistors to the pcb and cutting the mechanical stop on the gear.</p><p> Here is a video: <iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/Ps9o-dNj04U" width="500"></iframe></p>
<p>Their pots may not have the ring. On mine it had a ring that stopped the gears from spinning around. If you don't have it then don't worry about it. If you do then just do what i said.</p>
<p>so ı should look at the potentiometer for that ring right?</p>
<p>And one last thing ı have 2k resistors. Will those ones work for that</p>
<p>Yeah you should be fine with two 2K resistors.</p>
<p>thank you ver much</p>
Hope that helps
<p>Nice! Quick hack, worked with my FS90 micro. There was no removable collar to limit the pot, so I just cut it. Thank you!!</p><p>Your videos and pictures was very helpful. I'll probably be using this guide several more times!</p>
Awesome! I'm really glad you liked it!
<p>I must commend your efforts sir, for this is by far the best tutorial on the subject I have been able to find. The majority of alternatives just remove the internal board as a whole, rendering their efforts useless to me as my project requires that the ability to control the speed [via PWM] remain intact. To summarize, thank you.</p>
Thank you I'm so glad I could be of help to you. Good luck with your project!
<p>I'm new in electronics, but this two resistors on pictures are 22 ohm, not 2,2k? Am I wrong?</p>
<p>2.2k ohm resistor is 2,200 ohms!! 22&Omega; wont work!</p>
<p>Hi, great video thanks helped me a lot, I jwanted to share a tip for those of you that does not have a dremel, you can use the soldering pencil to get rid of the mechanical stop, it works perfect.</p>
Does this hack still allow the control of direction from the code?
actually it works! you can change the direction of rotation, speed and even stop it using arduino. Just tried it. <br> <br>thanks for the instructable, the two resistors method works like a charm. <br> <br>
Oh sorry I misunderstood you I thought you were asking if you could use it like a regular servo- my bad. It can't position itself because the potentiometer is gone. <br><br>Really? I've never really got into the code part for that would you mind sharing your code with me?<br><br>Thanks!
hey no problem, I figured you misunderstood my question. The code is very simple, All you need to know is that the servo accepts values from 0 to 180 and that at 90 it won't move and the farther you move from 90 in either direction it will go faster in that direction. It makes sense since it's trying to catch up with the potentiometer that's not working anymore. <br> <br>Check out this example, they use a potentiometer but you can just manually or dynamically assign different values too. <br> <br>http://arduino.cc/en/Tutorial/Knob
Haha ok thanks I haven't used a servo in an Arduino project for almost a year now so I'm a bit rusty :D. <br> <br>Thanks! <br> <br>Happy Hacking!
xD i sugest u to try to get some smd components the resistors are veeeeeeeeeeeery cheap :P i buy a &quot;kit&quot; 100 of all values from 0 to 100kohm 25$ us dolars they are like 5k resistors :P
Okay, once I get some money :D
nice work but i can suggest u to use SMD resistors :P i do the same to a copy of this servo and i add a second pivot and almost i can t close it :P with smd resistors (1208) that part would be tiny :P
Yeah, that is a good idea, the only problem is I don't have any SMD anything!
The whole point of a servo is that the unit knows its position precisely. The 5k pot was the sensing device that tells the arduino how far the motor has spun thats why there's three wires (power ground and signal). By removing it pot from the equation its now just a little motor in a gearbox. The 'servo' now has no clue what its angular position is. Idk how cheap these things are, but I wouldn't recommend running this hack unless you're really in a pinch. You can't use the servo library with this.
Well the whole point of this instructable is to have a strong motor that spins endlessly. Yeah, the servo library doesn't work, but, that not what it's for. What this whole thing is for is like for driving the wheels of a smaller robot. Just look around, and you will see tons of smaller-sized robots that use these hacked servos for a drive motor. All the built-in gears eliminates the need for having to buy a extra gearbox. The servo when spinning endlessly makes for a pretty strong drive motor.
Actually, the servo library does still work.. The arduino based robot I made awhile back, used the stock servo library, and controlled 3 servos. (assigned as servo1, servo2, and servo3 off pins 8, 9, &amp; 10. then simply attaching them as servos.. You can then control them as percentages of how fast you want them to spin, in each direction.. ( map(val, -100, 100, 0, 179) for -100% (full backward) to 100% (Full forward) ).. <br>
Well, thanks! I don't even know what the servo library is =). And yes, I didn't use the percentages when I was testing this.
For those not familiar, look under File -&gt; Examples -&gt; Servo -&gt; Knob .. the code would be similar to this example, but assigning the -100 to 100 mapping to the full backward (0) to full stop (89) to full forward. (179).. Now, granted, -100 to +100, is a pretty wide range. Usually steps of 10 each direction is reasonable. as long as 0 means stop..<br>The raw code of the servo library (the included Servo.h), does about the same, mapping the 0 to 179 to the ###-Hz pulse out to the servo. (If you've ever tinkered with the Parallax Basic Stamp, their code directly pulses the driving pin from the MCU out to the servo at the exact #-Hz)..<br><br>I've converted Futaba S3004's to continuous rotation, because the cheaper Futba servos Parallax uses for their BOE-Bot, had managed to wear out the motor (the Electric motor inside) bearings. Nothing makes you cringe worse, than hearing a servo motor sqealing. ARGH!<br>
<strong>&nbsp;</strong><br> Further to what Electricloser says, this method has the advantage that you can control the speed of the motor by using the standard servo control signal.&nbsp; Mid-point (nominally 150) is stationary.&nbsp; Less than that and the servo will drive in one direction; greater than that it will turn in the other.&nbsp;<br> The greater the difference between the control signal and the mid-point value, the faster the motor will run because of the acceleration gradient set by the control circuitry.<br> Different manufacturers / models will give a differing number of speed steps and from my experience, digital servos give a greater number than analogue ones.&nbsp; (The best I've had was about 15 each way.)<br> I'm not familiar with the Arduino servo library but as long as you can set the pulse-width from it, you can control the speed of servos modified in this way.
I've done similar with Futaba S3004's, but simple scraping down the travel stop, and feeding the POT shaft out through the side of the case for trimming. (and &quot;Z&quot;-bending the connections, so it would sit at that new position.) Though, the simple &quot;T&quot;-bridge with fixed resistors works, it's still good to have a little trim capability..
I've found an alternative way of doing the pot mod is for this type of servo is to drill out the final drive gear so it spins freely on the shaft and then epoxy the pot travel at half way. This is sometimes a better way for small servos where getting the resistors in is problematical.
Ok, so your saying not to change the resistor at all? Just turn it all the way to 5K then epoxy?
<strong>&nbsp;</strong><br> Yep - I used a homebrew servo tester set at 1.5ms and tweaked the pot to mid way until the motor was stationary, then added a small drop of epoxy left and right of the slider contact point.&nbsp;<br> <br> I came up with the idea after failing to fit resistors into a TowerPro 5g servo.&nbsp;<br> Some types are amenable to rounding out the final drive gear hole, some aren't.
Yeah it seems like every servo I get is just a little different from the next. Homemade Servo Tester? Have an instructable on it I can see?
My servo tester is an incredibly little useful piece of kit which I <strong>really am</strong> going to have to make into an Instructable. It's based on a little development unit I made up for the Picaxe 08m microcontroller.<br> <br> It's got potentiometer and push button switch on the inputs, LED, beeper and 3-pin servo connector on the outputs.&nbsp; One mode allows you to set max and min endpoints for the servo travel and then sweeps between them to let you see servo speed.&nbsp; The other mode gives 20 steps each side of the midpoint to test response of modified servos.

About This Instructable


197 favorites


Bio: ¿Qué tal? I'm 16 and enjoy learning about electronics. I am self-taught. I love programming my Arduino and soldering circuits. My newest hobby is ... More »
More by FoamboardRC: Control Your RC Plane With Your Phone's Acclerometer DIY Receiver Controlled Switch (Cheap and Easy) Complete Guide to Building Your First RC Foamboard Plane
Add instructable to: