Shop OBEX P1 Docs P2 Docs Learn Events
Boe-Bot servo problem — Parallax Forums

Boe-Bot servo problem

Never4everNever4ever Posts: 2
edited 2012-04-14 22:20 in Robotics
Hello,

The Boebot's servo's do not stop simultaneously. So, when the right servo stops the left servo continues spinning for a sec or 2.
Am I able to solve this problem? As far as I know it is not a software problem and neither is it a centering problem.

Thanks in advance!

Cheers

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-13 12:34
    Servos are not precise mechanisms. It's certainly possible that one servo could continue running for a short time after another, but a second or two is a bit long. It's impossible to tell you why without a listing of your program and a description of the circumstances involved.
  • Never4everNever4ever Posts: 2
    edited 2012-04-13 13:07
    Thanks for your quick reply.

    I took another look and concluded that I judged the lag to be longer than it is. It might be just around 10 ms. So I'll just have to live with the minor twitch the robot makes when it stops. That turned the problem into a little issue!
  • xanaduxanadu Posts: 3,347
    edited 2012-04-14 13:54
    I'm not sure if anyone else does this but for continuous rotation servo's the trim pot always has a little null zone which makes it easy to tune but at the same time it can also lead to steering issues. If you really want to fine tune it you could do something like this:
     {$STAMP BS2}
    ' {$PBASIC 2.5}
    '
    'Continuous Servo Super Centering
    '
    'My servo's null range is min 748 max 752. The min value must be equal
    'distance from max value and always centered on 750.
    '
    'Center your servo using pulsout 750. Then:
    '
    'You should setup the null zone for your servo by testing one pulsout
    'at a time until you cover the range of values that do not move the
    'servo. Once you have that range, you adjust it so the center of your
    'range is based on pulsout 750. Pulsout all the positions in the null
    'zone and then adjust potentiometer. You may want to delete the highest
    'and lowest pulsout to make it a little easier.
    
    
    servo    CON 12      'set this to servo pin
    
    DO
    
     PULSOUT servo, 748
     PAUSE 20
     PULSOUT servo, 749
     PAUSE 20
     PULSOUT servo, 750
     PAUSE 20
     PULSOUT servo, 751
     PAUSE 20
     PULSOUT servo, 752
     PAUSE 20
    
    LOOP
    
  • ercoerco Posts: 20,255
    edited 2012-04-14 22:20
    CR servos can be finnicky on stopping. Note that there are two different ways to stop:

    1) Coasting: Just stop sending pulsouts to the servos and they'll coast a little while as they stop.
    2) Braking: Continuing to send a stream of PULSOUT 750's to both servos applies dynamic braking for faster stopping.

    Try both approaches and see which works best for your situation.
Sign In or Register to comment.