Shop OBEX P1 Docs P2 Docs Learn Events
model railroading — Parallax Forums

model railroading

SuperwormsSuperworms Posts: 118
edited 2006-05-28 20:24 in BASIC Stamp
does anyone have any ides for interfaceing a BS2 to a model railroad for taskes such as locomative detetion using ir led`s and ir decters·and possibly montering the speed and posting it on a scrolling sign.

Post Edited (superworms) : 5/27/2006 10:38:13 PM GMT

Comments

  • JonathanJonathan Posts: 1,023
    edited 2006-05-28 13:51
    Super,

    There are infinite possibilities with model railroading and the Stamp. Both of your ideas are easily possible. I would reccomend downloading "What's a Microcontroller", which is available on this site. It will walk you through learning the basics (pun intended) on the Stamp. Once you have done that, you will have LOTS of ideas for model railroading. You might also look through the archives for other railroad projects.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-28 20:24
    Easy ways of monitoring where trains are(and to calculate speed based on known loacation and time) is to place a magnet in the bottom of the trains and Reed-relays under the tracks. When the train passes over, the magnet closes the relay.
    To filter the input(it will be rather 'noisy'), I have used a 74LS14(Hex Schmitt trigger), a 150nF cap and a 12Kohm resistor.
    Connect the relay between the input8of the 74LS14) and GND, place the cap parallel to it, and the Resistor goes between the input(of the 74LS14) and 5V.

    It worked OK on my bicycle computer, so I see no reason why it shouldn't work on your railroad.
    (I only used it once as the LS type ICs emptied the 9V battery very quickly. I had plans of rebuilding it using AH or AHC chips but never got around to it)

    Edit:
    As for detecting which train is where, that can be done by placing more than one magnet in the train(a pattern of long and short gaps) and running the train past a sensor at a known speed.

    I don't have any experience with IR LEDs so can't offer much advice there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...

    Post Edited (Gadgetman) : 5/28/2006 8:30:01 PM GMT
Sign In or Register to comment.