Pages: 1 [2]   Go Down
Author Topic: continuous servo refuses to rotate any other direction  (Read 1748 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26488
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"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.

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9682
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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...
« Last Edit: September 02, 2011, 09:15:28 pm by tianshiz » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34532
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Pages: 1 [2]   Go Up
Jump to: