Shop OBEX P1 Docs P2 Docs Learn Events
Model Trains — Parallax Forums

Model Trains

DFDDFD Posts: 2
edited 2005-11-30 20:05 in BASIC Stamp
I want to automate a model train layout.· I·want to install some sensors along the tracks that will sense the trains motion and then switch the track up ahead.· Anyone do this yet?

Dave

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2005-11-30 14:55
    I haven't done this, but it doesn't sound too difficult. I would look at a short range IR Emitter/Detector pair. Here is one that Parallax sells, but it might be too big --> (http://www.parallax.com/detail.asp?product_id=555-27401). The set up would be to have it mounted under the train layout with a small hole drilled in between two track ties. The sensor should be able to pick up a reflection from the train driving over it.
  • John R.John R. Posts: 1,376
    edited 2005-11-30 15:33
    There are a number of possible detection schemes used in model railroading, including IR Emitter/Decectors, as well as current sensors, etc. "Normally" these are not tied to Microprocessors by the railroaders, but that is probably because most assume it beyond their capabilities, or think it would add unnecessary complications to what they want to do (run signals, indicator lights, etc. In fact some of the commercial signally applications certainly have some type of micro processor involved.

    The point of my post is to help direct Dave to the other Model Railroad resources for the detector portion. Look for block detectors, occupancy detectors, etc. Don't worry about what people are doing (or not doing) with them, but there are a number of useful ways folks have come up with the sense when/where a train is. Take the sensor part of these projects, and apply it to your STAMP project.

    If you need more pointers on where to find this stuff, let me know and I'll dig some stuff up from home. I'm at work now, and can't get into that now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-11-30 17:23
    Don Buczynski -- http://www.geocities.com/donbuczynski/DnB_rr/DnB_Frame.html

    He's done all of this with a BS2 and a lot of TIP120's. Check it out.

    I believe he used IR-emitter-detector pairs to sense train positions.
  • Clock LoopClock Loop Posts: 2,069
    edited 2005-11-30 19:16
    Make sure you know about Shift registers before you do this.

    The shiftregisters will save you ALOT of time wiring up your layout.

    If you only have a single train, on a single track loop, then the shift registers won't help you much, but if you have block track layout and multiple engines running on the same layout, you will need to use shiftregisters.

    You can use 74HC595's for sending speed, and direction, and turning on various lights, and effects.
    This is a parallel OUT, serial IN shift register.

    And you can use 74HC597's (or 74HC165's) for detecting things and just getting information back into the stamp from your layout.
    This is a parallel IN, serial OUT shift register.

    These two chip types will allow you to communicate with your Layout only using 3 or 4 pins coming from your stamp. Shift registers allow one to get really creative with their stamps all while not using up all pinouts from the stamp. (which is eaisly done on an average sized layout, especially if you have BLOCK type layout (the kind that allow multiple trains on the same track path)
  • DFDDFD Posts: 2
    edited 2005-11-30 20:05
    Thanks for the feedback.

    Dave
Sign In or Register to comment.