Skip to main content

*************************     INTRO     *************************

I've posted on this topic many many times, but it's scattered all over various threads and there's no comprehensive guide for this, with all the drawings and equations and everything all in one place. Also a lot of the prior discussions I posed were very analytical and mathy and didn't really nail down the details in nice easy to understand figures. We've done A LOT of work on this topic at our AGHR club since we have to support basically any train that comes in the door (Lionchief, Legacy, TMCC, DCS, conventional, and home-made models).

So here is the complete thread topic of running Legacy/TMCC and DCS together, how the signals interact, and how to understand and avoid the problems that come when using both systems together. This is an electrical engineering topic so there's a touch of analysis, but nothing outrageously analytical.


*************************     THE BASICS: VOLTAGES   *************************

Let's just introduce one very basic concepts first: Voltage. Voltage (called "potential difference" in physics) is a thing measured between two points in a circuit. If there is a single wire floating in space, it does not make sense to talk about its voltage. Voltage is ALWAYS the difference between two things, that's why multimeters have a red and a black lead, and oscilloscope probes have both a pin and a ground clip. If you run TMCC/Legacy and DCS there are in fact 3 different voltages involved and they are all between different places:

1. The power supply voltage (the 18V 60Hz that powers your train)

2. The DCS voltage (digital square waves at about 3.5 MHz that run through the track and talk to the DCS decoder and are sent in bursts)

3. The Legacy carrier voltage (An always present sine wave at 455 KHz that shifts phase/freq to send data)

Now these 3 voltages are not all between the same two things, even though they all coexist in the layout. If you look at your layout from an sky high view, there's basically 4 different "nodes" or points in the circuit to measure voltages inbetween.

[The center rail],   [The left outer rail],   [The right outer rail],   [The ground of the building that the 110V outlet is referenced to]


*************************     THE BASICS: IDEAL EXCITATION   *************************

So let's start about excitation modes of the various signals and where they are.

1. Power. This is a 60 Hz AC sine wave voltage between the center inner rail of the track and the two outer rails (or one outer rail... more on that later). Typically 18V RMS for digital control systems.

2. DCS signal is a square-wave digital voltage that is present between the center inner rail of the track and the outer rails. The frequency of this digital square wave is about 3.5 MHz and the voltage of the signal at the TIU is about 14V pk to pk. Since DCS is a high frequency signal and the driver in the TIU itself (an ACT244 octal driver) has a limited output impedance, the actual voltage of the DCS signal at the track can be much lower than this, especially with long wiring runs, or when lots of trains are in a single block since each presents an impedance across the track, lowering the observed voltage. DCS is not a continuous signal. A burst of DCS square wave data is only sent when a command is issued from the TIU, most of the time you can't see it on the oscilloscope unless you're set up to trigger on its edges.  (EE academic note: a data burst is actually a line code not a square wave since it's not periodic)

3. Legacy. The legacy signal is a 455 KHz sine wave voltage that's always present but shifts phase and frequency slightly to send data. This voltage is ideally present between any of the 3 rails, and the building earth ground. More on this later too.

So now in the ideal case of this, lets imagine what you would see with an oscilloscope between the various points in the layout. For this discussion to be a little more digestible and make the figures easier,  let's just imagine only the control signals are present on our layout and there's no 60 Hz power. So... if you put you oscilloscope between the center rail and the outer rail you would expect to see the occasional DCS packet going by when a command is issued, but you would not see any legacy signal because the legacy voltage between (building ground and center rail) and (building ground and outer rail) is the same. That means the legacy signal has no voltage difference between inner and outer rails and so you would not see that signal between them on the oscilloscope.  Now if you put the same oscilloscope between the building ground and any of the 3 rails you would see the legacy carrier continuously, but you would not see DCS packets going by when commands are issued because the DCS voltage is between the center rail and outer rails, not between the earth ground and center rail, nor is it between the earth ground and outer rail.

LEGACY1

The DCS decoder in MTH trains, specifically looks at the voltage between the inner and outer rails, and the Lionel TMCC/Legacy decoder specifically looks at voltages between the building ground and the outer rails (note the legacy signal does exist between the center rail and earth ground too, but that's not what the lionel decoder design specifically interrogates).

****More weeds for the curious*** : So the train obviously doesn't have a direct connection to building earth ground since it's moving, but the "antenna" can act like an earth ground. Now the signal is only 455 KHz (so a wavelength of 600m) meaning it's not an RF or microwave antenna like in your phone or wifi or something (since RF antennas need to be the same size as the wavelength). What's going on is the "antenna" in the Lionel train actually forms a capacitor between itself and the building around the layout...  allowing it to somewhat measure voltages relative to earth ground without actually having an Earth ground connection. This is imperfect and not 1:1 and will not capture the full voltage difference between the track and earth ground, but allows you to detect enough of it to make signaling work.


Okay some new terms to introduce. Differential mode excitation and common mode excitation. We'll be using these terms a lot later. When we say a differential mode, we mean a voltage is measured across *different* rails in the tracks.. like DCS or 60 Hz power. When we say common mode excitation we mean something that two rails have in common. Like if you measure the inner rail to building ground or outer rail to building ground both have the same legacy carrier so that's a common thing between both inner and outer rails... so we call it a common mode excitation.  OK cool.


===SUMMARY FOR THIS PART===

So the Legacy voltage is present between the outer rails and building ground (common mode). DCS voltage is present between the center and outer rails (differential mode). Having the signal voltages between different points (we say signals are "in different modes") is the KEY IDEA that allows them to coexist without interfering with each other. Lionel trains only decode common-mode signals, and MTH trains only decode differential-mode signals.


************************    ISOLATED RAILS ARE BAD FOR LEGACY  *************************

So now let's talk about the outer rails themselves. Most trains have steel axles that go directly across the two outer rails, so most of the time you can consider them connected together. Sometimes people use an "insulated rail section" to trigger accessories by having the train complete a circuit from the left to right rail. While this is okay in concept form, in practice... it has a lot of adverse effects on how the signals flow through the track. Although the outer rails of the track are often called "ground" they are in fact they are energized with the legacy voltage between themselves and the building ground. If you connect the outer rails of the track to building ground, legacy will not work because this connection shorts out that legacy signal voltage, forcing it to zero. This is why insulated rail can be an issue. The legacy base, MTH TIU, (and GRJ's booster) are specifically designed with an isolated power supply so that the internal ground of the module and the ground of the building are electrically separated. This is so they can sustain a voltage between those two points (the legacy signal). Once you introduce an insulated rail to trigger an accessory, that accessory will have a power supply, and there's no guarantee that that power supply is well isolated from building ground because whoever designed it probably did not intend to sustain an intentional voltage (legacy signal) between building ground and the internal ground. In most cheap switching power supplies (computer ones, anything off amazon) this is the case, and even when you buy "isolated power supplies" usually this only means isolated at the 60 Hz power frequency, not necessarily up at the 450 KHz frequency of the legacy signal. As a result that power supply may introduce a low impedance between those two points (outer rails, and building ground), dragging down the voltage of the legacy signal. This is why in our club's layout we have explicit connections across the two outer rails in every block and rely on optical sensors to trigger accessories. I super strongly strongly recommend that approach for best signaling.


LEGACY2

DCS EXCITATION: So the TIU output is wired directly to the center rail and outer rails (for the rest of this article lets assume the outer rails are explicitly connected). Since this is a very direct and explicit connection the differential mode is very pure. Pure means that none of the differential signal somehow ends up in the common mode. If DCS that's intended for differential-mode ended up in the common-mode conceptually it could jam the legacy signal. Practically that won't happen for two reasons 1) the mode is pure like we mentioned since the connection is very explicit, but also the DCS packets are only sent when a command is happening (a few milliseconds every 10s of seconds) so the disruption to Legacy would be for such a short time it wouldn't really be noticeable to the person operating the legacy train.

LEGACY EXCITATION: In the Legacy/TMCC system the base (or GRJ booster, or super booster from AGHR) apply the voltage between the outer rails, and the building/earth ground. The base/booster is plugged into the wall and that's where it establishes that earth/building ground connection. This has some immediate implications. You want that connection to be as robust as possible. Remember 110V stuff from home depot is intended to carry 60 Hz AC, not 455 KHz signals, so you need to be very sure about how your legacy base or booster is grounded. GFCI outlets, surge-protection power strips and stuff like that have lots of intermediate circuitry between the outlet 3rd prong and actual true building ground that was never designed or intended to carry 455 KHz signalling, so try to avoid that stuff. Putting an explicit connection from the base/booster directly to earth ground is also a good idea if possible.


*****************     A CLOSER LOOK: REAL WORLD EXCITATION  AND MODE CONTAMINATION *****************

LEGACY3

So the legacy base connects to the earth/building ground through the 110V outlet, and then has its output connected to the outer rails of the track (which we agreed were connected together for the remainder of this post).  The key thing here is that the outer rails are directly connected to the base/booster, but the center rail is not. There's no explicit connection from the booster/base output to the center rail, the only connection into the center rail is through whatever is supplying the 60 Hz power, which is in parallel with the TIU output impedance between inner and outer rails. Note this is for the passive TIU connection (Power and TIU in parallel). In the active connection it's just the TIU itself. Now with this in mind, we can also see that both the outer and inner rails have different electrical capacitance back to earth/building ground to complete the circuit. We know that 3 rail track has 2 outer rails and 1 inner rail, so we can bet that the capacitance of the outer rails is probably close to double the inner rail (we see that's true in measurements later).

Great so now lets put some labels on stuff so we can make sense of it all. We'll call the output impedance of the base/booster Zb, we'll call the open-circuit voltage (Thevnin voltage) of the base/booster Vb... which is the voltage between the base output and earth ground when no layout is connected. We'll call the TIU output impedance Zt, the power supply one Zp... and then assign some impedances for the capacitance of the track rails Zo for outer and Zi for inner. All this considered we can then draw up an equivalent circuit of the mess and start sorting it out:

LEGACY4

So first we can figure out the Legacy voltage between the building ground and outer rails (Vo) which is just a voltage divider between Zb the booster output impedance, and the rest of the network. Then we can see the voltage between the inner rail and building ground (Vi) is a further voltage divider of the outer rail voltage to building ground. Now here's the KEY part... if you subtract Vi from VO you'll see that the equation is non-zero. That is even though we want Legacy to be purely in the common-mode (appearing only between rails and the building ground, not between inner and outer rails)... some amount of that voltage is in fact leaking into the differential-mode where the DCS signal voltage operates. We see that the Vo-Vi term depends on a lot of "stuff"... impedance of parts, layout capacitance.... and so on, so we can't generalize much more than these expressions and have to fall back on empirical measurements.

LEGACY5

So we measured the key values in our AGHR layout, the capacitance of the rails (with the TIUs, super booster and power disconnected), and the impedance the various components exhibit at the 455 KHz legacy carrier frequency. Our layout is pretty typical for a O-gauge club, a little bigger than the SD3R guys, a lot smaller than the NJHR guys, kind of middle ground, so I think this would be pretty representative. Anyways, when you work through the terms for our setup you see about 16% of the legacy voltage ends up in the differential-mode instead of the common mode where it belongs and so it starts to impact DCS signalling which is what we look at next. In communication theory we call energy that leaks from one mode to the  other "mode contamination" like how contaminated one mode is by signals from the other that aren't supposed to be there.




===SUMMARY FOR THIS PART===

Some of the Legacy signal intended for common-mode ends up in the differential mode (called mode contamination) because the electrical path from the Legacy base/booster output to the center rail and outer rails is different, leading to a legacy signal voltage being developed between the rails.



*****************   EFFECTS OF MODE CONTAMINATION ON DCS *****************

Right so let's revisit what we will see on the oscilloscope and understand what changes with this mode contamination. In the common mode (legacy operation) we won't see anything unwanted, just the usual legacy carrier so that's good and legacy won't be impacted, provided the legacy signal is strong enough to begin with. Now in differential-mode where DCS is, what we will see is the DCS signal (the square wave) that we expect to be there, but then added on top will be the legacy voltage that leaked from the common-mode into the differential mode.

LEGACY6

How this actually looks on a scope:

LEGACY7

So here's where you get into trouble trying to run Legacy and DCS together. The DCS is a digital system which means it's trying to decide between ones and zeros in the decoder to recover the commands, but if the legacy leakage gets too strong it interferes with that process. The digital decoder in DCS basically looks at the input waveform and picks a voltage level (the DCS voltage between inner and outer rails)  called a threshold voltage. If the waveform is above that voltage it's taken as a one, if it's below that voltage it's taken as a zero. In the absence of the legacy mode contamination this works perfectly, but becomes an issue when you have a comparable amount of mode contamination (either because the legacy signal is strong, or the DCS signal is weak). If the added contamination causes the waveform to cross the threshold voltage multiple times in each bit period, the decoder will sometimes choose the wrong value, leading to commands not being received properly. Note this is not an "all or nothing" proposition, as the contamination increases, the DCS behavior will get worse and worse with a larger and larger percentage of the commands not making it through.

LEGACY8



*****************   SO WHAT CAN YOU DO TO MINIMIZE MODE-CONTAMINATION?  *****************

So the easiest thing to do is make the Legacy signal voltage tunable so that you can adjust it and find a point where the legacy signal is strong enough that the lionel trains all work fine but low enough that the mode contamination is not interfering with DCS. At AGHR we modified GRJs booster with a signal-strength knob to turn it up and down, and when we switched to the AGHR super-booster in 2023 we kept that functionality for just this reason. Here's some scope captures showing what it looks like when the leakage is acceptable, too high, and too low for both systems to operate correctly.

LEGACY9

Our club has been using various version of this scheme in both open-loop and closed-loop for several years and it works okay, but it's not perfect and needs continuous daily adjustment for several reasons...

1. The Lionel Legacy signal is very weather dependent as shown in the great TMCC weather experiment

2. Different locomotives, passenger cars with LEDs and PS2 vs PS3 present different impedance to the track to the DCS voltage at the locomotive varies.

3. The DCS and Lionel signal strength is not uniform at every point in the layout. In some places one is a higher voltage, in other places the other is a higher voltage.

4. Turnout positions can affect both signals.

So you are basically stuck playing the perpetual balancing game which is what we were doing at AGHR from 2016-2024.



*****************   AGHR LEGACY DIFFERENTIAL SUPPRESSOR *****************

So one new idea we're working on is think about a circuit that would eliminate the mode contamination without impacting signalling of either system... and we came up with this new project we're calling a legacy differential suppressor (which sounds fancy but it's basically just a simple LC circuit). So the idea is as follows, imagine we could build a circuit that connects between the center and outer rails that had the following properties:

1. High impedance or open circuit at 60 Hz so it's not drawing power from the power supply..

2. High impedance or open circuit at 3 MHz and up so it's not presenting a low impedance to the DCS differential mode signal.

3. Low impedance or even a short circuit at 455 KHz. So it forces the voltage Vo and Vi (inner and outer rail voltages relative to earth ground) to be the same, essentially shorting out the mode-contamination voltage of the legacy signal. Since we're placing this circuit between the inner and outer rails it's only going to short out the mode contamination, not the common-mode voltage between the earth ground and outer rails that the legacy system operates on.

LEGACY10

So yeah it turns out a really simple 4-th order LC notch filter accomplishes exactly these objectives. A few Kohm at 60 Hz and >3 MHz but basically a short circuit (few ohms) at the legacy frequency. So we did some SMD boards and are putting them in over the next few weeks. They can go pretty much anywhere... between the rails on the layout in key places.... in rolling stock, or even in the DCS locomotive itself.

LEGACY11

I'll send more updates when we have a few weeks of testing and some results, but so far so good.

Attachments

Images (11)
  • LEGACY1
  • LEGACY2
  • LEGACY3
  • LEGACY4
  • LEGACY5
  • LEGACY6
  • LEGACY7
  • LEGACY8
  • LEGACY9
  • LEGACY10
  • LEGACY11
Original Post

WOW; great stuff Adrian! It sounds like you have this nailed!

I recognize this 4 stage LC filter concept from your post of a couple of years back regarding a simple filter to separate the DCS signal from background AC hash, so it can be analized on a scope. That filter works very well. This filter sounds very similar to that.

A couple of questions:

1. Would you be in a position to share the circuit along with the R and C values at this time? I would like to perf-board one up and give it a test run on the layout.

2. You mention it can be installed most anywhere, wired between center and outside rails. I am thinking at or near the point where the Legacy base wire connects to the outside track wiring, perhaps at a main track power distribution block or such. Does that sound about right?

3. Would more than one be good for a layout with say 500+ feet of track? Or will only one suffice assuming only one Legacy base?

4. Are there any considerations needed for a layout that also has a TMCC base connected, using the Legacy Y cable?

Thanks for any advice, and thanks for undertaking this project!!

Rod

Add Reply

Post
The DCS Forum is sponsored by
×
×
×
×
Link copied to your clipboard.
×
×