Shop OBEX P1 Docs P2 Docs Learn Events
servos only move in one direction — Parallax Forums

servos only move in one direction

HavoKaneHavoKane Posts: 109
edited 2012-02-18 16:26 in BASIC Stamp
regardless of the programming, the servos only move the robot foreward, ive adjusted the values and such, but they wont change direction or speed. and ive tried adjusting the servos, itll change direction, but still not according to the programming
' {$STAMP BS2}
' {$PBASIC 2.5}

DEBUG "running"

counter VAR Byte

FOR counter = 1 TO 122
PULSOUT 12, 650
PULSOUT 13, 850
PAUSE 20
NEXT

FOR counter = 1 TO 122
PULSOUT 12, 850
PULSOUT 13, 650
PAUSE 20
NEXT

END

END

Post Edited (HavoKane) : 7/21/2006 2:21:43 AM GMT

Comments

  • willthiswork89willthiswork89 Posts: 359
    edited 2006-07-21 02:57
    why is there an end twice? also are the pins connected correctly? white to the farthest outside edge, did you center then correctly?
  • HavoKaneHavoKane Posts: 109
    edited 2006-07-22 01:34
    end is there twice by accident, yes they are hooked up and centered correctly, thats why im so puzzled
  • LarryLarry Posts: 212
    edited 2006-07-22 01:40
    Two things to check

    1) does "running keep showing up on the DEBUG screen? ( more than once)

    2) what happens if you use 750 as the PULSOUT value in all cases?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Post Edited (Larry) : 7/22/2006 1:49:13 AM GMT
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-07-22 04:35
    did you maybe run the wrong voltage and possibly damage them? try changing the batteries to normal alkaline batteries and see if it solves it
  • HavoKaneHavoKane Posts: 109
    edited 2006-07-23 02:39
    ok, well, ive been fiddling. it seems that 1 of my servos is healthy, and the other is the one that will only move in one direction, ive tested all 4 ports to make sure that its not a bad port. the other servo works in both directions on all ports, the other only goes in one direction regardless of port. anybody have an idea?
  • HavoKaneHavoKane Posts: 109
    edited 2006-07-23 02:40
    to Larry

    1. no
    2. same thing
  • LarryLarry Posts: 212
    edited 2006-07-23 05:43
    havokane said...
    to Larry

    1. no
    2. same thing

    Ok-- the first test was to see if a surge of power was resetting the Stamp. often, when this happens, the act of resetting will cause a short pulse which will act as a command to the servo, Repeatd resets will tend to move a servo ibn the same direction. You apparently don't have this problem.

    The second behavior indicates that you haven't "centered" your servo. I don't know what kind you have or how they were modified for continuos rotation, but there should be a way to adjust them so a pulse of 750 gives little or no motion. check the literature that came with your robot or the bild directions you are following. It usually involves adjusting a Pot internal to the servo.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • HavoKaneHavoKane Posts: 109
    edited 2006-07-23 05:54
    i would just like to say thank you. very very much. the servos needed extreme centering. im not sure how they got so out of whack. probobly a sibling trying to be funny. i never would have thouhgt to re-check the centering. thanks again larry.
  • LarryLarry Posts: 212
    edited 2006-07-23 16:39
    Glad you got it running correctly. Sometimes you have to start back at the beginning if you'e not getting expected results....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • HowarthEHowarthE Posts: 2
    edited 2012-02-17 21:42
    I have the exact original problem described, running same program... almost 6 years later :nerd:

    1) Does "running" keep showing up on the DEBUG screen? (more than once)
    YES

    2) What happens if you use 750 as the PULSOUT value in all cases?
    Nothing - I think the servos are centered OK.

    I do not have fresh batteries, of course :frown:, but will change them tomorrow and post an update.
    If there is anything else to check, I'd be happy to try it!
  • ercoerco Posts: 20,256
    edited 2012-02-18 09:02
    HowarthE wrote: »
    1) Does "running" keep showing up on the DEBUG screen? (more than once)
    YES

    That means your Stamp is constantly resetting. Most likely cause? You guessed it: low batteries.
  • HowarthEHowarthE Posts: 2
    edited 2012-02-18 16:26
    Beautiful confirmation of the behavior of low batteries!

    ALL CLEAR with a fresh set of 4 AAs, and servos behaving as expected -
    Very cool to find this old post that was exactly what I needed!

    Thanks erco, and Larry before you...
Sign In or Register to comment.