Servo not reaching full travel


Closed Thread
Results 1 to 40 of 40

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Hi Jumper,

    Fist of all thanks for your help

    I had some issues with your code but i got the idea ( nice one by the way )

    The problem is that even so the servo just moves a total of 90º

    I've googled a bit and for futaba servos they state that you need :

    center : 1,5ms
    0º : 1ms
    120º : 2ms
    30º : 1.16ms

    ( stop time can vary from ~15ms to 30 ms - not critical )

    I'm not being able to apply this to my servos

    Even with a simple pauseus 1000 ( that should be 1ms and the servo should center ) this does not happen

    .

  2. #2
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Try again

    Do you have more servos? Try a different one since the one you are using might be bad.

    If you connect the servo to a normal RC receiver what result do you get then?


    /me

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ruijc View Post
    center : 1,5ms
    0º : 1ms
    120º : 2ms
    30º : 1.16ms
    Even with a simple pauseus 1000 ( that should be 1ms and the servo should center ) this does not happen
    .
    It looks to me like you might be confusing a couple of the values you stated above.
    From what I'm seeing, you want 1000 to be center and work around that. That's all fine and dandy, but you want the rest of the program to work around it also, which it isn't doing.
    Instead of thinking about it in terms of 0, 90, 120, whatever degrees, think of it in terms of -90 , 0 , +90, etc. degrees, where 0 is center.

    Using your original code...with a few changes...

    Code:
    '.....set up your ports, adcon, cmcon, whatever else is required...
    
    leftend = 1000
    center = 1500
    rightend = 2000
    stepval = 50
    pos = center
    
    moveleft:
    pause 19 'pause 19ms
    if pos > leftend then
    pos = pos - stepval
    else
    goto moveright
    endif
    servo = 1 : pauseus pos : servo = 0 : goto moveleft
    
    Moveright:
    pause 19 'pause 19ms
    if pos < rightend then
    pos = pos + stepval
    else
    goto moveleft
    endif
    servo = 1 : pauseus pos : servo = 0 : goto moveright
    
    end
    And with that code, when pos = 1500, the servo should be centered. pos decreases to leftend, servo moves left, pos gets to leftend, jumps to other loop, pos increases to rightend, servo moves right, pos gets to rightend, jumps to other loop, and over and over.
    Change the value of stepval to change how fast the servo moves back and forth. Simple enough.
    But if it really doesn't work, and your ports are set up correctly, you've got the right config fuses set, etc.etc., then, as Jumper said, it sounds to me like a goofy servo. What kind of Futaba servo are you using? A standard S148 or what?

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Jumper, skimask,

    i did some more digging but all returning to the same thing...

    I tryed skimask's code and the servo uses no more same travel than before.

    I'm using a Futaba's S3152 which is a good servom ( IMO ) ...and so i left the "bad servo" mark to the end.

    I tryed it with a receiver and same thing.

    I'm guessing the servo is really goofy.

    .

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ruijc View Post
    Jumper, skimask,
    i did some more digging but all returning to the same thing...
    I tryed skimask's code and the servo uses no more same travel than before.
    I'm using a Futaba's S3152 which is a good servom ( IMO ) ...and so i left the "bad servo" mark to the end.
    I tryed it with a receiver and same thing.
    I'm guessing the servo is really goofy.
    .
    Does it move equal distances to the 'left' and 'right' as measured from 'center'? Or is one more than the other? What happens if you change 'leftend' to 500 and 'rightend' to 2500? Does it bind at one end or the other?
    Are you sure you're PIC is running at the same oscillator speed as you have DEFINE'd?

    I haven't done any checking lately, but, is a Futaba S3152 a 'standard' servo? Is it one of the new digital servo's? I don't have any of those, I haven't played with them, so I don't know about their operational characteristics. I'd ASSUME they would operate the same if they're backwards compatible, but I could be wrong...

  6. #6
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default hmmm

    http://www.futaba-rc.com/servos/digitalservos.pdf

    the s3152 is a digital servo but as the link sais... it is more or less the same thing. No special codeing and other stuff. Have you torn it apart and had a look at the feedback potentiometer. That pot is the one that feedbacks the position of the servo-horn to the MCU inside the servo (since it is a digital servo).

    Did you try with some other servo yet?

    /me

  7. #7


    Did you find this post helpful? Yes | No

    Default Digital servo tricks and traps

    1. Centre adjustment.
    In most better class servos there is a centre adjustment. To access this, take the servo horn off and use a very small flat blade screwdriver to tweak the potentiometer at the bottom of the servo horn screw mount. This allows you to make an electrical zero adjustment instead of the normal linkage length adjustment.

    2. Digital servos will self destruct if driven against their internal stops.
    Analog servos are fairly benign when driven past their normal stops. They will stall and draw a few hundred milliamps which is tolerable for a few tens of seconds. A digital servo however draws several amps when moving to the command position and if up against the stops the servo motor will get so hot it melts the plastic coil former used in the coreless motor in seconds. Been there, done that - costs hundreds of dollars when the code in a UAV gets it wrong at power up and burns out aileron and flap servos.

    3. Left Right rotation limits.
    1.5 mSecs seems to be the universal centre position. 1 mSec is guaranteed to work for one direction and 2 mSec for the other direction with all brands and types of servos. Outside the 1 and 2 mSec limits you are on your own - it might work with brand/type A but not necessarily with brand/type B. There is NO agreement on normal rotation angles - even within one manufacturer. Servos can have +/- 45, +/- 60 and +/- 90 degrees as their internal design limits. Attempting to push a servo past that will shag the servo quick smart.

    4. PulsOut is a toggle.
    If your code uses the pulsout command to drive the servo make certain you preset the state of the servo drive pin before calling the pulsout command. This command is a toggle and merely sets the pin to the opposite state for the command period. You might be expecting the pin to be low and go high for the pulsout period but real world interference can trip you up and give you the opposite effect. Been there - done that.

    Use
    Low ServoPin
    Pulsout ServoPin, 150 'etc

    HTH
    Brian

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Hi all,

    skimask,

    i'm not really sure if the servo moves equally to both sides because it will depend on where the center is.
    In my program the center is at pos = 700

    The servo never came to the point of hitting it's internal stops and "keeping the motor running" ( if you know what i mean )

    I can increase the pos value but the servo stops when reaching pos +- 1300.

    I think that the minimum value could be the key here...i mean...the min value is 25...can i go lower than this ( minus ) ???

    Jumper,

    I did not opened the servo yet.

    BrianT,

    My servos do not have the center adjustment screw. Were did you see this ? I have never seen this in any of my servos ( hitec, futaba, digital/analog ).

    About the pulsout method...i tryed once that but for some reason it didnt worked as well as my code above...will try it again though

    .

Similar Threads

  1. More Servo Woes
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 13th May 2009, 09:40
  2. Problem with 12F629, servo and EEPROM
    By Atom058 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 1st March 2008, 10:53
  3. Servo does not move
    By ruijc in forum General
    Replies: 12
    Last Post: - 12th November 2007, 20:14
  4. Beginner + Servo
    By james in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st July 2007, 22:31
  5. Help with Servo Control Please!
    By wireman22 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th June 2007, 19:15

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts