Go Down

Topic: Arduino UNO plus Adafruit motor shield to run modified servo or DC (Read 3299 times) previous topic - next topic


Hi everyone. Please help!
I am very new with Arduino and my first goal is to make two little modified servo motors work to be the wheels of my first robot. I modified them so now they can rotate 360 degrees. But when I connect them in the servo pins of the Adafruit motor shield, they still work as normal servos. Can someone please tell me if I should connect them in a different place and give me an easy code to download and make them run as if the where little DC motors? Thanks.


It sounds like you have not modified your servos correctly to allow continuous movement.


As you can read on the adafruit site: "The adafruit motorshield just connects through the servo" So you do not need the shield.
However the connectors are very convenient  :)
On your problem I agree with Grumpy: "You probably did not correctly modify your servo's"

Best regards
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -


Thank you guys for the quick response. As far as I know I modified the servos well. After doing it now I am able to get a full turn with my hand. The main thing is that I don´t know if the modified servos should still be connected to the same connector (Serv 1 o Serv 2) in the Adafruit shield  and the fact that I don´t have any code to simulate simple wheels movement so I can see if they can do the job. If you have any code please let me know.


Modifying a servo for continuous rotation involves some electronic changes. Once done if you tell the servo to go to a position it will rotate continuously. The fact that it continues to act like a servo means you have not modified it correctly.


It does look like you just removed the end-stops. You have to do something to the pot too, or replace it with fixed resistors, I believe.


Maybe you can point us to the instructions you have used to mod the servo?
Best regards
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -


Hi! I just modified the gearbox to allow continuous rotation but I didn´t touch the electronic thing. So as you all say I didn´t finish the job. The site I used as a reference was:


Now I found this site and they are showing how to modify a microservo very similar to the one I have:


I will have a try and see if I can get the full turn following their instructions. Otherwise, any other info you may send me on this subjet will help me a lot!

Please can someone tell me if the modified servos should still be connected to the Serv 1 o Serv 2 jumpers in the Adafruit? Is there any simple code you can give me for modified servos to act as robot wheels? Thanks to you all!!!


Yes, you still attach them in the same way.

When modified correctly, there will be a value, around 90 degrees, where the servo will be stopped. Setting to 0 degrees will be full speed in one direction and 180 degrees will be full speed in the other direction.


The servo pot also has to be disconnected from the motor gearing along with removing the gearing stop. Below is how I made some continious rotation servos. You do not need a motor shield on the arduino with the continous rotation servos. Bottom is some servo code you can use to test your servo.


Code: [Select]

// zoomkat 10-22-11 serial servo test
// type servo position 0 to 180 in serial monitor
// or 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() {
  myservo.writeMicroseconds(1500); //set initial servo position if desired
  myservo.attach(7);  //the pin for the servo control
  Serial.println("servo-test-22-dual-input"); // 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);  //slow looping to 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();  //convert readString into a number

    // auto select appropriate value, copied from someone elses code.
    if(n >= 500)
      Serial.print("writing Microseconds: ");
      Serial.print("writing Angle: ");

    readString=""; //empty for next input

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


You do not need a motor shield of any sort to run a servo.


    While it is completely correct to say that you do not need a shield to drive servos, you will almost certainly need separate power, see the links in my signature for the reasons why, a demonstration why and a very simple solution using an additional 4 AA batteries.

Duane B

Read this
then watch this



Hi guys,

When I posted my question I could never have imagined that I would get this kind of feedback. I am just amazed!

Now I know that I don´t need a shield for the servos, I have good guidance on how to work on the electronics to make them run as DCs, and I also have the code and info on how to power the servo without the shield. What else could I ask?

This weekend I will have a go on the electronics and see if I can get it done propertly. Not very optimistic though as for the time being all the electronic work looks scary to me. Buy I am sure that sooner or later I will get there with your help. When I finally have the servos up and running I will let you know. Thanks a lot to you all!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131