Servo not reaching full travel


Closed Thread
Results 1 to 40 of 40

Hybrid View

  1. #1
    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?

  2. #2


    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.

    .

  3. #3
    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...

  4. #4
    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

  5. #5


    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

  6. #6


    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

    .

  7. #7


    Did you find this post helpful? Yes | No

    Default Centre adjustment

    Not all servos have a centre adjustment. To check, remove the philips head screw that holds the servo arm on. Look down the hole in the splined shaft that holds the servo arm. If your servo has a centre adjustment, you will see a very small flat blade screwdriver slot. That is the centre adjustment.

    HTH
    Brian

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ruijc View Post
    Hi all,
    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
    Put a mark on the servo horn and eyeball it.

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

    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 ) ???
    Somehow, I think you're Oscillator and you're DEFINE's don't match up. Grab an LED, and try a simple one second per flash LED flasher type thing and see what happens.
    I still get the feeling that you're a magnitude or two off the mark here.
    The servo stopping at 1300, tells me that if your oscillator was off by a factor of 2, that the 1300 might actually be 2600. A pulse width of 2.6ms on a servo is 'off the scale' at one end by quite a bit, I don't think it's completely unreasonable that you'd be hitting a stop there rather than around 2-2.1 ms like it should be.

    And another thing...You also said that your center is 700.
    Well, 700 (.7ms) x 2 = 1400 (1.4ms) ....pretty close to 1500 (1.5ms) dontcha think!

    Double check your oscillator settings, frequency, code, etc.etc.etc. I'm sticking with that theory for now....in the absense of better information of course...

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