Skip to main content

Reply to "TMCC Control With Arduino"

Thanks Randy for your comments.  I'll look into an alternate to the ID-20.  Where can I buy transmitter "buttons" cheaply as I better get 30?  All engines (Legacy, TMCC, LC+, conventional) will have RFID "buttons".  An array in the Arduino will have static info on each engine and when an new engine is given an RFID I'll add that RFID to an array that maps RFID to engine array index.  So there should never be the case that a unknown engine is encountered. 

All trains have their own siding so there are no trains on our long main line loop at startup.  To start up a session you power up an engine (full train) siding and pull it out on the main line at a random medium speed.  Once that one has cleared you bring out train number two, with enough space to avoid collision until they sync up.  Then start train #3 and so on.  Once train 1 passes the RFID sensor it is identified (RFID sensor in block 2) it's placed in a 12 position "block occupancy" array".  Occupancy is detected in all 12 blocks by detecting current with Hall-Effect current sensors, hence no voltage drop, and an occupancy map is updated in the Arduino.  So when block 3 shows "occupied" the engine index for the train in block 2 is sequenced into block 3, etc. 

So at any given time the Arduino knows which blocks are occupied and by which train.  Any "unidentified" train means a mess-up on my part and a fault is thrown and the TMCC HALT button is thrown by the Arduino.  These are the data structures I'm building up now.  I'll also measure scale speed of each train in block 2 and display it.  If I detect that the train behind the current train in block 2 (hence block 1) is gaining on it and is getting arbitrarily "too close" I want to send the following train (if its TMCC or Legacy) a relative "slow down" command, the duration of which is determined empirically, unique to each engine, and stored in the engine array.  If the next time around it still not slow enough I'll hit it again with a slowdown sequence.  What do you think of this paradigm?

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×