Go Down

Topic: continuous servo refuses to rotate any other direction (Read 1 time) previous topic - next topic

AWOL

Quote
One thing though is that my servo does not share ground with the arduino, is that a big problem?

Yes.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

retrolefty

Quote
One thing though is that my servo does not share ground with the arduino, is that a big problem?


Only a problem if you want it to work, it simply won't without a common connection between the arduino ground and external voltage source negative terminal. That is unless you use an opto-isolator between the arduino output pin and the servo control input.


Lefty

tianshiz

wow that would explain it,  :smiley-red: i'll try that get back to you guys. hopefully my miswiring didn't mess up the servo

zoomkat

Quote
One thing though is that my servo does not share ground with the arduino, is that a big problem?


Yes, the servo won't work properly without the common ground. You may also cause damage to the servo without the proper ground. I've found that without the ground, the small servos will get very hot. As to the wiring order on the servo connector, the +v connector (usually red/orange) is normally the center connector. This prevents possible servo damage if the connector is incorrectly plugged into servo receiver.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

tianshiz

#19
Sep 03, 2011, 04:12 am Last Edit: Sep 03, 2011, 04:15 am by tianshiz Reason: 1
connecting the ground worked, but after testing a little bit while, the strangest thing happened, everything just stopped working again. I can hear a low hum from the servo, but that's it.

here's my code:
Code: [Select]
#include <Servo.h>
const int servoPin =  3;    // control pin for servo motor
Servo myservo;
int angle = 90;

void setup()
{
 myservo.attach(servoPin);
 myservo.write(angle);
 Serial.begin(115200);

}

void loop()
{
 if (Serial.available() > 0) {
   int moveServo = Serial.read();
  //1-0,2-30,3-60,4-90,5-120,6-150,7-180
   if (moveServo == '1') {
    angle =0;
   }
   if (moveServo == '2') {  
    angle =30;
  }
   if (moveServo == '3') {  
    angle =60;
   }
    if (moveServo == '4') {  
    angle =94;
   }
    if (moveServo == '5') {  
    angle =120;
   }
    if (moveServo == '6') {  
    angle =150;
   }
    if (moveServo == '7') {  
    angle =180;
   }

   


   Serial.print("Angle: ");
   Serial.print(angle);

   myservo.write(angle);
 }
}


I checked the power src for the servo, and its still 5v no problems, and the connections all seem fine...

Grumpy_Mike

Sounds to me like a bad connection or a burnt out servo.

tianshiz

just got some new servos, hopefully it works out this time. Just to make sure I did a rough sketch of my setup, does there seem to be any problems? I don't want to burn another servo again... the code I'm using is the one in my previous post. Thanks!

Go Up