Skip to main content

I have a loop which uses the old fashion relay control to stop a train in the block behind it. When the block is clear the rear train proceeds. This woks fine with conventional engines but with TMCC the train stops but just sits there when the power is restored waiting for the throttle to be turned up. Is there a way to have a TMCC engine respond like a conventional engine on this loop.

If not how do you do automatic train control with TMCC or Legacy engines.

Original Post

Replies sorted oldest to newest

If it were me for TMCC/Legacy equipment I would use software instead of hardware.  More specifically, instead of interrupting power to the approaching block I would send a command sequence to throttle down the engine entering the approaching block to zero using the TMCC/Legacy Protocol sent by a computer (which could be a PC, or an Arduino, or a Raspberry Pi) fitted with software that:

  1. Is programmed with the TMCC/Legacy protocol in order to know what commands specifically to send
  2. Is connected to a command base (Base 1, 1L, 2, or 3) in order to get the commands transmitted to the layout
  3. Also watches the block ahead of the approaching block to detect when it's occupied (this block will need a Lionel SensorTrack, or, if you're handy with wiring, some block-occupancy hardware wired into the computer to do this, perhaps an Lionel 153IR or equivalent MTH IR detector)
  4. When a stop is necessary in the approaching block, this software sends a command sequence mimicking pushing the buttons "ENG" and "XX", where "XX" is the TMCC/Legacy ID for the approaching engine, then it also sends the command sequence to that engine equivalent to manually turning the big red knob down to zero speed
  5. The only tough part (moderately) in all this comes because this software must know and track each engine, and its respective ID ("XX"), as it goes around the layout so that it knows precisely which ID to send when the corresponding engine enters the approaching block; get this wrong and the approaching engine will not stop but some other engine moving somewhere else on the layout will (if it has that 'wrong' ID)

This is a simplified description, but probably more than you expected, especially if you're more of a hardware person than software, however it's not hard.

Follow the steps in reverse once the lead block clears to restore movement to the stopped engine in the approaching block, i.e.  when a resume is necessary in the approaching block, this software sends a command sequence mimicking pushing the buttons "ENG" and "XX", where "XX" is the TMCC/Legacy ID for the approaching engine, then it also sends the command sequence equivalent to manually turning the big red knob back up to its previous speed setting

Does this approach sound doable to you?

Mike

Last edited by Mellow Hudson Mike
@Pup posted:

I have a loop which uses the old fashion relay control to stop a train in the block behind it. When the block is clear the rear train proceeds. This woks fine with conventional engines but with TMCC the train stops but just sits there when the power is restored waiting for the throttle to be turned up. Is there a way to have a TMCC engine respond like a conventional engine on this loop.

If not how do you do automatic train control with TMCC or Legacy engines.

Boy did this question bring back memories. When I was a kid and I would set up a large layout for Christmas I would have multiple Trains running on Automatic. What I would do is I have a load of 153C contacts lots of insulated rail and luck. I would have to train criss cross each other and the first one to get to the 90° or the 45 would drop power to the other track. It was actually quite cool to watch, but it could also get interesting if they both got their simultaneously and one may rolled through the other then we had the Addams family

You can run two trains on one track with TMCC without anything other than your remote. Simply adjust the train speeds of the two locos so they are the same. If they are slightly off, you can always brake the faster one.  If you have a Powermaster, one of the locos could be conventional. I have yet to try this, though.

Generally I agree with Mike.  The beautiful part about doing it with software commands, is that the trains could slow and start gradually instead of relying on crude mechanical hysteresis.

To me, Pup's question is the most basic use case for Lionel's Layout Control System.  However, I'm not sure that I've ever actually seen a demo of it using that hardware.

There's at least one active thread on the Forum where @cdswindell has managed to communicate with Legacy using a Rasperry Pi.  The missing element to achieve our goal is some kind of sensor network, which would provide input to the system about where the locos are.  Good thread, following!

@ThatGuy posted:

Boy did this question bring back memories. When I was a kid and I would set up a large layout for Christmas I would have multiple Trains running on Automatic. What I would do is I have a load of 153C contacts lots of insulated rail and luck. I would have to train criss cross each other and the first one to get to the 90° or the 45 would drop power to the other track. It was actually quite cool to watch, but it could also get interesting if they both got their simultaneously and one may rolled through the other then we had the Addams family

Sounds like my experiment with recreating/reimagining the Marx Two Trains set (no Addams Family -- sorry, Gomez!):

All old-school isolated sections and electro-mechanical relay control . . .

Last edited by Steve Tyler
@Ted S posted:

Generally I agree with Mike.  The beautiful part about doing it with software commands, is that the trains could slow and start gradually instead of relying on crude mechanical hysteresis.

To me, Pup's question is the most basic use case for Lionel's Layout Control System.  However, I'm not sure that I've ever actually seen a demo of it using that hardware.

There's at least one active thread on the Forum where @cdswindell has managed to communicate with Legacy using a Rasperry Pi.  The missing element to achieve our goal is some kind of sensor network, which would provide input to the system about where the locos are.  Good thread, following!

If you placed Lionel Sensor tracks at the beginning of each block, you could use the software I developed (PyTrain) to capture the TMCC ID of an IR-equipped sensor as it entered a block. Assuming a Pi can read/monitor the block occupancy detector, you could then send the Lionel command to get an nine moving again once the block ahead is clear using the PyTrain code.

Happy to provide more info, if you're interested. I'd love to see n example of how to connect block occupancy sensors to a Pi for my own use as well. I might be able to incorporate this into the work I've done.

  -- Dave

Dave your Python stuff is interesting, but a lot of it is over my head.  (I've never personally tinkered with a Raspberry Pi.)

It's a missed opportunity on Lionel's part that it can't be done solely with LCS components.  At least they have been open to sharing the protocols with outside developers such as yourself.  I believe that we would have had something like the OP asked about YEARS ago, if MTH hadn't sent heavy-handed "cease and desist" letters to folks who successfully connected their computers to the TIU.

DCS has a couple of advantages relative to TMCC, in that it tracks the distance a loco has traveled, and at least claims to have "two-way communication" coming back from the loco.  I have messed around with recording macros/scripts using the TIU and DCS hand-held.  They are repeatable to a point, but after multiple cycles, position errors creep in (because of wheel slippage, mismeasurement, etc.)  I think you can accomplish this with Legacy/LCS by using the track IR sensors, but it might require some trial-and-error with the commands (or a generous buffer zone) to account for gradual deceleration and stopping distance.

Neither DCS nor Legacy has a built-in provision for randomness: i.e., which loco or route will be selected, how many cycles, duration of delay, etc.  These are the kinds of things that would make a display layout interesting to watch and interact with for a human operator.  Something to consider IMO.

Last edited by Ted S

These trains are running on a circuit from Run 124 8/92 "Automate your passenger trains" by John P. Flanigan. The F3 is a post war with e unit locked in forward and the New Haven electric is a Lionchief Plus. The Lionchief Plus works with it's dedicated remote but not with the universal remote. I guess with the dedicated remote when the power comes back on the remote remembers what state it was in because the throttle dosen't reset. TMCC engines won't work. They just sit there when the power comes back.

Do you think if instead of killing the power completely if I left 5v on the track the the TMCC engine would not lose their memory and restart in forward when the power returns to 18 volts? Kind of like the old school method of not letting the e unit drop out.

Attachments

Videos (1)
IMG_1612

@Ted S, my reason for developing the software is to build custom control panels to operate my layout. More recently, I've expanded the project in ways that let me build a general purpose train controller (my prototype is shown below) that I'll mount in a central location and use to run any engine or train I key in.

IMG_6634

Based on this thread and others, I am now thinking of adding support for automated train control as well. My thinking here is in its very early stages and will definitely not be for the novice (the panel you see above required one line of Python to code, and all that line does is tell my code which Raspberry Pi pins are connected to which physical buttons and widgets). But as a recovering software development professional, now in retirement, I get my jollies from this work as well as from running my layout

  -- Dave

Attachments

Images (1)
  • IMG_6634
Last edited by Rich Melvin

@Pup if you drop the track below 7-8V, the train will definitely slow to a stall.  But-- the TMCC circuitry in the loco will still be TRYING to go forward.  That might be ok for a brief pause, but if you leave it that way for too long, it could create burns on the motor commutators.

The RIGHT way to do what you're asking, is to reduce the speed to zero using TMCC commands, and then accelerate back to track speed with subsequent commands.  Circa 1999-2000, a couple of different companies offered Windows software that purported to do this sort of thing with a script.  You needed to make or modify a cable which connected the computer's serial port to the command base, etc.  I think I still have the diskettes(!), although I'm not sure that I ever got it to work as advertised.

I reiterate; this should be a very basic use case for Lionel's LCS.  Google "Intelino" and watch some demonstrations.  Even better, go to YouTube and search for "Marx-Tronic Train with the Brain"

Last edited by Ted S

FYI: This doesn't solve your immediate problem -- since you're using Lionel -- which is deliberately designed to be incompatible with everything else in the world.

  • But just as an FYI:
  • With MTH Proto-3, the locos will "obey" DCC commands.
  • You can use an NCE DCC 'Mini-Panel' -- which is a relatively simple programmable controller-- to control 2 or even 3 MTH trains on 1 track -- with much simpler programming than what the guys are talking about above.

At  www.TrainProgramming.com  , I have put links to some 'Compilation' videos -- showing what can be done.

24L-pg46color-natHQnews -crop

Attachments

Images (1)
  • 24L-pg46color-natHQnews -crop
Last edited by James Ingram
@Ted S posted:


The RIGHT way to do what you're asking, is to reduce the speed to zero using TMCC commands, and then accelerate back to track speed with subsequent commands.

@Ted S  thank you for the heads up about damage to the commutators. If commands are sent to stop an engine wouldn't the commands  have to be sent to a specific engine. How would the circuit know what engine to send the command to? The circuit I have now just knows to stop a train. It dosen't care what engine is pulling the train. I can put trains in any order and the circuit will work. Is there a way to send commands to any engine  that's in the block to be stopped?

@Pup the TMCC or Legacy macro would have to address one or more specific loco IDs.

Again, if LCS were better-developed, it could read the ID from a sensor track, store that ID as a variable, and then the macro script could reference whatever variable is stored.  I would love to see Lionel return to some of the major train shows with a revamped demonstration layout and LCS software running on an iPad that does stuff like this!

After further thought, lowering the track to 5 volts for a minute or so shouldn't harm the motors much.

I also thought of a hack you might be able to use for TMCC...  A long time ago, Lionel produced an accessory called the Big Red Button that supposedly repeated the last TMCC command issued.  If you were to purchase two Big Red Buttons, and trigger the commands by completing their circuits with the relays (instead of physically pressing the buttons), it could work.

Of course you would be limited to addressing ONE TMCC loco, and you would have to set an absolute speed command to bring the train back to track speed.  Just a thought, FWIW.

Add Reply

Post
This forum is sponsored by Lionel, LLC
×
×
×
×
Link copied to your clipboard.
×
×