Author Topic: servo with "parkinson"  (Read 2355 times)

0 Members and 1 Guest are viewing this topic.

Offline nanotechopolis_grTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 1
servo with "parkinson"
« on: June 18, 2013, 04:21:24 AM »
hi guys !  i built a robotic arm and at all it seems to be ok but the servo that rotates the whole system suffers from parkinson , you know what i mean when it stop rotating actually is going a lil bit rigth and left!   the problem has to do with the servo or with my code? i have conected it to a digital and analogue exit but nothing happens!  the servo is tower pro sg5010 ! 
"On the 29th of May, the last day of the siege, our Lord God decided, to the sorrow of the Greeks, that He was willing for the city to fall on this day into the hands of Mahomet Bey the Turk son of Mu

Offline Pogertt

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 3
  • Pogertt
Re: servo with "parkinson"
« Reply #1 on: June 18, 2013, 09:37:42 AM »
Smells like the command pulse may be jittering a bit.
Do you have access to an oscilloscope to watch it?

Are you using http://www.arduino.cc/en/Reference/Servo or did you write your own code?
Mmmmmmmm....Cookies

Offline nanotechopolis_grTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 1
Re: servo with "parkinson"
« Reply #2 on: June 18, 2013, 10:17:21 AM »
thanks for replying   :D  !! no i havent access!

the code isnt  100% by me , only changed some parameters!
i have to mention that the servo is cheap , also i have and a spring servo but everything works ok!
the bad thing is that the" parkinson" servo its difficult to replace it ! what do you suggest?
(sorry for my english )


int servoPin     =  2;   
int minPulse     =  600; 
int maxPulse     =  2400;
int turnRate     =  100;
int refreshTime  =  20;   


int centerServo;       
int pulseWidth;         
int moveServo;           
long lastPulse   = 0;   


void setup() {
  pinMode(servoPin, OUTPUT); 
  centerServo = maxPulse - ((maxPulse - minPulse)/2);
  pulseWidth = centerServo;   
  Serial.begin(9600);
  Serial.println("      Arduino Serial Servo Control");
  Serial.println("Press < or > to move, spacebar to center");
  Serial.println();
}

void loop() {
 
  if (Serial.available() > 0) {
   
    moveServo = Serial.read();

    if (moveServo == 44) { pulseWidth = pulseWidth - turnRate; }
    if (moveServo == 46) { pulseWidth = pulseWidth + turnRate; }
    if (moveServo == 32) { pulseWidth = centerServo; }

   
    if (pulseWidth > maxPulse) { pulseWidth = maxPulse; }
    if (pulseWidth < minPulse) { pulseWidth = minPulse; }

   
  }

  if (millis() - lastPulse >= refreshTime) {
    digitalWrite(servoPin, HIGH);   
    delayMicroseconds(pulseWidth);
    digitalWrite(servoPin, LOW);   
    lastPulse = millis();         
  }
}
"On the 29th of May, the last day of the siege, our Lord God decided, to the sorrow of the Greeks, that He was willing for the city to fall on this day into the hands of Mahomet Bey the Turk son of Mu

Offline olivthill

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 0
Re: servo with "parkinson"
« Reply #3 on: June 18, 2013, 04:54:17 PM »
...   
int minPulse     =  600; 
int maxPulse     =  2400;
...
I thought that servos were designed to work in the range 1000-2000, with a margin allowing a wider range, such as 900-2100, or a little more. But 600-2400 looks too much. But, maybe the problem is elsewhere.

I have experienced a problem like that with a small servo. It was shaking when with some pulses, and not shaking with other pulses. Besides, when the servo was shaking, I was able to make it stand still with a little push of my hand. The problem was due to a weak servo, because, when I replaced it with another one, the problem did not occur again.


Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: servo with "parkinson"
« Reply #4 on: June 18, 2013, 06:37:56 PM »
Moving servos may draw a lot of power. How strong is your battery or power source? It may be that, while it's moving, the voltage drops because the power source is not sufficient, and that causes the controller or servos to drop out.

Offline nanotechopolis_grTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 1
Re: servo with "parkinson"
« Reply #5 on: June 20, 2013, 06:04:51 AM »
i use 9v battery! maybe the servo is weak , 4.5kg/cm @6volt  maybe has been damaged or something else? but its difficult to replace it!
"On the 29th of May, the last day of the siege, our Lord God decided, to the sorrow of the Greeks, that He was willing for the city to fall on this day into the hands of Mahomet Bey the Turk son of Mu

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: servo with "parkinson"
« Reply #6 on: June 20, 2013, 06:15:42 AM »
If it's 9V battery similar to one in the image - they are known for not having much juice. It is a lot better to have 6 regular 1.5V batteries connected in series.



Here's an article for You --> Understanding battery capacity: Ah is not A

And here's short fragment from the article above:
Quote
9V alkaline batteries can be convenient for their high voltage in a small size, but the energy density (watt-hours per given volume or weight) is the same as other batteries with the same chemistry, which means the capacity in amp-hours is low. In approximately the same size as an AA cell, you get six times the voltage, so you also get about six times less in the Ah rating, or about 500 mAh. Given the high losses incurred from discharging in anything under a few hours, 9V batteries are impractical for most motors and therefore for most robots.
« Last Edit: June 21, 2013, 12:38:58 AM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline nanotechopolis_grTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 1
Re: servo with "parkinson"
« Reply #7 on: June 20, 2013, 03:27:24 PM »
problem solved! thanks you guys! finaly i fixed the pulse range and bought AA batteries and a hold keeper! i know that 9v bats arent good power supply but i didnt expected that!

thanks again!
"On the 29th of May, the last day of the siege, our Lord God decided, to the sorrow of the Greeks, that He was willing for the city to fall on this day into the hands of Mahomet Bey the Turk son of Mu

 


Get Your Ad Here