Shop OBEX P1 Docs P2 Docs Learn Events
Pulsout not working right — Parallax Forums

Pulsout not working right

ArchiverArchiver Posts: 46,084
edited 2004-02-09 13:49 in General Discussion
Im trying to control a servo motor, using the PULSOUT command. Im
running a BS2 that is new and im using a brand new servo. Here is a
sample of the code i tried.
Main:
PULSOUT 1, 750
PAUSE 20
Goto Main

No matter what duration a replace the 750 with, it always makes the
servo go straight to the left and try to keep on going past the
stop... I've tried 2 other servos that i own, and it does the same
thing on them too.... Im running +5v to the servo. i dont know
what is wrong.... Any help will be appreciated.
Thanks
-Tim
«1

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 03:55
    Tim,

    There was an example code in the "What's a Microcontroller" book.
    The code is

    counter VAR Word

    DEBUG "Counterclockwise 10 o'clock", CR

    FOR counter = 1 TO 150
    PULSOUT 14, 1000
    PAUSE 20
    NEXT

    DEBUG "Clockwise 2 o'clock", CR

    For counter = 1 TO 150
    PULSOUT 14, 500
    PAUSE 20
    NEXT

    DEBUG "Center 12 o'clock", CR

    For counter = 1 To 150
    PULSOUT 14, 750
    PAUSE 20
    NEXT

    DEBUG "All done."

    END

    Tim,

    I'm having trouble with the PULSIN. I'm trying to read a pulse from
    a receiver. The receiver sends the same signals as the signals sent
    to a servo. The PULSIN measures the pulse. So, what I tried to do
    was, generate the pulses with the code above and include the pulsin
    statement. It isn't reading the pulse/pulses. HELP!!

    Good Luck

    Jennifer
    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > Im trying to control a servo motor, using the PULSOUT command. Im
    > running a BS2 that is new and im using a brand new servo. Here is
    a
    > sample of the code i tried.
    > Main:
    > PULSOUT 1, 750
    > PAUSE 20
    > Goto Main
    >
    > No matter what duration a replace the 750 with, it always makes
    the
    > servo go straight to the left and try to keep on going past the
    > stop... I've tried 2 other servos that i own, and it does the
    same
    > thing on them too.... Im running +5v to the servo. i dont know
    > what is wrong.... Any help will be appreciated.
    > Thanks
    > -Tim
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 04:17
    This might help.
    servopos var word
    main:
    servopos = 100
    for servopos = servopos + 50 MAX 700
    pulsout 1, servopos
    goto main

    Tim <tim_korn_99@y...> wrote:
    Im trying to control a servo motor, using the PULSOUT command. Im
    running a BS2 that is new and im using a brand new servo. Here is a
    sample of the code i tried.
    Main:
    PULSOUT 1, 750
    PAUSE 20
    Goto Main

    No matter what duration a replace the 750 with, it always makes the
    servo go straight to the left and try to keep on going past the
    stop... I've tried 2 other servos that i own, and it does the same
    thing on them too.... Im running +5v to the servo. i dont know
    what is wrong.... Any help will be appreciated.
    Thanks
    -Tim




    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and Body of
    the message will be ignored.

    Yahoo! Groups Links






    Do you Yahoo!?
    Yahoo! Finance: Get your refund fast by filing online

    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 04:32
    Make your servo pin an output low before running your main code.

    Setup:
    LOW 1

    Main:
    PULSOUT 1, 750
    PAUSE 20
    GOTO Main


    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Tim [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=kTEl7VuicTvDL_zFE5udvyjJGj76uvGy7V99gDYEHC0RzihFlTsGx_pibajUbTXZ6yw3bbAvA7SmGLDF]tim_korn_99@y...[/url
    Sent: Thursday, February 05, 2004 8:52 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Pulsout not working right


    Im trying to control a servo motor, using the PULSOUT command. Im
    running a BS2 that is new and im using a brand new servo. Here is a
    sample of the code i tried.
    Main:
    PULSOUT 1, 750
    PAUSE 20
    Goto Main

    No matter what duration a replace the 750 with, it always makes the
    servo go straight to the left and try to keep on going past the
    stop... I've tried 2 other servos that i own, and it does the same
    thing on them too.... Im running +5v to the servo. i dont know
    what is wrong.... Any help will be appreciated.
    Thanks
    -Tim




    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 04:35
    That code gave me an error.
    "expected "TO""
    thanks though



    --- In basicstamps@yahoogroups.com, Kyle Cooper <crazykurby@y...>
    wrote:
    > This might help.
    > servopos var word
    > main:
    > servopos = 100
    > for servopos = servopos + 50 MAX 700
    > pulsout 1, servopos
    > goto main
    >
    > Tim <tim_korn_99@y...> wrote:
    > Im trying to control a servo motor, using the PULSOUT command. Im
    > running a BS2 that is new and im using a brand new servo. Here is
    a
    > sample of the code i tried.
    > Main:
    > PULSOUT 1, 750
    > PAUSE 20
    > Goto Main
    >
    > No matter what duration a replace the 750 with, it always makes
    the
    > servo go straight to the left and try to keep on going past the
    > stop... I've tried 2 other servos that i own, and it does the same
    > thing on them too.... Im running +5v to the servo. i dont know
    > what is wrong.... Any help will be appreciated.
    > Thanks
    > -Tim
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    Subject and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > Do you Yahoo!?
    > Yahoo! Finance: Get your refund fast by filing online
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 04:39
    sorry, but that didnt work. I even manually move the servo to its
    center position, and ran the code, and it just went all the way to
    the left. i dont know what's wrong with it. it does that on all of
    my servos.
    thanks

    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > Make your servo pin an output low before running your main code.
    >
    > Setup:
    > LOW 1
    >
    > Main:
    > PULSOUT 1, 750
    > PAUSE 20
    > GOTO Main
    >
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: Tim [noparse][[/noparse]mailto:tim_korn_99@y...]
    > Sent: Thursday, February 05, 2004 8:52 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Pulsout not working right
    >
    >
    > Im trying to control a servo motor, using the PULSOUT command. Im
    > running a BS2 that is new and im using a brand new servo. Here is
    a
    > sample of the code i tried.
    > Main:
    > PULSOUT 1, 750
    > PAUSE 20
    > Goto Main
    >
    > No matter what duration a replace the 750 with, it always makes
    the
    > servo go straight to the left and try to keep on going past the
    > stop... I've tried 2 other servos that i own, and it does the
    same
    > thing on them too.... Im running +5v to the servo. i dont know
    > what is wrong.... Any help will be appreciated.
    > Thanks
    > -Tim
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p...
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 06:29
    That bit of code didnt work for me either. im really starting to
    think that there is something wrong with my stamp. i just got the
    thing, and plugged it into the carrier board... that's it... maybe
    its a defect. i dont know how to check



    --- In basicstamps@yahoogroups.com, "engjennifer21"
    <engjennifer21@y...> wrote:
    > Tim,
    >
    > There was an example code in the "What's a Microcontroller" book.
    > The code is
    >
    > counter VAR Word
    >
    > DEBUG "Counterclockwise 10 o'clock", CR
    >
    > FOR counter = 1 TO 150
    > PULSOUT 14, 1000
    > PAUSE 20
    > NEXT
    >
    > DEBUG "Clockwise 2 o'clock", CR
    >
    > For counter = 1 TO 150
    > PULSOUT 14, 500
    > PAUSE 20
    > NEXT
    >
    > DEBUG "Center 12 o'clock", CR
    >
    > For counter = 1 To 150
    > PULSOUT 14, 750
    > PAUSE 20
    > NEXT
    >
    > DEBUG "All done."
    >
    > END
    >
    > Tim,
    >
    > I'm having trouble with the PULSIN. I'm trying to read a pulse
    from
    > a receiver. The receiver sends the same signals as the signals
    sent
    > to a servo. The PULSIN measures the pulse. So, what I tried to
    do
    > was, generate the pulses with the code above and include the
    pulsin
    > statement. It isn't reading the pulse/pulses. HELP!!
    >
    > Good Luck
    >
    > Jennifer
    > --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > > Im trying to control a servo motor, using the PULSOUT command.
    Im
    > > running a BS2 that is new and im using a brand new servo. Here
    is
    > a
    > > sample of the code i tried.
    > > Main:
    > > PULSOUT 1, 750
    > > PAUSE 20
    > > Goto Main
    > >
    > > No matter what duration a replace the 750 with, it always makes
    > the
    > > servo go straight to the left and try to keep on going past the
    > > stop... I've tried 2 other servos that i own, and it does the
    > same
    > > thing on them too.... Im running +5v to the servo. i dont know
    > > what is wrong.... Any help will be appreciated.
    > > Thanks
    > > -Tim
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 13:26
    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > That bit of code didnt work for me either. im really starting to
    > think that there is something wrong with my stamp. i just got the
    > thing, and plugged it into the carrier board... that's it... maybe
    > its a defect. i dont know how to check
    >
    > > > -Tim

    750 is a *HUGE* pulse for a servo. A pulse of 100 will get it
    reasonably close to center. 200 may or may not be beyond its upper
    limit. and you <obviously> can't send it a pulse of 0 (zero) in the
    other. I think you're trying to tell the servo to move farther than it
    can...

    Applicacion note 4: Controlling and Testing Servos - tells you what
    you need to know, right out of the manual. Download it. It's free! :-)

    Stephen Weller
    American. Veteran. Patriot.
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 13:51
    --- Tim <tim_korn_99@y...> wrote:
    > sorry, but that didnt work. I even manually move
    > the servo to its
    > center position, and ran the code, and it just went
    > all the way to
    > the left. i dont know what's wrong with it. it
    > does that on all of
    > my servos.
    > thanks

    Just a thought Tim, but are you certain all your
    connections are right? Are you certain of which wires
    on the servo are for power, ground and signal?



    =====
    Chris Savage
    Knight Designs
    324 West Main Street
    Montour Falls, NY 14865
    (607) 535-6777

    http://www.knightdesigns.com

    __________________________________
    Do you Yahoo!?
    Yahoo! Finance: Get your refund fast by filing online.
    http://taxes.yahoo.com/filing.html
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 15:25
    My understanding is that the servo wants
    a 1 mSec pulse to go one way, and a
    2 mSec pulse to go the other way.
    A 1.5 mSec pulse should put it in the
    middle position. Also, the input line
    should be normally LOW, and the pulse
    should go high for the desired time.
    And, the pulse should be 'refreshed'
    every 20 to 50 mSec.

    The above is what your code should do.

    Parallax sells 'modified' servos which
    continuously rotate, with direction set
    by the pulse.

    If all this is true for your servo,
    then the one wild card is how you
    specify that pulse.

    PULSOUT 2, 750 on a BS2 will output
    a 1500 uSec pulse (since the BS2 units
    are in 2 uSec). This should work.

    PULSOUT 2, 750 on a BS2sx will output
    a 600 uSec pulse on pin 2
    (since the BS2sx uses 0.8 uSec units).
    This won't center the servo.

    I'm guessing you either have a BS2sx,
    or your servo does not use the
    1 mSec/2 mSec standard, or your
    servo is wired to some other pin.
    Note pin 12 and pin 13 are standard
    on the BOE.

    You probably want:
    PULSOUT 12, 1875
    to output a 1.5 mSec 'center' pulse
    on a BS2sx, on pin 12.

    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > sorry, but that didnt work. I even manually move the servo to its
    > center position, and ran the code, and it just went all the way to
    > the left. i dont know what's wrong with it. it does that on all
    of
    > my servos.
    > thanks
    >
    > --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    > wrote:
    > > Make your servo pin an output low before running your main code.
    > >
    > > Setup:
    > > LOW 1
    > >
    > > Main:
    > > PULSOUT 1, 750
    > > PAUSE 20
    > > GOTO Main
    > >
    > >
    > > -- Jon Williams
    > > -- Applications Engineer, Parallax
    > > -- Dallas Office
    > >
    > >
    > >
    Original Message
    > > From: Tim [noparse][[/noparse]mailto:tim_korn_99@y...]
    > > Sent: Thursday, February 05, 2004 8:52 PM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Pulsout not working right
    > >
    > >
    > > Im trying to control a servo motor, using the PULSOUT command.
    Im
    > > running a BS2 that is new and im using a brand new servo. Here
    is
    > a
    > > sample of the code i tried.
    > > Main:
    > > PULSOUT 1, 750
    > > PAUSE 20
    > > Goto Main
    > >
    > > No matter what duration a replace the 750 with, it always makes
    > the
    > > servo go straight to the left and try to keep on going past the
    > > stop... I've tried 2 other servos that i own, and it does the
    > same
    > > thing on them too.... Im running +5v to the servo. i dont know
    > > what is wrong.... Any help will be appreciated.
    > > Thanks
    > > -Tim
    > >
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    > Subject
    > > and Body of the message will be ignored.
    > >
    > > Yahoo! Groups Links
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > This message has been scanned by WebShield. Please report SPAM to
    > > abuse@p...
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 16:09
    thanks for the help, but im 100% sure that i have a BS2 and im also
    100% sure that my connections are right. i've checked, and double
    checked, and triple checked... My servo is on pin 1 right now, i've
    even tried moving it to different pins and changing to code to see
    if it will work.... nope still nothing. it seems like ANYTHING that
    i send to the servo makes it go straight to the left. ALWAYS. i
    cannot get the servo to move the other way... so, its either 1 of 2
    things wrong. 1, all three of my servos are bad. 2, my stamp is
    bad. the stamp is less than 2 weeks old, and the servo im using is
    less than 2 days old. i have no clue.
    thanks
    -tim



    --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
    wrote:
    > My understanding is that the servo wants
    > a 1 mSec pulse to go one way, and a
    > 2 mSec pulse to go the other way.
    > A 1.5 mSec pulse should put it in the
    > middle position. Also, the input line
    > should be normally LOW, and the pulse
    > should go high for the desired time.
    > And, the pulse should be 'refreshed'
    > every 20 to 50 mSec.
    >
    > The above is what your code should do.
    >
    > Parallax sells 'modified' servos which
    > continuously rotate, with direction set
    > by the pulse.
    >
    > If all this is true for your servo,
    > then the one wild card is how you
    > specify that pulse.
    >
    > PULSOUT 2, 750 on a BS2 will output
    > a 1500 uSec pulse (since the BS2 units
    > are in 2 uSec). This should work.
    >
    > PULSOUT 2, 750 on a BS2sx will output
    > a 600 uSec pulse on pin 2
    > (since the BS2sx uses 0.8 uSec units).
    > This won't center the servo.
    >
    > I'm guessing you either have a BS2sx,
    > or your servo does not use the
    > 1 mSec/2 mSec standard, or your
    > servo is wired to some other pin.
    > Note pin 12 and pin 13 are standard
    > on the BOE.
    >
    > You probably want:
    > PULSOUT 12, 1875
    > to output a 1.5 mSec 'center' pulse
    > on a BS2sx, on pin 12.
    >
    > --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > > sorry, but that didnt work. I even manually move the servo to
    its
    > > center position, and ran the code, and it just went all the way
    to
    > > the left. i dont know what's wrong with it. it does that on
    all
    > of
    > > my servos.
    > > thanks
    > >
    > > --- In basicstamps@yahoogroups.com, "Jon Williams"
    <jwilliams@p...>
    > > wrote:
    > > > Make your servo pin an output low before running your main
    code.
    > > >
    > > > Setup:
    > > > LOW 1
    > > >
    > > > Main:
    > > > PULSOUT 1, 750
    > > > PAUSE 20
    > > > GOTO Main
    > > >
    > > >
    > > > -- Jon Williams
    > > > -- Applications Engineer, Parallax
    > > > -- Dallas Office
    > > >
    > > >
    > > >
    Original Message
    > > > From: Tim [noparse][[/noparse]mailto:tim_korn_99@y...]
    > > > Sent: Thursday, February 05, 2004 8:52 PM
    > > > To: basicstamps@yahoogroups.com
    > > > Subject: [noparse][[/noparse]basicstamps] Pulsout not working right
    > > >
    > > >
    > > > Im trying to control a servo motor, using the PULSOUT
    command.
    > Im
    > > > running a BS2 that is new and im using a brand new servo.
    Here
    > is
    > > a
    > > > sample of the code i tried.
    > > > Main:
    > > > PULSOUT 1, 750
    > > > PAUSE 20
    > > > Goto Main
    > > >
    > > > No matter what duration a replace the 750 with, it always
    makes
    > > the
    > > > servo go straight to the left and try to keep on going past
    the
    > > > stop... I've tried 2 other servos that i own, and it does the
    > > same
    > > > thing on them too.... Im running +5v to the servo. i dont
    know
    > > > what is wrong.... Any help will be appreciated.
    > > > Thanks
    > > > -Tim
    > > >
    > > >
    > > >
    > > >
    > > > To UNSUBSCRIBE, just send mail to:
    > > > basicstamps-unsubscribe@yahoogroups.com
    > > > from the same email address that you subscribed. Text in the
    > > Subject
    > > > and Body of the message will be ignored.
    > > >
    > > > Yahoo! Groups Links
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > This message has been scanned by WebShield. Please report SPAM
    to
    > > > abuse@p...
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 16:19
    im using a BS2. 750 pulse = 1500. i think you are talking about
    the BS1 maybe. Anyhow, i've even tried giving it every kind of
    pulse, from 10 to 1500. guess where it goes.... straight to the
    left.
    thanks
    -tim


    --- In basicstamps@yahoogroups.com, "wun_fungi" <sweller@a...> wrote:
    > --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > > That bit of code didnt work for me either. im really starting
    to
    > > think that there is something wrong with my stamp. i just got
    the
    > > thing, and plugged it into the carrier board... that's it...
    maybe
    > > its a defect. i dont know how to check
    > >
    > > > > -Tim
    >
    > 750 is a *HUGE* pulse for a servo. A pulse of 100 will get it
    > reasonably close to center. 200 may or may not be beyond its upper
    > limit. and you <obviously> can't send it a pulse of 0 (zero) in the
    > other. I think you're trying to tell the servo to move farther
    than it
    > can...
    >
    > Applicacion note 4: Controlling and Testing Servos - tells you what
    > you need to know, right out of the manual. Download it. It's
    free! :-)
    >
    > Stephen Weller
    > American. Veteran. Patriot.
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 16:43
    Hmm. How are you powering this?
    I think you need a 6 volt, or 7.5 volt
    power supply for the servo. I don't know
    what more than that would do.

    How are your batteries, if you're using those?

    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > thanks for the help, but im 100% sure that i have a BS2 and im also
    > 100% sure that my connections are right. i've checked, and double
    > checked, and triple checked... My servo is on pin 1 right now,
    i've
    > even tried moving it to different pins and changing to code to see
    > if it will work.... nope still nothing. it seems like ANYTHING
    that
    > i send to the servo makes it go straight to the left. ALWAYS. i
    > cannot get the servo to move the other way... so, its either 1 of
    2
    > things wrong. 1, all three of my servos are bad. 2, my stamp is
    > bad. the stamp is less than 2 weeks old, and the servo im using is
    > less than 2 days old. i have no clue.
    > thanks
    > -tim
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
    > wrote:
    > > My understanding is that the servo wants
    > > a 1 mSec pulse to go one way, and a
    > > 2 mSec pulse to go the other way.
    > > A 1.5 mSec pulse should put it in the
    > > middle position. Also, the input line
    > > should be normally LOW, and the pulse
    > > should go high for the desired time.
    > > And, the pulse should be 'refreshed'
    > > every 20 to 50 mSec.
    > >
    > > The above is what your code should do.
    > >
    > > Parallax sells 'modified' servos which
    > > continuously rotate, with direction set
    > > by the pulse.
    > >
    > > If all this is true for your servo,
    > > then the one wild card is how you
    > > specify that pulse.
    > >
    > > PULSOUT 2, 750 on a BS2 will output
    > > a 1500 uSec pulse (since the BS2 units
    > > are in 2 uSec). This should work.
    > >
    > > PULSOUT 2, 750 on a BS2sx will output
    > > a 600 uSec pulse on pin 2
    > > (since the BS2sx uses 0.8 uSec units).
    > > This won't center the servo.
    > >
    > > I'm guessing you either have a BS2sx,
    > > or your servo does not use the
    > > 1 mSec/2 mSec standard, or your
    > > servo is wired to some other pin.
    > > Note pin 12 and pin 13 are standard
    > > on the BOE.
    > >
    > > You probably want:
    > > PULSOUT 12, 1875
    > > to output a 1.5 mSec 'center' pulse
    > > on a BS2sx, on pin 12.
    > >
    > > --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...>
    wrote:
    > > > sorry, but that didnt work. I even manually move the servo to
    > its
    > > > center position, and ran the code, and it just went all the way
    > to
    > > > the left. i dont know what's wrong with it. it does that on
    > all
    > > of
    > > > my servos.
    > > > thanks
    > > >
    > > > --- In basicstamps@yahoogroups.com, "Jon Williams"
    > <jwilliams@p...>
    > > > wrote:
    > > > > Make your servo pin an output low before running your main
    > code.
    > > > >
    > > > > Setup:
    > > > > LOW 1
    > > > >
    > > > > Main:
    > > > > PULSOUT 1, 750
    > > > > PAUSE 20
    > > > > GOTO Main
    > > > >
    > > > >
    > > > > -- Jon Williams
    > > > > -- Applications Engineer, Parallax
    > > > > -- Dallas Office
    > > > >
    > > > >
    > > > >
    Original Message
    > > > > From: Tim [noparse][[/noparse]mailto:tim_korn_99@y...]
    > > > > Sent: Thursday, February 05, 2004 8:52 PM
    > > > > To: basicstamps@yahoogroups.com
    > > > > Subject: [noparse][[/noparse]basicstamps] Pulsout not working right
    > > > >
    > > > >
    > > > > Im trying to control a servo motor, using the PULSOUT
    > command.
    > > Im
    > > > > running a BS2 that is new and im using a brand new servo.
    > Here
    > > is
    > > > a
    > > > > sample of the code i tried.
    > > > > Main:
    > > > > PULSOUT 1, 750
    > > > > PAUSE 20
    > > > > Goto Main
    > > > >
    > > > > No matter what duration a replace the 750 with, it always
    > makes
    > > > the
    > > > > servo go straight to the left and try to keep on going past
    > the
    > > > > stop... I've tried 2 other servos that i own, and it does
    the
    > > > same
    > > > > thing on them too.... Im running +5v to the servo. i dont
    > know
    > > > > what is wrong.... Any help will be appreciated.
    > > > > Thanks
    > > > > -Tim
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > To UNSUBSCRIBE, just send mail to:
    > > > > basicstamps-unsubscribe@yahoogroups.com
    > > > > from the same email address that you subscribed. Text in the
    > > > Subject
    > > > > and Body of the message will be ignored.
    > > > >
    > > > > Yahoo! Groups Links
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > This message has been scanned by WebShield. Please report
    SPAM
    > to
    > > > > abuse@p...
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 16:44
    Do you have an o'scope? If yes, check the output from the Stamp to see
    what's happening.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Tim [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=TXppFsHql4yzCEUdQTiUSUSLpMIORTXg8fvvNlUR9Qnn6HdWhNhVNWmBHh_evmSqi9qtfMRDXoFSgSWiWVtx]tim_korn_99@y...[/url
    Sent: Friday, February 06, 2004 10:10 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: Pulsout not working right


    thanks for the help, but im 100% sure that i have a BS2 and im also
    100% sure that my connections are right. i've checked, and double
    checked, and triple checked... My servo is on pin 1 right now, i've
    even tried moving it to different pins and changing to code to see
    if it will work.... nope still nothing. it seems like ANYTHING that
    i send to the servo makes it go straight to the left. ALWAYS. i
    cannot get the servo to move the other way... so, its either 1 of 2
    things wrong. 1, all three of my servos are bad. 2, my stamp is
    bad. the stamp is less than 2 weeks old, and the servo im using is
    less than 2 days old. i have no clue.
    thanks
    -tim



    --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
    wrote:
    > My understanding is that the servo wants
    > a 1 mSec pulse to go one way, and a
    > 2 mSec pulse to go the other way.
    > A 1.5 mSec pulse should put it in the
    > middle position. Also, the input line
    > should be normally LOW, and the pulse
    > should go high for the desired time.
    > And, the pulse should be 'refreshed'
    > every 20 to 50 mSec.
    >
    > The above is what your code should do.
    >
    > Parallax sells 'modified' servos which
    > continuously rotate, with direction set
    > by the pulse.
    >
    > If all this is true for your servo,
    > then the one wild card is how you
    > specify that pulse.
    >
    > PULSOUT 2, 750 on a BS2 will output
    > a 1500 uSec pulse (since the BS2 units
    > are in 2 uSec). This should work.
    >
    > PULSOUT 2, 750 on a BS2sx will output
    > a 600 uSec pulse on pin 2
    > (since the BS2sx uses 0.8 uSec units).
    > This won't center the servo.
    >
    > I'm guessing you either have a BS2sx,
    > or your servo does not use the
    > 1 mSec/2 mSec standard, or your
    > servo is wired to some other pin.
    > Note pin 12 and pin 13 are standard
    > on the BOE.
    >
    > You probably want:
    > PULSOUT 12, 1875
    > to output a 1.5 mSec 'center' pulse
    > on a BS2sx, on pin 12.
    >
    > --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > > sorry, but that didnt work. I even manually move the servo to
    its
    > > center position, and ran the code, and it just went all the way
    to
    > > the left. i dont know what's wrong with it. it does that on
    all
    > of
    > > my servos.
    > > thanks
    > >
    > > --- In basicstamps@yahoogroups.com, "Jon Williams"
    <jwilliams@p...>
    > > wrote:
    > > > Make your servo pin an output low before running your main
    code.
    > > >
    > > > Setup:
    > > > LOW 1
    > > >
    > > > Main:
    > > > PULSOUT 1, 750
    > > > PAUSE 20
    > > > GOTO Main
    > > >
    > > >
    > > > -- Jon Williams
    > > > -- Applications Engineer, Parallax
    > > > -- Dallas Office
    > > >
    > > >
    > > >
    Original Message
    > > > From: Tim [noparse][[/noparse]mailto:tim_korn_99@y...]
    > > > Sent: Thursday, February 05, 2004 8:52 PM
    > > > To: basicstamps@yahoogroups.com
    > > > Subject: [noparse][[/noparse]basicstamps] Pulsout not working right
    > > >
    > > >
    > > > Im trying to control a servo motor, using the PULSOUT
    command.
    > Im
    > > > running a BS2 that is new and im using a brand new servo.
    Here
    > is
    > > a
    > > > sample of the code i tried.
    > > > Main:
    > > > PULSOUT 1, 750
    > > > PAUSE 20
    > > > Goto Main
    > > >
    > > > No matter what duration a replace the 750 with, it always
    makes
    > > the
    > > > servo go straight to the left and try to keep on going past
    the
    > > > stop... I've tried 2 other servos that i own, and it does the
    > > same
    > > > thing on them too.... Im running +5v to the servo. i dont
    know
    > > > what is wrong.... Any help will be appreciated.
    > > > Thanks
    > > > -Tim
    > > >
    > > >
    > > >
    > > >
    > > > To UNSUBSCRIBE, just send mail to:
    > > > basicstamps-unsubscribe@yahoogroups.com
    > > > from the same email address that you subscribed. Text in the
    > > Subject
    > > > and Body of the message will be ignored.
    > > >
    > > > Yahoo! Groups Links
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > This message has been scanned by WebShield. Please report SPAM
    to
    > > > abuse@p...



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 16:45
    No, no, no ... 750 is the correct value to center a standard servo with
    a BS2. The units in the BS2's PULSOUT instruction are two microseconds,
    so PUSLOUT pin, 750 will give you a pulse of 1500 microseconds, or 1.5
    milliseconds which is the centering value for a standard servo.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: wun_fungi [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VPMznXOcJF0fceFIwjjWLvZazrgc_n1KYg8df0S0vVsbrIwtG2cQSiod1MOLNmZtFdjJXzkGPm8bqmqDrHU]sweller@a...[/url
    Sent: Friday, February 06, 2004 7:27 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: Pulsout not working right


    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > That bit of code didnt work for me either. im really starting to
    > think that there is something wrong with my stamp. i just got the
    > thing, and plugged it into the carrier board... that's it... maybe
    > its a defect. i dont know how to check
    >
    > > > -Tim

    750 is a *HUGE* pulse for a servo. A pulse of 100 will get it reasonably
    close to center. 200 may or may not be beyond its upper limit. and you
    <obviously> can't send it a pulse of 0 (zero) in the other. I think
    you're trying to tell the servo to move farther than it can...

    Applicacion note 4: Controlling and Testing Servos - tells you what you
    need to know, right out of the manual. Download it. It's free! :-)

    Stephen Weller
    American. Veteran. Patriot.




    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 16:50
    At 04:09 PM 2/6/04 +0000, Tim wrote:
    >thanks for the help, but im 100% sure that i have a BS2 and im also
    >100% sure that my connections are right. i've checked, and double
    >checked, and triple checked... My servo is on pin 1 right now, i've
    >even tried moving it to different pins and changing to code to see
    >if it will work.... nope still nothing. it seems like ANYTHING that
    >i send to the servo makes it go straight to the left. ALWAYS. i
    >cannot get the servo to move the other way... so, its either 1 of 2
    >things wrong. 1, all three of my servos are bad. 2, my stamp is
    >bad. the stamp is less than 2 weeks old, and the servo im using is
    >less than 2 days old. i have no clue.
    >thanks
    >-tim
    Tim -

    An R/C servo only goes on way. You set the center position with the PULSEOUT
    command and use shorter or longer duration pulses to move from that
    center-point.
    Perhaps that's were the misunderstanding is.

    Bruce Bates




    >--- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
    >wrote:
    >> My understanding is that the servo wants
    >> a 1 mSec pulse to go one way, and a
    >> 2 mSec pulse to go the other way.
    >> A 1.5 mSec pulse should put it in the
    >> middle position. Also, the input line
    >> should be normally LOW, and the pulse
    >> should go high for the desired time.
    >> And, the pulse should be 'refreshed'
    >> every 20 to 50 mSec.
    >>
    >> The above is what your code should do.
    >>
    >> Parallax sells 'modified' servos which
    >> continuously rotate, with direction set
    >> by the pulse.
    >>
    >> If all this is true for your servo,
    >> then the one wild card is how you
    >> specify that pulse.
    >>
    >> PULSOUT 2, 750 on a BS2 will output
    >> a 1500 uSec pulse (since the BS2 units
    >> are in 2 uSec). This should work.
    >>
    >> PULSOUT 2, 750 on a BS2sx will output
    >> a 600 uSec pulse on pin 2
    >> (since the BS2sx uses 0.8 uSec units).
    >> This won't center the servo.
    >>
    >> I'm guessing you either have a BS2sx,
    >> or your servo does not use the
    >> 1 mSec/2 mSec standard, or your
    >> servo is wired to some other pin.
    >> Note pin 12 and pin 13 are standard
    >> on the BOE.
    >>
    >> You probably want:
    >> PULSOUT 12, 1875
    >> to output a 1.5 mSec 'center' pulse
    >> on a BS2sx, on pin 12.
    >>
    >> --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    >> > sorry, but that didnt work. I even manually move the servo to
    >its
    >> > center position, and ran the code, and it just went all the way
    >to
    >> > the left. i dont know what's wrong with it. it does that on
    >all
    >> of
    >> > my servos.
    >> > thanks
    >> >
    >> > --- In basicstamps@yahoogroups.com, "Jon Williams"
    ><jwilliams@p...>
    >> > wrote:
    >> > > Make your servo pin an output low before running your main
    >code.
    >> > >
    >> > > Setup:
    >> > > LOW 1
    >> > >
    >> > > Main:
    >> > > PULSOUT 1, 750
    >> > > PAUSE 20
    >> > > GOTO Main
    >> > >
    >> > >
    >> > > -- Jon Williams
    >> > > -- Applications Engineer, Parallax
    >> > > -- Dallas Office
    >> > >
    >> > >
    >> > >
    Original Message
    >> > > From: Tim [noparse][[/noparse]mailto:tim_korn_99@y...]
    >> > > Sent: Thursday, February 05, 2004 8:52 PM
    >> > > To: basicstamps@yahoogroups.com
    >> > > Subject: [noparse][[/noparse]basicstamps] Pulsout not working right
    >> > >
    >> > >
    >> > > Im trying to control a servo motor, using the PULSOUT
    >command.
    >> Im
    >> > > running a BS2 that is new and im using a brand new servo.
    >Here
    >> is
    >> > a
    >> > > sample of the code i tried.
    >> > > Main:
    >> > > PULSOUT 1, 750
    >> > > PAUSE 20
    >> > > Goto Main
    >> > >
    >> > > No matter what duration a replace the 750 with, it always
    >makes
    >> > the
    >> > > servo go straight to the left and try to keep on going past
    >the
    >> > > stop... I've tried 2 other servos that i own, and it does the
    >> > same
    >> > > thing on them too.... Im running +5v to the servo. i dont
    >know
    >> > > what is wrong.... Any help will be appreciated.
    >> > > Thanks
    >> > > -Tim
    >> > >
    >> > >
    >> > >
    >> > >
    >> > > To UNSUBSCRIBE, just send mail to:
    >> > > basicstamps-unsubscribe@yahoogroups.com
    >> > > from the same email address that you subscribed. Text in the
    >> > Subject
    >> > > and Body of the message will be ignored.
    >> > >
    >> > > Yahoo! Groups Links
    >> > >
    >> > >
    >> > >
    >> > >
    >> > >
    >> > >
    >> > >
    >> > > This message has been scanned by WebShield. Please report SPAM
    >to
    >> > > abuse@p...
    >
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >Yahoo! Groups Links
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 17:07
    nope, i dont have an o-scope, but i think this is a pretty good
    reason to get one. i've checked my voltage to the servo, im getting
    4.95v to it because im using a 5v regulator. i called Parallax tech
    support, and he seems to think that the stamp is working fine. he
    advised me to try some extreme duration numbers for the pulsout. i
    tried everything from 1, to 5000 for the duration. still just
    always to the left. i called the place where i bought the servo,
    and they've never had anyone complain that they didnt work. I cant
    get ahold of the manufacturer though. i'll try again in a little
    while. everything else on the stamp works fine, even on the pin
    that im using for my servo.
    im still stumped.
    thanks
    -tim




    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > No, no, no ... 750 is the correct value to center a standard servo
    with
    > a BS2. The units in the BS2's PULSOUT instruction are two
    microseconds,
    > so PUSLOUT pin, 750 will give you a pulse of 1500 microseconds, or
    1.5
    > milliseconds which is the centering value for a standard servo.
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
    >
    >
    >
    Original Message
    > From: wun_fungi [noparse][[/noparse]mailto:sweller@a...]
    > Sent: Friday, February 06, 2004 7:27 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: Pulsout not working right
    >
    >
    > --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > > That bit of code didnt work for me either. im really starting to
    > > think that there is something wrong with my stamp. i just got
    the
    > > thing, and plugged it into the carrier board... that's it...
    maybe
    > > its a defect. i dont know how to check
    > >
    > > > > -Tim
    >
    > 750 is a *HUGE* pulse for a servo. A pulse of 100 will get it
    reasonably
    > close to center. 200 may or may not be beyond its upper limit. and
    you
    > <obviously> can't send it a pulse of 0 (zero) in the other. I think
    > you're trying to tell the servo to move farther than it can...
    >
    > Applicacion note 4: Controlling and Testing Servos - tells you
    what you
    > need to know, right out of the manual. Download it. It's free! :-)
    >
    > Stephen Weller
    > American. Veteran. Patriot.
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    Subject
    > and Body of the message will be ignored.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
    >
    > This message has been scanned by WebShield. Please report SPAM to
    > abuse@p...
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 17:21
    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > im using a BS2. 750 pulse = 1500. i think you are talking about
    > the BS1 maybe.

    You guys are right. I *was* thinking BS1. And "centered" to me is
    relative. Sorry for the confusion. I go through servos like candy
    (animatronics).

    You probably already know that the servo expects to see a "train" of
    pulses. Even when the sticks on an RC transmitter are centered, it
    still sends pulses to keep the servo from drifting.

    Have you tried adding a 1K pull-down resistor? (I never do) :-P

    Is there noise getting into the signal?

    Is it convenient to take the servo to a hobby shop and ask them to
    test it?

    Stephen Weller
    American. Veteran. Patriot.
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 17:27
    ok, then what is the center point?


    --- In basicstamps@yahoogroups.com, Bruce Bates <bvbates@u...> wrote:
    > At 04:09 PM 2/6/04 +0000, Tim wrote:
    > >thanks for the help, but im 100% sure that i have a BS2 and im
    also
    > >100% sure that my connections are right. i've checked, and
    double
    > >checked, and triple checked... My servo is on pin 1 right now,
    i've
    > >even tried moving it to different pins and changing to code to
    see
    > >if it will work.... nope still nothing. it seems like ANYTHING
    that
    > >i send to the servo makes it go straight to the left. ALWAYS. i
    > >cannot get the servo to move the other way... so, its either 1
    of 2
    > >things wrong. 1, all three of my servos are bad. 2, my stamp is
    > >bad. the stamp is less than 2 weeks old, and the servo im using
    is
    > >less than 2 days old. i have no clue.
    > >thanks
    > >-tim
    > Tim -
    >
    > An R/C servo only goes on way. You set the center position with
    the PULSEOUT command and use shorter or longer duration pulses to
    move from that center-point.
    > Perhaps that's were the misunderstanding is.
    >
    > Bruce Bates
    >
    >
    >
    >
    > >--- In basicstamps@yahoogroups.com, "Allan Lane"
    <allan.lane@h...>
    > >wrote:
    > >> My understanding is that the servo wants
    > >> a 1 mSec pulse to go one way, and a
    > >> 2 mSec pulse to go the other way.
    > >> A 1.5 mSec pulse should put it in the
    > >> middle position. Also, the input line
    > >> should be normally LOW, and the pulse
    > >> should go high for the desired time.
    > >> And, the pulse should be 'refreshed'
    > >> every 20 to 50 mSec.
    > >>
    > >> The above is what your code should do.
    > >>
    > >> Parallax sells 'modified' servos which
    > >> continuously rotate, with direction set
    > >> by the pulse.
    > >>
    > >> If all this is true for your servo,
    > >> then the one wild card is how you
    > >> specify that pulse.
    > >>
    > >> PULSOUT 2, 750 on a BS2 will output
    > >> a 1500 uSec pulse (since the BS2 units
    > >> are in 2 uSec). This should work.
    > >>
    > >> PULSOUT 2, 750 on a BS2sx will output
    > >> a 600 uSec pulse on pin 2
    > >> (since the BS2sx uses 0.8 uSec units).
    > >> This won't center the servo.
    > >>
    > >> I'm guessing you either have a BS2sx,
    > >> or your servo does not use the
    > >> 1 mSec/2 mSec standard, or your
    > >> servo is wired to some other pin.
    > >> Note pin 12 and pin 13 are standard
    > >> on the BOE.
    > >>
    > >> You probably want:
    > >> PULSOUT 12, 1875
    > >> to output a 1.5 mSec 'center' pulse
    > >> on a BS2sx, on pin 12.
    > >>
    > >> --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...>
    wrote:
    > >> > sorry, but that didnt work. I even manually move the servo
    to
    > >its
    > >> > center position, and ran the code, and it just went all the
    way
    > >to
    > >> > the left. i dont know what's wrong with it. it does that on
    > >all
    > >> of
    > >> > my servos.
    > >> > thanks
    > >> >
    > >> > --- In basicstamps@yahoogroups.com, "Jon Williams"
    > ><jwilliams@p...>
    > >> > wrote:
    > >> > > Make your servo pin an output low before running your main
    > >code.
    > >> > >
    > >> > > Setup:
    > >> > > LOW 1
    > >> > >
    > >> > > Main:
    > >> > > PULSOUT 1, 750
    > >> > > PAUSE 20
    > >> > > GOTO Main
    > >> > >
    > >> > >
    > >> > > -- Jon Williams
    > >> > > -- Applications Engineer, Parallax
    > >> > > -- Dallas Office
    > >> > >
    > >> > >
    > >> > >
    Original Message
    > >> > > From: Tim [noparse][[/noparse]mailto:tim_korn_99@y...]
    > >> > > Sent: Thursday, February 05, 2004 8:52 PM
    > >> > > To: basicstamps@yahoogroups.com
    > >> > > Subject: [noparse][[/noparse]basicstamps] Pulsout not working right
    > >> > >
    > >> > >
    > >> > > Im trying to control a servo motor, using the PULSOUT
    > >command.
    > >> Im
    > >> > > running a BS2 that is new and im using a brand new servo.
    > >Here
    > >> is
    > >> > a
    > >> > > sample of the code i tried.
    > >> > > Main:
    > >> > > PULSOUT 1, 750
    > >> > > PAUSE 20
    > >> > > Goto Main
    > >> > >
    > >> > > No matter what duration a replace the 750 with, it always
    > >makes
    > >> > the
    > >> > > servo go straight to the left and try to keep on going past
    > >the
    > >> > > stop... I've tried 2 other servos that i own, and it does
    the
    > >> > same
    > >> > > thing on them too.... Im running +5v to the servo. i dont
    > >know
    > >> > > what is wrong.... Any help will be appreciated.
    > >> > > Thanks
    > >> > > -Tim
    > >> > >
    > >> > >
    > >> > >
    > >> > >
    > >> > > To UNSUBSCRIBE, just send mail to:
    > >> > > basicstamps-unsubscribe@yahoogroups.com
    > >> > > from the same email address that you subscribed. Text in
    the
    > >> > Subject
    > >> > > and Body of the message will be ignored.
    > >> > >
    > >> > > Yahoo! Groups Links
    > >> > >
    > >> > >
    > >> > >
    > >> > >
    > >> > >
    > >> > >
    > >> > >
    > >> > > This message has been scanned by WebShield. Please report
    SPAM
    > >to
    > >> > > abuse@p...
    > >
    > >
    > >
    > >To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > >from the same email address that you subscribed. Text in the
    Subject and Body of the message will be ignored.
    > >
    > >Yahoo! Groups Links
    > >
    > >
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 17:33
    In particular, be sure your 5V ground and your servo ground are tied
    together.

    Al Williams
    AWC
    * Universal Stamp Prototyping Board
    http://www.awce.com/asp3.htm

    Original Message
    From: Chris Savage [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FqVImxR7s4Fz4ycM-5zqjQ4IrMaQQYk7lx90EX3jBzZEmrraKgWO9stzQai_WXgILsLaWj4jDYqfVCvjmk8]knight_designs@y...[/url
    Sent: Friday, February 06, 2004 7:51 AM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Re: Pulsout not working right

    --- Tim <tim_korn_99@y...> wrote:
    > sorry, but that didnt work. I even manually move
    > the servo to its
    > center position, and ran the code, and it just went
    > all the way to
    > the left. i dont know what's wrong with it. it
    > does that on all of
    > my servos.
    > thanks

    Just a thought Tim, but are you certain all your
    connections are right? Are you certain of which wires
    on the servo are for power, ground and signal?



    =====
    Chris Savage
    Knight Designs
    324 West Main Street
    Montour Falls, NY 14865
    (607) 535-6777

    http://www.knightdesigns.com

    __________________________________
    Do you Yahoo!?
    Yahoo! Finance: Get your refund fast by filing online.
    http://taxes.yahoo.com/filing.html


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.

    Yahoo! Groups Links
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 18:02
    Tim-
    Just to quadruple check [noparse]:)[/noparse] could you describe which wires on the servo you
    have connected to power ground and signal.
    Also, describe VSS, Vdd connections if you are using a BOE

    It just sounds like to me the servo is miswired.

    Shawn Lowe
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 19:23
    At 05:27 PM 2/6/04 +0000, Tim wrote:
    >ok, then what is the center point?
    Tim -

    The following is just what Jon Williams has already said:

    "750 is the correct value to center a standard servo with
    a BS2. The units in the BS2's PULSOUT instruction are two microseconds,
    so PUSLOUT pin, 750 will give you a pulse of 1500 microseconds, or 1.5
    milliseconds which is the centering value for a standard servo."

    Bruce Bates


    >--- In basicstamps@yahoogroups.com, Bruce Bates <bvbates@u...> wrote:
    >> At 04:09 PM 2/6/04 +0000, Tim wrote:
    >> >thanks for the help, but im 100% sure that i have a BS2 and im
    >also
    >> >100% sure that my connections are right. i've checked, and
    >double
    >> >checked, and triple checked... My servo is on pin 1 right now,
    >i've
    >> >even tried moving it to different pins and changing to code to
    >see
    >> >if it will work.... nope still nothing. it seems like ANYTHING
    >that
    >> >i send to the servo makes it go straight to the left. ALWAYS. i
    >> >cannot get the servo to move the other way... so, its either 1
    >of 2
    >> >things wrong. 1, all three of my servos are bad. 2, my stamp is
    >> >bad. the stamp is less than 2 weeks old, and the servo im using
    >is
    >> >less than 2 days old. i have no clue.
    >> >thanks
    >> >-tim
    >> Tim -
    >>
    >> An R/C servo only goes on way. You set the center position with
    >the PULSEOUT command and use shorter or longer duration pulses to
    >move from that center-point.
    >> Perhaps that's were the misunderstanding is.
    >>
    >> Bruce Bates
    >>
    >>
    >>
    >>
    >> >--- In basicstamps@yahoogroups.com, "Allan Lane"
    ><allan.lane@h...>
    >> >wrote:
    >> >> My understanding is that the servo wants
    >> >> a 1 mSec pulse to go one way, and a
    >> >> 2 mSec pulse to go the other way.
    >> >> A 1.5 mSec pulse should put it in the
    >> >> middle position. Also, the input line
    >> >> should be normally LOW, and the pulse
    >> >> should go high for the desired time.
    >> >> And, the pulse should be 'refreshed'
    >> >> every 20 to 50 mSec.
    >> >>
    >> >> The above is what your code should do.
    >> >>
    >> >> Parallax sells 'modified' servos which
    >> >> continuously rotate, with direction set
    >> >> by the pulse.
    >> >>
    >> >> If all this is true for your servo,
    >> >> then the one wild card is how you
    >> >> specify that pulse.
    >> >>
    >> >> PULSOUT 2, 750 on a BS2 will output
    >> >> a 1500 uSec pulse (since the BS2 units
    >> >> are in 2 uSec). This should work.
    >> >>
    >> >> PULSOUT 2, 750 on a BS2sx will output
    >> >> a 600 uSec pulse on pin 2
    >> >> (since the BS2sx uses 0.8 uSec units).
    >> >> This won't center the servo.
    >> >>
    >> >> I'm guessing you either have a BS2sx,
    >> >> or your servo does not use the
    >> >> 1 mSec/2 mSec standard, or your
    >> >> servo is wired to some other pin.
    >> >> Note pin 12 and pin 13 are standard
    >> >> on the BOE.
    >> >>
    >> >> You probably want:
    >> >> PULSOUT 12, 1875
    >> >> to output a 1.5 mSec 'center' pulse
    >> >> on a BS2sx, on pin 12.
    >> >>
    >> >> --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...>
    >wrote:
    >> >> > sorry, but that didnt work. I even manually move the servo
    >to
    >> >its
    >> >> > center position, and ran the code, and it just went all the
    >way
    >> >to
    >> >> > the left. i dont know what's wrong with it. it does that on
    >> >all
    >> >> of
    >> >> > my servos.
    >> >> > thanks
    >> >> >
    >> >> > --- In basicstamps@yahoogroups.com, "Jon Williams"
    >> ><jwilliams@p...>
    >> >> > wrote:
    >> >> > > Make your servo pin an output low before running your main
    >> >code.
    >> >> > >
    >> >> > > Setup:
    >> >> > > LOW 1
    >> >> > >
    >> >> > > Main:
    >> >> > > PULSOUT 1, 750
    >> >> > > PAUSE 20
    >> >> > > GOTO Main
    >> >> > >
    >> >> > >
    >> >> > > -- Jon Williams
    >> >> > > -- Applications Engineer, Parallax
    >> >> > > -- Dallas Office
    >> >> > >
    >> >> > >
    >> >> > >
    Original Message
    >> >> > > From: Tim [noparse][[/noparse]mailto:tim_korn_99@y...]
    >> >> > > Sent: Thursday, February 05, 2004 8:52 PM
    >> >> > > To: basicstamps@yahoogroups.com
    >> >> > > Subject: [noparse][[/noparse]basicstamps] Pulsout not working right
    >> >> > >
    >> >> > >
    >> >> > > Im trying to control a servo motor, using the PULSOUT
    >> >command.
    >> >> Im
    >> >> > > running a BS2 that is new and im using a brand new servo.
    >> >Here
    >> >> is
    >> >> > a
    >> >> > > sample of the code i tried.
    >> >> > > Main:
    >> >> > > PULSOUT 1, 750
    >> >> > > PAUSE 20
    >> >> > > Goto Main
    >> >> > >
    >> >> > > No matter what duration a replace the 750 with, it always
    >> >makes
    >> >> > the
    >> >> > > servo go straight to the left and try to keep on going past
    >> >the
    >> >> > > stop... I've tried 2 other servos that i own, and it does
    >the
    >> >> > same
    >> >> > > thing on them too.... Im running +5v to the servo. i dont
    >> >know
    >> >> > > what is wrong.... Any help will be appreciated.
    >> >> > > Thanks
    >> >> > > -Tim
    >> >> > >
    >> >> > >
    >> >> > >
    >> >> > >
    >> >> > > To UNSUBSCRIBE, just send mail to:
    >> >> > > basicstamps-unsubscribe@yahoogroups.com
    >> >> > > from the same email address that you subscribed. Text in
    >the
    >> >> > Subject
    >> >> > > and Body of the message will be ignored.
    >> >> > >
    >> >> > > Yahoo! Groups Links
    >> >> > >
    >> >> > >
    >> >> > >
    >> >> > >
    >> >> > >
    >> >> > >
    >> >> > >
    >> >> > > This message has been scanned by WebShield. Please report
    >SPAM
    >> >to
    >> >> > > abuse@p...
    >> >
    >> >
    >> >
    >> >To UNSUBSCRIBE, just send mail to:
    >> > basicstamps-unsubscribe@yahoogroups.com
    >> >from the same email address that you subscribed. Text in the
    >Subject and Body of the message will be ignored.
    >> >
    >> >Yahoo! Groups Links
    >> >
    >> >
    >> >
    >> >
    >
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.
    >
    >Yahoo! Groups Links
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 19:32
    red wire to +5v and black wire to ground. the grayish wire is the
    signal wire. it is connected to pin 1 on my stamp. sound right to
    you?





    --- In basicstamps@yahoogroups.com, "Shawn Lowe" <livinlowe@e...>
    wrote:
    >
    > Tim-
    > Just to quadruple check [noparse]:)[/noparse] could you describe which wires on the
    servo you
    > have connected to power ground and signal.
    > Also, describe VSS, Vdd connections if you are using a BOE
    >
    > It just sounds like to me the servo is miswired.
    >
    > Shawn Lowe
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 20:24
    You don't need to go out and get an O-Scope quite yet. Get Winscope
    (find URL by googling on "WinScope 2.51"), connect it (your circuit)
    to your sound card (you'll need a headphone patch cable and a small
    jack, or alligator clips at worst), and watch the signal pin through
    a 10k resistor. If you don't see a 50 Hz 1.5 ms signal (at
    Pulseout1, 750) and a 1.0 ms signal and a 2.0 ms signal at the other
    extremes, you got a problem with your stamp or program. I went
    through this experiment/exercise several weeks ago - solved my
    problem in 30 minutes. Winscope is super easy to use. Invented by a
    Russian scientist - go get it.

    If the signal looks good, then there might be a problem with your
    Servo, but all 3 ??? Not likely, eh, but to test the Servo
    separately you could build a small circuit from a couple of 555
    timer chips. See this URL for such a circuit
    http://www.seattlerobotics.org/encoder/200210/servoex/ServoExcerciser
    .htm

    Now if your Stamp puts out the right signal, and the servos don't
    work right, and the 555 Circuit puts out the right signal (assuming
    it's assembled right - but hey you got WinScope to test it with) and
    the servos still don't work, you got a wiring problem, or you burned
    out all three servos. Laws of deduction rule




    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > nope, i dont have an o-scope, but i think this is a pretty good
    > reason to get one. i've checked my voltage to the servo, im
    getting
    > 4.95v to it because im using a 5v regulator. i called Parallax
    tech
    > support, and he seems to think that the stamp is working fine. he
    > advised me to try some extreme duration numbers for the pulsout.
    i
    > tried everything from 1, to 5000 for the duration. still just
    > always to the left. i called the place where i bought the servo,
    > and they've never had anyone complain that they didnt work. I
    cant
    > get ahold of the manufacturer though. i'll try again in a little
    > while. everything else on the stamp works fine, even on the pin
    > that im using for my servo.
    > im still stumped.
    > thanks
    > -tim
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 21:56
    The next most common cause of this behavior
    is that the Stamp is being 'browned-out'
    when it tries to control the servo. Note
    the servo can take 35 mA when it's being
    moved. If you're driving the servo with
    4.9 volts, what is the Stamp getting?

    Are you using a BOE?
    Are you really using a 5-volt DC supply?
    (I think a BOE needs at LEAST a 6 Volt).



    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > red wire to +5v and black wire to ground. the grayish wire is the
    > signal wire. it is connected to pin 1 on my stamp. sound right to
    > you?
    >
    >
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "Shawn Lowe" <livinlowe@e...>
    > wrote:
    > >
    > > Tim-
    > > Just to quadruple check [noparse]:)[/noparse] could you describe which wires on the
    > servo you
    > > have connected to power ground and signal.
    > > Also, describe VSS, Vdd connections if you are using a BOE
    > >
    > > It just sounds like to me the servo is miswired.
    > >
    > > Shawn Lowe
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-06 23:41
    i did just that. i took the servo to a hobby shop and had them test
    it. they hooked it up to a radio and receiver, and bam, it worked.
    both ways, just like it should. that means its my stamp. i know
    the I/O pins arent dead, cuz they do everything else that i want
    them to, such as frequency out and light up an LED. im using a
    separate power source for the servos. i've got a 7.2v battery pack
    hooked to a 5v regulator. that's how im getting the 5v to the
    servos. the BSII itself is running on a fresh 9v battery. where
    could some noise be coming from? how would i isolate it?
    im using a regular ol' BS2 carrier board, not the BOE.
    thanks
    -tim


    --- In basicstamps@yahoogroups.com, "wun_fungi" <sweller@a...> wrote:
    > --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > > im using a BS2. 750 pulse = 1500. i think you are talking
    about
    > > the BS1 maybe.
    >
    > You guys are right. I *was* thinking BS1. And "centered" to me is
    > relative. Sorry for the confusion. I go through servos like candy
    > (animatronics).
    >
    > You probably already know that the servo expects to see a "train"
    of
    > pulses. Even when the sticks on an RC transmitter are centered, it
    > still sends pulses to keep the servo from drifting.
    >
    > Have you tried adding a 1K pull-down resistor? (I never do) :-P
    >
    > Is there noise getting into the signal?
    >
    > Is it convenient to take the servo to a hobby shop and ask them to
    > test it?
    >
    > Stephen Weller
    > American. Veteran. Patriot.
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-07 00:53
    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > servos. the BSII itself is running on a fresh 9v battery. where
    > could some noise be coming from? how would i isolate it?

    Since you're running both off batteries, that pretty much eliminates a
    noise problem.

    If you pulsout to an LED you should be able to ramp it up from off to
    full on and back down - exactly the same way you'd sweep the servo
    from stop to stop.

    Someone else had asked, is the servo ground connected to the stamp
    ground?

    7.2 volts? Hmm. I have serious doubts that servos are *that* picky,
    but it wouldn't hurt to run up to Rat Shack and get a 4-cell AA
    holder. I always run servos off 6 volts.

    Running out of options fast! :-P Grasping at straws.

    Stephen Weller
    American. Veteran. Patriot.
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-07 03:21
    --- Tim <tim_korn_99@y...> wrote:
    > thanks for the help, but im 100% sure that i have a
    > BS2 and im also
    > 100% sure that my connections are right. i've
    > checked, and double
    > checked, and triple checked... My servo is on pin 1
    > right now, i've
    > even tried moving it to different pins and changing
    > to code to see
    > if it will work.... nope still nothing. it seems
    > like ANYTHING that
    > i send to the servo makes it go straight to the
    > left. ALWAYS. i
    > cannot get the servo to move the other way... so,
    > its either 1 of 2
    > things wrong. 1, all three of my servos are bad.
    > 2, my stamp is
    > bad. the stamp is less than 2 weeks old, and the
    > servo im using is
    > less than 2 days old. i have no clue.
    > thanks
    > -tim

    One last thing Tim, what are you using for the Power
    Supply? On one occasion, I had a servo moving reset
    my BS2 occasionally. Was a weak supply. Not sure if
    that would cause what you're getting, but it's a
    suggestion, nonetheless...



    =====
    Chris Savage
    Knight Designs
    324 West Main Street
    Montour Falls, NY 14865
    (607) 535-6777

    http://www.knightdesigns.com

    __________________________________
    Do you Yahoo!?
    Yahoo! Finance: Get your refund fast by filing online.
    http://taxes.yahoo.com/filing.html
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-07 03:53
    i called Parallax tech support again, and he thought it may be a
    noise problem, so after i got off the phone, i routed the ATN wire
    from the serial cable through 2 0.1UF capacitors just like the board
    of education uses. he said that might fix it. well, ummmm.. nope.
    didnt help a bit. i am using a 7.2v battery pack to power the
    servo, BUT it is going through a 5v regulator. so my servo is
    getting real close to 5volts.
    on another note, i know for sure that the servo is good, because i
    tested it on a R/C receiver. and the Parallax tech guy says that
    the stamp is good, because other functions work off of that pin. im
    running out of options too...... the servo ground is not connected
    to the stamp ground right now, but im going to go try it now.
    thanks for the help guys
    -tim


    --- In basicstamps@yahoogroups.com, "wun_fungi" <sweller@a...> wrote:
    > --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:
    > > servos. the BSII itself is running on a fresh 9v battery.
    where
    > > could some noise be coming from? how would i isolate it?
    >
    > Since you're running both off batteries, that pretty much
    eliminates a
    > noise problem.
    >
    > If you pulsout to an LED you should be able to ramp it up from off
    to
    > full on and back down - exactly the same way you'd sweep the servo
    > from stop to stop.
    >
    > Someone else had asked, is the servo ground connected to the stamp
    > ground?
    >
    > 7.2 volts? Hmm. I have serious doubts that servos are *that* picky,
    > but it wouldn't hurt to run up to Rat Shack and get a 4-cell AA
    > holder. I always run servos off 6 volts.
    >
    > Running out of options fast! :-P Grasping at straws.
    >
    > Stephen Weller
    > American. Veteran. Patriot.
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-07 09:54
    > "Shawn Lowe" <livinlowe@e... wrote:
    >>
    >> Just to quadruple check [noparse]:)[/noparse] could you describe which wires on the
    >> servo you have connected to power ground and signal.
    >> Also, describe VSS, Vdd connections if you are using a BOE
    >>
    >> It just sounds like to me the servo is miswired.

    From: "Tim" <tim_korn_99@y...>

    > red wire to +5v and black wire to ground. the grayish wire
    > is the signal wire. it is connected to pin 1 on my stamp.
    > sound right to you?

    No, actually. It bothers me as it does Shawn. It's almost certain that your
    problem lies in the wiring. Possibly in the power arrangements. I don't
    recognize that wiring color pattern, and some manufacturers have peculiar
    notions. Not every engineer in the world agrees with US conventions.

    More to the point, if we're going to be any help we can't keep playing
    twenty questions, Tim. Can you be specific about these following points?

    1. What is the manufacturer and model number of these servos? What do they
    specify as the order of the wires starting from one side? Does it go G-V-S,
    or S-G-V or what?

    2. In the likely case that their order for the wires in the connector does
    not match Futaba, then how are they wired without using the standard
    Parallax connectors? (The standard connectors on all my Parallax boards use
    the Futaba wiring pattern. I presume all Parallax boards do.) Are you
    inserting solid wires in the end of the servo connector and taking those to
    a prototype area? Or have you removed the connector and soldered directly to
    the servo wires? How have you handled this problem? Have you torn all this
    out and re-wired from scratch to see if it's a bad connection we're dealing
    with here?

    3. Are you willing to run a couple of experiments that any of us would run
    on site to diagnose this problem? Then try this:

    Using a 5V supply for the servos is an odd choice. Hopefully, you don't mean
    you're running the servo off the Vcc provided by the Stamp's regulator. If
    not, if you are using a completely separate supply for the servo, then that
    adds another whole set of potential problems. Drop that approach for testing
    purposes. Connect the servo to the battery source supporting the BS2, and
    change that source to one using four AA's. That will make the Stamp
    regulator just as happy as a 9V battery would, and the servo circuits also
    will be fine with an unregulated source around 6V.

    Now, with that done, what is the behavior when you connect in the usual
    pattern? By that I mean the BS2 is running off it's own power regulator;
    that regulator is supplied by four fresh AA's; and the same Vin from those
    AA's, the raw battery voltage, is providing the power line to the servo. Oh,
    yes. And don't use your own software. Download one of Jon's programs, just
    in case a coding error is keeping that PULSOUT command from being the one
    that actually executes.

    The only result consistent from everything you've told us is that the servo
    will behave correctly at this point. Now we start adding back complexity
    until we find the problem.

    Speaking as a past test engineer, this sounds like almost enough trouble to
    get an answer. Sorry, but Murphy was right you know. Seriously, you have
    independently tested the servos; and independently tested the Stamp. That
    leaves only your configuration: the choice of power arrangements and the
    wiring and anything else you haven't mentioned yet. Get back to a simple
    known-good configuration first. Then build back to your desired
    configuration.

    Hope we can help you eventually,

    Gary
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-07 13:39
    --- In basicstamps@yahoogroups.com, "Tim" <tim_korn_99@y...> wrote:

    > running out of options too...... the servo ground is not connected
    > to the stamp ground right now, but im going to go try it now.


    At the risk of sounding overly optimistic:

    B-I-N-G-O!!! E-U-R-E-K-A!!! Y-I-P-P-I-E S-K-I-P-P-I-E!!!

    The servo and the stamp *MUST* have a common ground!

    Well? C'mon, Tim! We're waiting... :-)

    Stephen Weller
    American. Veteran. Patriot.
Sign In or Register to comment.