Shop OBEX P1 Docs P2 Docs Learn Events
Servo Motor Problem — Parallax Forums

Servo Motor Problem

aravindsingharavindsingh Posts: 4
edited 2009-08-05 00:05 in BASIC Stamp
Hi,

I am using Basic Stamp 2 and programming it to move forward. I have connected the servo motor to pin 12 and 13 the command that i am using is very basic that is

do
pulsout 12, 650
pulsout 13, 850
pause 20
loop
end


when i am running the Boebot it is not moving straight but taking aa slight curvature path. i am not able to understand the problem

1. i have changed the servo motor still same problem i their
2. I have changed the basic stamp still the same problem is their
3. i have re installed the IDE still same problem is their
4. I have done the experiment with fresh batteries

the voltage level at pin 12 and 13 are same when the servo motors are moving in the same direction.


Please help i am stuck

with regards

Aravind Singh

Comments

  • dev/nulldev/null Posts: 381
    edited 2009-07-24 10:39
    This might be caused by mechanical differences on the wheels. You should try adjusting the pulse width.
    For instance PULSOUT 12, 670 or PULSOUT 12, 630

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • aravindsingharavindsingh Posts: 4
    edited 2009-07-25 05:41
    thanks for replying.......

    i have tried doing that but still it is not working . i see that the chasis of the boe bot is little distorted. Let me correct it if still problem persists then please help

    with regards
    Aravind Kumar Singh
  • $WMc%$WMc% Posts: 1,884
    edited 2009-07-25 06:05
    Aravind

    Servos are mechanical devices, No two servos are the same.

    Write a correction subroutine to correct the defiant servo.


    _______________$WMc%______Just think about it___

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············································ BoogerWoods, FL. USA
  • aravindsingharavindsingh Posts: 4
    edited 2009-07-25 08:13
    i have fixed the chasiss. still is not working i.e, moving forward. please help
  • dev/nulldev/null Posts: 381
    edited 2009-07-25 10:32
    Since you have interchanged your servoes, it is not a servo problem. It's do to a mechanical unbalance in your robot. You should be able to compensate wth pulsewidths. Try different values between 650 and 850.
    For example:
    do
    pulsout 12, 600
    pulsout 13, 850
    pause 20
    loop
    end

    or

    do
    pulsout 12, 650
    pulsout 13, 800
    pause 20
    loop
    end

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • Daniel L.Daniel L. Posts: 7
    edited 2009-07-25 16:31
    Try setting P13 to 1000 and P12 to 500, It made it straight for me, don't ask me why. smurf.gif


    I think it has to do with the pulsout making the servos going past their max speed. Since the servos are about the same, both going their max speed should make it straight.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Daniel L.

    AKA, The Ninja of Frozen Milk
    AAKA, ゆきごくろさき (Yukigo Kurosaki )

    Post Edited (Daniel L.) : 7/25/2009 4:37:11 PM GMT
  • aravindsingharavindsingh Posts: 4
    edited 2009-07-30 11:09
    thanks for helping me

    i have adjusted the speed of the servo motors and have come to an trade off between motion and the PWM value given to the motors.. i am able to get good straight motion 80 % perfect.

    but i am not able to figure it why it is behaving so.

    Thanks to all
  • PrettybirdPrettybird Posts: 269
    edited 2009-07-30 12:23
    Do both servos stop with the polsout 750? I am a newbee too but found out equal values not the same for both servos. Just alot of trial and error to make perfect. It describes in the Boe book
  • dw101sdw101s Posts: 27
    edited 2009-08-02 02:26
    Prettybird is on to the solution to the problem. If you do the following

    do
    pulsout 12, 750
    pulsout 13, 750
    loop

    and if either of the servos are still moving you need to take a screw driver and adjust the servos' center mark to make the servo stop moving at pulsout 750. Its in the BOE book, its free from parallax.com
  • isofuncurvesisofuncurves Posts: 19
    edited 2009-08-05 00:05
    I am testing the servo "sub-assemblies" right now. I experience the same situation. What I seem to notice is that which ever pin is listed first, that servo is traveling a little faster. For example, using this code:

    DO
    PULSOUT 12, 850
    PULSOUT 13, 650
    PAUSE 20
    LOOP

    I set the servos side by side with the control arms over-lapping and centered but not touching. when I run the program Servo 12 catches servo 13 and the servo arms start hitting. If I reverse the 12 and 13 in the above code, servo 13 catches servo 12.

    The closest I can get them to matching speed is:
    DO
    PULSOUT 12, 809
    PULSOUT 13, 650
    PAUSE 20
    LOOP

    which seems like a big discrepancy. 750 does stop both servos. The offset doesn't appear to be the symetrical when switching directions.

    Just some observations...
Sign In or Register to comment.