Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing w/RC Receiver — Parallax Forums

Interfacing w/RC Receiver

ArchiverArchiver Posts: 46,084
edited 2002-05-28 06:03 in General Discussion
Hello,

I am considering purchasing the Basic Stamp 2SX for use in a project
that I am working on, but I would like some expert opinion about it's
abilities.

Here is a list of what I am trying to do:

1)Decode 2 channels of a Remote Control signal (1-2ms pulses centered
at ~1.5ms and repeated each 20-30ms) so that I can use this data to
drive a pair of motors via PWM output to a pair of H-Bridge circuts
for "tank like" operation of a model.

2) Capture data from 2 encoders so that I can preform corrections on
the drive motors (ex. in case one motor tends to run faster than the
other, so I can keep it going straight when there is no reason for it
to be turning).

Anybody know if I am looking at the correct device to accomplish
this, or should I be looking at something else?

If this is possible, has anyone done any thing like this and have any
helpful hints or gotcha's to avoud?

Thanks,
Mike

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-05-27 23:47
    When I was an Instructor at Cincinnati Milacron's Industrial Robot
    classes, the students would usually want to know who was the expert.
    The general reply was that an 'ex' is an old has been and a 'spert' is a
    drip under pressure. Never the less, seems like a standard radio remote
    control does exactly the job of item #1. Item #2 sounds lie a
    sophisticated control algorithm, that is probable more in line with a
    PIC or a dedicated CPU. Can you do this job with a 2sx? I doubt anyone
    here will say yes or no. They would probably give you a guess, but
    that's all.

    This program will control two servos connected to a BS2, this I have
    tried.

    HTH

    leroy

    ' Program: PULSOUT.BS2
    '
    ' This program moves a servo on pin 0 & 3. Connect the servo to I/O
    ' pin 0 & 3.

    ' {$STAMP BS2} ' STAMP directive (specifies a BS2)

    x var word

    Again:

    high 1
    pause 225
    low 1
    pause 225


    if in2 = 0 then again

    high 1
    for x = 100 to 1300 step 30
    PULSOUT 0, x
    PAUSE 25
    PULSOUT 3, x
    debug "x: ", dec x, cr

    next

    low 1

    for x = 1300 to 100 step 30
    PULSOUT 0, x
    PAUSE 25
    PULSOUT 3, x
    'debug "x: ", dec x, cr
    next

    GOTO Again


    mfl_jr wrote:
    >
    > Hello,
    >
    > I am considering purchasing the Basic Stamp 2SX for use in a project
    > that I am working on, but I would like some expert opinion about it's
    > abilities.
    >
    > Here is a list of what I am trying to do:
    >
    > 1)Decode 2 channels of a Remote Control signal (1-2ms pulses centered
    > at ~1.5ms and repeated each 20-30ms) so that I can use this data to
    > drive a pair of motors via PWM output to a pair of H-Bridge circuts
    > for "tank like" operation of a model.
    >
    > 2) Capture data from 2 encoders so that I can preform corrections on
    > the drive motors (ex. in case one motor tends to run faster than the
    > other, so I can keep it going straight when there is no reason for it
    > to be turning).
    >
    > Anybody know if I am looking at the correct device to accomplish
    > this, or should I be looking at something else?
    >
    > If this is possible, has anyone done any thing like this and have any
    > helpful hints or gotcha's to avoud?
    >
    > Thanks,
    > Mike
    >
    > 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.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2002-05-28 06:03
    Well said, Leroy. But as an 'old drip under pressure' to do several
    things at once on past projects, I've adopted the philosophy of adding
    extra PICs in a master-slave configuration to get the job(s) done.
    Works every time. So Mike, you might consider adding one or more BS1s,
    communicating with your 2SX, if necessary, to accomplish 2-channel
    decoding in addition to driving a pair of motors.

    Dennis

    Original Message
    From: Leroy Hall [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=8su1Wmdyf4IF0zye8qfwGnP_4gJT1A4v0wrzUcAi_Cw58S7YLj-XAANTHExOKu3FJa-35SwiMA]leroy@f...[/url
    Sent: Monday, May 27, 2002 3:48 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Interfacing w/RC Receiver


    When I was an Instructor at Cincinnati Milacron's Industrial Robot
    classes, the students would usually want to know who was the expert.
    The general reply was that an 'ex' is an old has been and a 'spert' is a
    drip under pressure. Never the less, seems like a standard radio remote
    control does exactly the job of item #1. Item #2 sounds lie a
    sophisticated control algorithm, that is probable more in line with a
    PIC or a dedicated CPU. Can you do this job with a 2sx? I doubt anyone
    here will say yes or no. They would probably give you a guess, but
    that's all.

    This program will control two servos connected to a BS2, this I have
    tried.
    <deleted>
    mfl_jr wrote:
    >
    > Hello,
    >
    > I am considering purchasing the Basic Stamp 2SX for use in a project
    > that I am working on, but I would like some expert opinion about it's
    > abilities.
    >
    > Here is a list of what I am trying to do:
    >
    > 1)Decode 2 channels of a Remote Control signal (1-2ms pulses centered
    > at ~1.5ms and repeated each 20-30ms) so that I can use this data to
    > drive a pair of motors via PWM output to a pair of H-Bridge circuts
    > for "tank like" operation of a model.
    >
    > 2) Capture data from 2 encoders so that I can preform corrections on
    > the drive motors (ex. in case one motor tends to run faster than the
    > other, so I can keep it going straight when there is no reason for it
    > to be turning).
    >
    > Anybody know if I am looking at the correct device to accomplish this,

    > or should I be looking at something else?
    >
    > If this is possible, has anyone done any thing like this and have any
    > helpful hints or gotcha's to avoud?
    >
    > Thanks,
    > Mike
    >
    > 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.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/


    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.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
Sign In or Register to comment.