Skip to main content

Reply to "TMCC Control With Arduino"

Don, one of the approaches that I considered for registering trains into the system is similar to what you're describing.  I would manually drive an engine past the RFID sensor, at which time the computer would take over all control of that train -- adjusting the (absolute) speed and directing it on whatever route my algorithm assigned.  The operator (me) would then select a different engine or train on the CAB, and drive that train past the RFID sensor.  And so on.

I'm not sure how your hall effect sensors work -- do they show "occupied" whenever an engine is anywhere inside an electrically isolated block?  How do you do this?  Remember that a long train can extend into a block on either side...  I'd like to see exactly what sensors you are using and how they are connected to the track and an Arduino.  If you could post specific information about your hall effect occupancy sensors,  I'd very much appreciate it.

I'm using old-school isolated rail sections connected to time-delay relays (to avoid bounce/chatter), and have a sensor at each end of every block.  The length of the sections is adjustable as I'm using kapton tape with copper foil tape on top of the rails, rather than cutting the rail to create the electrical isolation.  So I keep a accurate accounting of when trains enter *and completely exit* each block.  Regardless of how long at train is, I know when a block has been completely cleared, and (because I use absolute rather than relative speed adjustments) I know when it is likely to reach the next sensor.  I like that certainty.

I know how many inches per second each train is moving at each speed step (I have four pre-defined for each loco - crawl, slow, medium, and fast.)  Using relative speed adjustments is just too arbitrary for my taste ;-)  This is beyond what you'll require, but I've also got tables that indicate rates of deceleration -- so I can calculate when to start slowing a train after hitting a destination siding entry sensor, and attempt to be at crawl speed the moment the train trips the destination siding exit sensor -- giving the software an opportunity to stop the train before it overshoots and fouls the mainline.  Note that entry/exit sensors are identical -- it just depends which direction the train is moving.  I also use these sensors to trip accessories such as crossing gates etc.

I buy virtually all of my parts on eBay, Amazon, and Sparkfun.

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

×
×
×
×
×