Shop OBEX P1 Docs P2 Docs Learn Events
Complete Newbie wants to test understanding :) — Parallax Forums

Complete Newbie wants to test understanding :)

ArchiverArchiver Posts: 46,084
edited 2003-04-19 16:33 in General Discussion
Hi all! Been lurking a while, unabashedly stealing all kinds of neat
ideas. [noparse]:)[/noparse]

Have a project I'm considering, and I'd like some input from the
experts to let me know if I'm even close to the right track, or way
off base.

Project is an indexing system for a model railroad turntable. (Yeah,
I know, I can buy one cheaper than it'll cost me to build it, but
where's the fun in that??)

Basic Requirements:

Run a 12V DC motor. Speed and Direction control would be nice, but
not strictly necessary.

Stop the motor when the light of an infrared sensor pair is
interrupted by, say, a block of wood on the bottom of the turntable
rotating past.

Allow the turntable to continue past an interruption if a pushbutton
is being held down at the time the beam is broken...allowing the
turntable to "skip" an index, and proceed to the next.

My thinking on this is that I should be able to do this with the
following, or something close:

12V DC motor and 12V power supply

A BS2

Some sort of infrared sensor pair with an open collector that either
goes low or high when the beam is interrupted. (Have found such a
pair for ~$15)

An L293D motor driver. This would provide directional, but not speed
control if I understand things correctly?

A push button

Basically, my thinking is I could use one BS2 input, connected to the
sensor's output, and monitor it for a signal. As long as a signal
was present, spin the motor. I could choose motor direction with
something as simple as a toggle switch, or some other condition I
could later set to be monitored on nother input. The pushbutton
would force the sensor circuit to be closed, and thus high,
regardless of the sensor's state. Finally, 3 BS2 outputs would be
used to control the L293D, which then has plenty of power (voltage
AND current) to drive a simple DC hobby motor.

So, great and wise experts...am i loony tunes, or on something that
resembles the right track? I'm more than willing to do the research
and put out the effort necessary to learn my way around PBasic,
troubleshooting, etc. But it sure would be nice to know I'm not
heading in totally the wrong direction before I drop $100 or so into
this to get started. [noparse]:)[/noparse]

Thanks in advance to anyone who responds, and I appologize for the
long post first time out.

gb

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-04-18 01:46
    As they say in Congress, the devil is in the details. But it does sound
    like you are on the right track -- pun intended. Just take it one small
    function at a time and you should be fine. The only big item I don't see is
    a breadboard to build the prototype. If you don't already have one, I
    suggest the Board of Education Complete Kit because it provides everything
    you need to program your stamp, including the BS2. Then you can add your
    sensors, switches and motor control one step at a time. You'll also need a
    small assortment of resistors and capacitors.

    Have fun! Post some pictures when you get it working. I love model
    railroads.

    -- Al Margolis, founder
    www.hobbyengineering.com
    The WEB's newest source for robotics supplies and information

    Original Message
    From: gboulton3nf [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=EPGUDleF0IfIwTlG7u1UGomwL2GJkCvDNAkPK9f6_IQjNYxISCFTkSLdg1iweP9YIX4ngwBl82MI-NDk1Q]gboulton@p...[/url
    Sent: Thursday, April 17, 2003 5:33 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Complete Newbie wants to test understanding [noparse]:)[/noparse]


    Hi all! Been lurking a while, unabashedly stealing all kinds of neat
    ideas. [noparse]:)[/noparse]

    Have a project I'm considering, and I'd like some input from the
    experts to let me know if I'm even close to the right track, or way
    off base.

    Project is an indexing system for a model railroad turntable. (Yeah,
    I know, I can buy one cheaper than it'll cost me to build it, but
    where's the fun in that??)

    Basic Requirements:

    Run a 12V DC motor. Speed and Direction control would be nice, but
    not strictly necessary.

    Stop the motor when the light of an infrared sensor pair is
    interrupted by, say, a block of wood on the bottom of the turntable
    rotating past.

    Allow the turntable to continue past an interruption if a pushbutton
    is being held down at the time the beam is broken...allowing the
    turntable to "skip" an index, and proceed to the next.

    My thinking on this is that I should be able to do this with the
    following, or something close:

    12V DC motor and 12V power supply

    A BS2

    Some sort of infrared sensor pair with an open collector that either
    goes low or high when the beam is interrupted. (Have found such a
    pair for ~$15)

    An L293D motor driver. This would provide directional, but not speed
    control if I understand things correctly?

    A push button

    Basically, my thinking is I could use one BS2 input, connected to the
    sensor's output, and monitor it for a signal. As long as a signal
    was present, spin the motor. I could choose motor direction with
    something as simple as a toggle switch, or some other condition I
    could later set to be monitored on nother input. The pushbutton
    would force the sensor circuit to be closed, and thus high,
    regardless of the sensor's state. Finally, 3 BS2 outputs would be
    used to control the L293D, which then has plenty of power (voltage
    AND current) to drive a simple DC hobby motor.

    So, great and wise experts...am i loony tunes, or on something that
    resembles the right track? I'm more than willing to do the research
    and put out the effort necessary to learn my way around PBasic,
    troubleshooting, etc. But it sure would be nice to know I'm not
    heading in totally the wrong direction before I drop $100 or so into
    this to get started. [noparse]:)[/noparse]

    Thanks in advance to anyone who responds, and I appologize for the
    long post first time out.

    gb


    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 2003-04-18 01:53
    In a message dated 4/17/2003 5:34:46 PM Pacific Daylight Time,
    gboulton@p... writes:

    > Thanks in advance to anyone who responds, and I appologize for the
    > long post first time out.
    >
    > gb
    >

    Sounds like a simple task for a BS2. What you described sounds like you want
    to control a motor based simply on 2 or 3 TTL level inputs.

    The BS2 (or BS1) should easily handle this job.....

    Ken


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-04-18 15:16
    GB,

    A month or few back, another person on the list was doing a RR project
    similar to this. He had said that lining up IR sensor was a pain on the
    train ;-)

    I thought a Hall sensor might be better than IR. The hall sensor would be
    able to detect the magnets in the locomotive. It would also be easy to put
    tiny NIB magnets on any car you wanted to detect. You could even do things
    like calculate speed, determine how many car are in a train , all sorts of
    stuff. This set up should be easier to hide than a IR gate, and no alignment
    issues.

    I'm not sure if he went with Hall sensors or IR, but look up in the archives
    and get hold of him, as model RR guy who is into Stamps, I'm sure he will
    have all kinds of good ideas for you.

    Jonathan

    www.madlabs.info

    Original Message
    From: "gboulton3nf" <gboulton@p...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, April 17, 2003 5:32 PM
    Subject: [noparse][[/noparse]basicstamps] Complete Newbie wants to test understanding [noparse]:)[/noparse]


    > Hi all! Been lurking a while, unabashedly stealing all kinds of neat
    > ideas. [noparse]:)[/noparse]
    >
    > Have a project I'm considering, and I'd like some input from the
    > experts to let me know if I'm even close to the right track, or way
    > off base.
    >
    > Project is an indexing system for a model railroad turntable. (Yeah,
    > I know, I can buy one cheaper than it'll cost me to build it, but
    > where's the fun in that??)
    >
    > Basic Requirements:
    >
    > Run a 12V DC motor. Speed and Direction control would be nice, but
    > not strictly necessary.
    >
    > Stop the motor when the light of an infrared sensor pair is
    > interrupted by, say, a block of wood on the bottom of the turntable
    > rotating past.
    >
    > Allow the turntable to continue past an interruption if a pushbutton
    > is being held down at the time the beam is broken...allowing the
    > turntable to "skip" an index, and proceed to the next.
    >
    > My thinking on this is that I should be able to do this with the
    > following, or something close:
    >
    > 12V DC motor and 12V power supply
    >
    > A BS2
    >
    > Some sort of infrared sensor pair with an open collector that either
    > goes low or high when the beam is interrupted. (Have found such a
    > pair for ~$15)
    >
    > An L293D motor driver. This would provide directional, but not speed
    > control if I understand things correctly?
    >
    > A push button
    >
    > Basically, my thinking is I could use one BS2 input, connected to the
    > sensor's output, and monitor it for a signal. As long as a signal
    > was present, spin the motor. I could choose motor direction with
    > something as simple as a toggle switch, or some other condition I
    > could later set to be monitored on nother input. The pushbutton
    > would force the sensor circuit to be closed, and thus high,
    > regardless of the sensor's state. Finally, 3 BS2 outputs would be
    > used to control the L293D, which then has plenty of power (voltage
    > AND current) to drive a simple DC hobby motor.
    >
    > So, great and wise experts...am i loony tunes, or on something that
    > resembles the right track? I'm more than willing to do the research
    > and put out the effort necessary to learn my way around PBasic,
    > troubleshooting, etc. But it sure would be nice to know I'm not
    > heading in totally the wrong direction before I drop $100 or so into
    > this to get started. [noparse]:)[/noparse]
    >
    > Thanks in advance to anyone who responds, and I appologize for the
    > long post first time out.
    >
    > gb
    >
    >
    > 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 2003-04-19 16:33
    Hello again!

    Wanted to thank all of you who took the time to provide some input.

    As it turns out, I've found a considerably less expensive way to
    accomplish the task, using an old stepper motor and control circuitry
    from old 5 1/4" floppy drives. The prototype system is about 90%
    complete, with only a few minor bugs left to be worked out. If any
    railroaders out there are interested in the process, give me an e-
    mail @ gboulton@i...

    Thanks again to all of you who helped out, and gave some insight.
    I'm sure I'll keep lurking, as I have future projects for which a BS2
    would be perfect.

    gb

    --- In basicstamps@yahoogroups.com, "gboulton3nf" <gboulton@p...>
    wrote:
    > Hi all! Been lurking a while, unabashedly stealing all kinds of
    neat
    > ideas. [noparse]:)[/noparse]
    >
    > Have a project I'm considering, and I'd like some input from the
    > experts to let me know if I'm even close to the right track, or way
    > off base.
    >
    > Project is an indexing system for a model railroad turntable.
    (Yeah,
    > I know, I can buy one cheaper than it'll cost me to build it, but
    > where's the fun in that??)
    >
    ....
    > Thanks in advance to anyone who responds, and I appologize for the
    > long post first time out.
    >
    > gb
Sign In or Register to comment.