Shop OBEX P1 Docs P2 Docs Learn Events
problem with servos in the boebot — Parallax Forums

problem with servos in the boebot

real_polyfimosreal_polyfimos Posts: 12
edited 2009-02-18 00:27 in Robotics
I·recently purchased a boebot package and I'm trying to calibrate its servos. I have placed a BS2px processor instead of the BS2 that comes with the board of education, and I succesfully adjusted the set point of each servo (... PULSEOUT Servo_pin,1875....).
The problem is that the two motors do not rotate sychronously, I mean the one of·two rotates more quickly than the other, when I give them the·instruction to rotate in the maximum speed ( ... 2250 ...·1500 pulses ·clockwise and counterclockwise respectively). Do they mulfunction or there is something I miss? (·I use the 12 and 13 pin)
Also, I changed their·pins and I noticed that the problem remains for the pins

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-16 23:42
    Servos are relatively imprecise devices, particularly the "continuous motion" servos used in the BoeBot. It is not unusual for the pulse widths for two different servos to be different, for the servos to have different maximum speeds, and for the maximum (and minimum) pulse widths to be different. You have to calibrate them individually.
  • GWJaxGWJax Posts: 267
    edited 2009-02-17 00:16
    On the BS2px use this to calculate the pulse duration:
    (1.5ms / 2 uS) x 800 uS = 600 for the center position, If you notice that on a BS2 you would multiply the duration by 1ms and would give you 750 for the duration of 1.5ms but on the BS2px its 0.8 ms so this gives you a duration of 600

    So return to page 69 in the roboticsv2_2.pdf and re-center your servos with this change to the program

    DO
    PULSOUT 12, 600
    PAUSE 20
    LOOP
    and make the same change to the P13 servo as well
    I hope this helps you out.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2009-02-17 02:41
    GWJax,

    Since the BS2, BS2e, and BS2pe all have a PULSOUT resolution of 2us you divide the desired pulse width by 2... so that 1500us becomes 750 for a center position.

    For a BS2sx, BS2p, and BS2px the resolution is 0.8us, so you divide the desired pulse width by 0.8 and you get 1875 for a center position... not the 600 from your calculation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • real_polyfimosreal_polyfimos Posts: 12
    edited 2009-02-17 07:40
    Calibrating the servos each one individually via some kind of a software routine is the only way in order to the robot go straight. Thank you all for your replying.
  • GWJaxGWJax Posts: 267
    edited 2009-02-18 00:27
    Beau Schwabe (Parallax) said...
    GWJax,

    Since the BS2, BS2e, and BS2pe all have a PULSOUT resolution of 2us you divide the desired pulse width by 2... so that 1500us becomes 750 for a center position.

    For a BS2sx, BS2p, and BS2px the resolution is 0.8us, so you divide the desired pulse width by 0.8 and you get 1875 for a center position... not the 600 from your calculation.

    LOL thanks for the correction,I for got to remove 2us and replace it with 0.8us but at least I got the rest right well almost hehehe (1.5ms x 2ms) / 0.8 us = 1875. I have had too many things going on at once, so I'm glad you corrected my typo to this Beau.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..

    Post Edited (GWJax) : 2/18/2009 12:44:02 AM GMT
Sign In or Register to comment.