Loading...
Pages: 1 [2]   Go Down
Author Topic: continuous servo refuses to rotate any other direction  (Read 878 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 138
Posts: 19067
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.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 279
Posts: 15314
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: 50
Posts: 6553
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

Why I like my 2005 rio yellow Honda S2000 with the top down, and more!
GOOGLE ADVANCED FORUM SEARCH BELOW!  
Go to:  http://www.google.com/advanced_search?hl=en
put in key search words,
use site or domain:  http://arduino.cc/forum
or in a google search box put key words site:http://arduino.cc/forum

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)
Online Online
Brattain Member
*****
Karma: 277
Posts: 25522
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
Print
 
Jump to: