1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics servo jitter/shaking problem

Discussion in 'Modding' started by const_, 13 Dec 2008.

  1. const_

    const_ What's a Dremel?

    Joined:
    15 Nov 2005
    Posts:
    121
    Likes Received:
    1
    hi everybody

    i have this problem i couldnt tackle, i am building a mini robotic arm it has 3 servos
    to do 3 DOF.

    one is futaba, one is JR, the other is Hitec

    they are controlled by a 18f4550 chip that receives commands (servo delay time) via usb. i send 3 bytes 0-255 down usb through HID interface, the controller gets the bytes multiplies each by 10 to convert it to microseconds .

    for ex: i send 150 the controller makes it 1500 and use it like this:

    output_high(SERVO_1);
    delay_us((int16)(usb_buffer[0] * 10));
    output_low(SERVO_1);
    ..
    same thing done to servo 2,3
    ..
    while(t != 0)
    {
    usb_task();
    }
    t = 1;

    repeat...

    variable t is a volatile int that is changed by timer 1, overflowes every 20000.012 us.

    the problem is that 2 of the servos shake to an unacceptable level. i checked the timing with the PICKIT2 and its within specification (as far as i know) pulse width off by max 10us, refresh rate is 20.01mS dead on every time.
    (checked the timing at the pins which the servo female headers mounts)

    i tried to remove the delay between pulses, measured the distance between pulses its ~5.6 - 5.9 ms apart, it works but not every time.

    the problem shouldnt be because of the power supply cause its a standard bench-top PS found in many labs.

    please help i dont know what do to now... :confused:

    thanks for you time..
     
  2. const_

    const_ What's a Dremel?

    Joined:
    15 Nov 2005
    Posts:
    121
    Likes Received:
    1
    problem solved !!!!

    the circuit board that the servos connects to didnt have a common ground with the PIC18F4550 controller board. can you belive that ! :duh:

    i am almost graduating with a degree in ECE and have good background in circuits and computers and still make silly mistakes that leaves me taring my hair for a while :wallbash: so dont feel bad the next time you make a mistake.

    case closed, over and out...
     
    mvagusta likes this.
  3. mvagusta

    mvagusta Did a skid that went for two weeks.

    Joined:
    24 Dec 2006
    Posts:
    4,639
    Likes Received:
    523
    Thanks for sharing the solution :thumb:
     
  4. ConKbot of Doom

    ConKbot of Doom Minimodder

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    Ive made the exact same mistake, with a 16F819 (I believe) and some hobby servo that I was testing. I was powering the servo from my power supply and the ICD2 was powering the chip. Same symptoms as you too...
     
  5. AJB2K3

    AJB2K3 What's a Dremel?

    Joined:
    12 Dec 2005
    Posts:
    1,605
    Likes Received:
    4
    Thanks for sharing the fix as I would of said that it was because you were using 3 different servos.

    Thanks I'll add that to my memory for futuba reference (I mean future)
     

Share This Page