Author Topic: servo twitch  (Read 3455 times)

0 Members and 1 Guest are viewing this topic.

Offline Carter05Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
servo twitch
« on: May 31, 2009, 10:55:51 PM »
Is it normal for a servo to twitch a lot when it's supposed to be holding a position? I'm using the Axon and using the regular servo code that comes with it. This is the code I'm using. Funny thing is when I set it to 280 it's fine and doesn't move at all and holds its position steady. But if I set it to 700 for center it twitches pretty badly. Using a Hitech HS-475HB servo unmodified.

Code: [Select]
while(1)
{

go1=280;

wheel_left(go1);
rprintf("L_wheel=%d\r\n " , go1);
delay_ms(30);
}


Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: servo twitch
« Reply #1 on: May 31, 2009, 11:08:22 PM »
adjust the value you are delaying. Certain servos like certain values of delay.

Offline Carter05Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: servo twitch
« Reply #2 on: June 01, 2009, 08:27:05 AM »
I've only tried 20ms and 30ms delay so far. I'm at work now and won't get a chance to test more delays til after then. Any other ideas as to what it might be? Seems odd that it would be ok at one position and not others. I did try another servo I had that was modified but it did the same thing. I'm not running any other code, just trying to figure out how to use a simple servo!

Offline Carter05Topic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: servo twitch
« Reply #3 on: June 01, 2009, 03:41:44 PM »
Ok I give up, I tried a boat load of different delays and they all make the stupid thing twitch like an old lady. So, would setting up PWM be a better solution to run the servo? I know this is super simple, I'm just to dumb to figure it out. Anybody have any suggestions?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: servo twitch
« Reply #4 on: June 04, 2009, 06:45:44 PM »
How many servos are you running, and is anything else attached to the Axon?

Do you have any interrupts enabled?

Are you using servo extenders?

Offline Samuel

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: servo twitch
« Reply #5 on: June 13, 2009, 10:21:18 AM »
This usually happens if you are powering the Servo from the same power as the Axon.
The EMF and so noise on the line can cause the Axon to reset.

YOur problems will be resolved if you power the Servos from a different power supply.
Of course you need a common Ground.....but use a different +5 for your Axon
than the one for your servo.

Also a low battery can do the same thing.

Samuel

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: servo twitch
« Reply #6 on: June 13, 2009, 04:48:30 PM »
This usually happens if you are powering the Servo from the same power as the Axon.
The EMF and so noise on the line can cause the Axon to reset.
YOur problems will be resolved if you power the Servos from a different power supply.
Of course you need a common Ground.....but use a different +5 for your Axon
than the one for your servo
this shouldn't happen unless he is running like 15+ servos as the axon has a giant cap on it meant to take this sort of stuff. but you are right on the low battery part of things.
Howdy

Offline zuazons

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: servo twitch
« Reply #7 on: June 23, 2009, 06:16:39 AM »
I have the same problem and I am using 3 servos only, inclusive with 1 servo occurrs the same.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: servo twitch
« Reply #8 on: June 23, 2009, 02:34:53 PM »
have you checked your battery levels?
made sure you are running on a digital port?
Howdy

 

SMF spam blocked by CleanTalk