Pages: [1] 2   Go Down
Author Topic: Help me for my Continuous rotation servo??  (Read 3865 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello guys. excuse me for the bad english but I really need your help for my servo

the servo type is SM-S4303R, but when I used the example code and the standerd wiring  connection it doesn't work.

it just make 'zzzzzz' sound so I don't understand what happend

can any one explane why this sound come from the servo ???
is it the power issue or the servo it self was broken from the bingeing???
Logged

0
Offline Offline
Tesla Member
***
Karma: 114
Posts: 8899
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some test code you can try. Powering a servo from the arduino can cause problems. Also, the servo power supply ground and the arduino ground must be connected.

Code:
// 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() {
  Serial.begin(9600);
  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.println(n);
      myservo.writeMicroseconds(n);
    }
    else
    {   
      Serial.print("writing Angle: ");
      Serial.println(n);
      myservo.write(n);
    }

    readString=""; //empty for next input
  }
}

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: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello. thanks for your feedback but the problem still on.

I have try to connect the servo on external power supply(battery) and the zzzz sound still come from the servo although the both Arduino
and servo on the common ground.

any other options ??? because I think that the servo need to be change, so I will go tomorrow to the store for change it.     
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I connected a standard servo and a continuous rotation servo to my Arduino Uno last week - worked great.

Maybe I can help you resolve the problem . . .

http://s103.photobucket.com/albums/m157/ShermanPeabody/Robotics/?action=view&current=bwstandardcontinuousrotationservosviaArduino-Desktop.mp4
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, thank you Shredder but I did the same thing and it didn't work. so I think maybe the usb can't power the Arduino enough, is it Possible that if I power it with 9v battery will work???

Because if didn't thats mean that the Arduino have problem and need to be changed.
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, thank you Shredder but I did the same thing and it didn't work. so I think maybe the usb can't power the Arduino enough, is it Possible that if I power it with 9v battery will work???
The USB is fine for powering the Arduino board, but not the servo because it can't provide enough current for both.  You will need either a separate AC adaptor or a battery dedicated to powering the servo just as zoomkat suggested earlier.

A 9V battery is not a good idea for two reasons.  First, and most importantly, servos aren't just electrical motors they have integrated electronic controls that are built to tolerate a certain voltage level.  Exceeding that voltage level by too much can damage the electronics.  Second, 9V don't have a lot of charge capacity, even when compared to other common sizes like AA and AAA.  All the "Latin letter" sized alkaline batteries (AAA, AA, C, & D) are nominally 1.5 VDC so you can connect them serially to get higher voltages.  In fact you should be able to find cases for 4 AAA or AA batteries wired this way fairly easily.

Because if didn't thats mean that the Arduino have problem and need to be changed.
I truly doubt it's a problem with your Arduino.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 50
Posts: 1764
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

All the "Latin letter" sized alkaline batteries (AAA, AA, C, & D) are nominally 1.5 VDC so you can connect them serially to get higher voltages.  In fact you should be able to find cases for 4 AAA or AA batteries wired this way fairly easily.
Note, rechargeable Nimh batteries are 1.2 volts, not 1.5 volts.  Also alkalines start out at 1.5 volts, but they do drop voltage as the battery gets depleted.
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also alkalines start out at 1.5 volts, but they do drop voltage as the battery gets depleted.
Well that was implied by the term "nominally", but I probably should have explained that...
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 I did what zoomkat said and I used 4*AA Batteries and I connect the signal to pin9 and the batteries to red wire (servo) and the both servo ground and Arduino ground are connected to the batteries ground (common ground), But it keeps making the sound zzzz.

Note: if I remove the signal wire the sound stops.

So, Does the Arduino have issue ???   
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you currently have a load, other than the servo horn, that the servo is trying to move, or is the servo unloaded?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No its not loaded and not moving just make the zzzz sound
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, whats the deferent between the ground next to pin13 and the ground next to 5v???
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, whats the deferent between the ground next to pin13 and the ground next to 5v???
Why, did it work correctly on one and not on the other?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
Iam just biginer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, Iam just asking  smiley .

Ok, did any one now why did the servo didn't move although the code and connection are correct and the servo is unloaded??

I was doubtful that the Arduino it self has a problem in the input / Output.

So, I can't prof that until I can go back to the store and check the both with the engineer their.

See you     
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, Iam just asking  smiley .
Good, because if everything was functional correctly there really shouldn't be a difference.  There's more than one GND pin for two reasons, first to increase the total current that can be sunk through the board's power supply and second to make bundling wires easier (because there are grounds on both sides that have rows of pins).
Logged

Pages: [1] 2   Go Up
Jump to: