Lionel TMCC Command Base 7/29/11


The Lionel TMCC Command Base (Base) receives, interprets and retransmits commands from a TMCC CAB-1 handheld controller. The Base outputs include a signal that transmits through the outer rails of the layout at 455 KHz to locomotives and accessory devices, and a 9-pin pseudo-RS232 port that can drive power and accessory controls that utilize the RS232 protocol at 9600 baud. The 9-pin connector can also be used for bidirectional communication with a computer, in which case incoming TMCC commands generated by the computer will be echoed on the outer rail signal and the 9-pin output.


 The power source is a special “wallwart” AC transformer with a 3-pin molded AC power plug. Unlike most wallwarts, the Lionel unit connects one leg of the low-voltage AC outlet to the “U-ground” safety grounding pin on the AC plug. THIS CONNECTION IS NECESSARY FOR THE TMCC SIGNAL TO PROPOGATE PROPERLY!! This link from the Base to the house wiring is an essential part of the antenna system for TMCC.

The Base output terminal for connecting to the track is labeled “U”. The U terminal should be connected to the layout’s track COMMON at a convenient distribution point on a terminal strip or the COMMON terminal of the transformer or other power device feeding the track. The gauge of the connecting wire is not important since there is very little current flowing in the wire. (Do not use a lengthy wire that needs to be coiled up. Coils create inductance that impedes the flow of high frequencies. The same rule applies to the wire running from the Base to the wallwart AND any extension cord that might be used between the AC receptacle on the wall and the wallwart.)

The 9-pin serial connector uses a basic 3-wire RS232 format for the incoming and outgoing serial data. The Base output driver stage only swings from +5V down to ground, rather than a true bipolar swing defined in the RS232 standard. This is a common simplification, and many RS232 devices will operate with this reduced swing. The pins on the 9-pin D connector are:

Pin 2 Data Output                                                         \     5     4     3     2     1   / 

Pin 3 Data Input                                                                 \   9     8     7     6   /

Pin 5 Ground                                                              View from rear of enclosure

There are no provisions on the connector for grounding of a cable shield. (The threaded inserts for locking screws are not grounded.)

The TMCC Receiver

Both the Powermaster and the Command Base have radio receivers tuned to 27 MHz for receiving commands from the CAB-1 handheld controller. The exact frequency is controlled by selecting a pair of crystals for the CAB-1 and Base. The crystal in the CAB-1 is set to a frequency that is 455 KHz higher than the crystal in the Base. The normal frequency pair is 27.255 MHz (Channel 6) in the CAB-1, and 26.800 MHz in the Base. The reason for the 455 KHz stagger will be described later. (Note that the plastic holders for the crystals both say “27.255 MHz” even though the receiver crystal is really 26.800 MHz. The actual frequency is printed on the shell of the crystal.)

The receiver’s antenna consists of 28” of 26 gauge wire wound in a rectangular spiral pattern. (Always check the antenna’s attachment wires after servicing to verify that the wires have not fractured where they enter the PC board due to twisting and turning of the PC board to replace components.)


Command Base circuit board

(The switch and wires at the lower edge of the photo are not standard items for the Base.)

The antenna feeds a one-transistor RF amplifier configured as a Common Base stage, with the collector load tuned to 27 MHz.


Command Base radio receiver circuitry

The boosted RF signal is fed to one port of the Mixer section of a MC3371 single-chip radio receiver. The Local Oscillator section of the chip provides a crystal-controlled 26.800 MHz signal that feeds the other side of the Mixer. When the two signals are mixed together, the resulting signal has frequency components at the sum of the incoming frequencies (27.255 + 26.800 = 54.055 MHz) and at the difference of the frequencies (27.255 – 26.800 = 455 KHz.) A ceramic resonant filter rejects the upper sum and passes the lower difference to the Limiter.

The incoming data is encoded as Frequency Shift Keying (FSK), which means that only two discrete frequencies are used. Since only the frequency information is important and not any amplitude changes, the Limiter greatly amplifies the incoming signal until the positive and negative tips of the waveform are flattened off to create a squarewave with no amplitude variation. The Demodulator uses the slope of a tuned circuit set near 455 KHz to change the frequency steps into voltage amplitude steps that represent the CAB-1’s encoded digital ones and zeros. The Audio Amplifier boosts this small voltage to about .7 volts P-P.

The boosted signal is fed to a combination lowpass filter and limiter circuit using one section of the quad opamp LM324 U2b (pins 5, 6 input & 7 output). Test Point #3 clip_image006

Command Base opamps used as comparators and limiters

displays the signal before limiting, and Test Point #4 is the inverted hard-limited output signal. The conditioned digital signal is fed to Pin 26 of the microcontroller (uC) for final decoding. The uC can accurately measure the difference in arrival times between pulse edges to distinguish between the two FSK data frequencies.


TP3 and RSSI gate with no valid signal present


Demodulated data into edge detector (TP3) top RSSI gate bottom


Data after limiter (TP4)

Note that the left portion of the data word is a series of repeated characters. This “preamble” provides a reference clock that can be used for determining the locations of the data transitions in the latter part of the data word where the actual TMCC command actions are encoded.

Unlike the Powermaster, the Base utilizes the capability of the receiver chip to detect the strength of the received signal. This “RSSI” (Received Signal Strength Indicator) signal is compared to a reference level of .375 volts by U2a (pins 2, 3 input & 1 output). When an incoming signal burst is present, the RSSI level on pin 1 drops LOW for 6.5 ms. This “valid signal received” output is fed to uC Pin 17. (Hint: Use this RSSI signal on Pin 1 to trigger the oscilloscope when trying to observe the data on TP3 and TP4.)


RSSI gate – Low = valid signal

In addition to the FSK data from the receiver, the uC also receives the timing of the zero crossings of the 60 Hz power sinewave. The zero crossing detector applies the full 18 volts of the input power through a 100K resistor to a section of quad opamp U1c (pins 9,10 input & 8 output). A pair of parallel back-to-back silicon diodes connected to ground clips the input voltage to +/- .7V to avoid overdriving the comparator’s input. The opamp’s output produces a 0-4V squarewave synchronized to the AC line on Pin 12 of the uC.


Squarewave 60 Hz

Microcontroller Functions

The Base is controlled by a 40-pin PIC 17C42-16 uC. The uC’s clock is generated by an 8 MHz ceramic resonator connected to Pins 19 & 20.


Microcontroller and Serial In/Out

Two LEDs indicate proper operation. The green “Status OK” LED is illuminated directly by the +5V power supply, and the red “Incoming Data” LED is controlled by a pull-down on Pin 24.

RS-232 communications travel through J3. Incoming signals on Pin 3 are limited to a 5V swing by transistor Q7. Outgoing signals are buffered by Q6, a PNP transistor that provides an active pull-up to +5V. This signal typically drives optoisolators in the


Serial data on 9-pin pin 2

various power and accessory controllers that use the 9-pin wiring. No protection circuitry is provided for Q6 except for the limited Base drive of .5 mA. This output is intended to be a current source, and it has very limited current sinking capability through the 1Kohm collector resistor.

Track Signal

The primary function of the Base is to control locomotives via the signal transmitted through the track (and the house safety ground wiring.) The transmitted signal is quite similar to the signal from the CAB-1 except that the carrier frequency is 455 KHz rather than 27 MHz.

In radio circles, 455 KHz is a relatively low frequency that is totally immune to problems created by reflections and multipath that plague TV and cell phone signals. The length of each cycle at 455 KHz is over 2000 feet. A layout would need to be on the order of 500 feet long before there could be self-interference problems. We are only discussing self-interference here, not noise from external sources such as light dimmers, switching power supplies, arcing components and other electrical noise sources.


Oscillator and “U” terminal output driver bottom, Power supply top

A nominal 455 KHz signal is generated by oscillator Q2. The frequency of oscillation is primarily determined by the tuned tank circuit composed of inductor L8 and capacitor C27. To shift the frequency for the FSK encoding, an additional capacitor, C28, is connected across the tuned tank by Q5. This adds about 3% extra capacitance, and this will shift the frequency down by about 1.5% using Frequency=square root(L*C).

The oscillator’s output is amplified by Q3 and buffered by emitter follower Q4. Both Q3 and Q4 are tied to the unregulated input side of the power supply, giving them additional voltage swing for driving the track. Capacitor C32 provides AC coupling to the track.


Track signal at “U” terminal

This output circuit requires more than just a single wire to the track to communicate with the locomotives. The other half of the output signal is provided by the ground terminal of the Base output circuit. Unlike many systems for which we consider “ground” to be a reference plane with zero voltage, the Base ground has an active signal. The TMCC designers utilized a Base power supply with half-wave rectification so that the ground of the output circuit is shared with one side of the incoming low-voltage power supply. The jumper in the wallwart that connects this side of the transformer’s secondary winding to the U-ground pin on the AC wall receptacle feeds the ground half of the output signal into the house wiring network.

The house wiring now becomes a huge antenna that is further augmented by the ground rod connecting the safety wiring to earth ground. The signal radiated by this house wiring and ground is the signal that is picked up by a locomotive’s antenna, NOT THE TRACK SIGNAL!

Command Base Signals

The Base is always transmitting the track signal (unlike the serial output which is only present when a command is being sent), but the frequency is constantly shifting. A frequency counter will display a value that is an average over the sampling period. A single (upper) frequency can be established by grounding the base of Q5, thereby disabling the data line from the uC.

When no data is being transmitted, the track signal consists of an idling No Operation signal that keeps the locomotives in the Command mode.

My test unit measured 457.36 KHz with the base of Q5 grounded, 452.39 KHz with the base of Q5 held high and 454.77 KHz with the idling signal being transmitted. I measured a drift of up to .5 KHz as the unit warmed up.

If the frequency tuning of the Base oscillator shifts away from the nominal value, the receivers in the locomotives may have a reduced sensitivity. Re-tuning L8 is a bit risky, but sometimes this is necessary. Using the least sensitive locomotive as a reference, press the horn/whistle button on the CAB-1. Use a plastic screwdriver to adjust L8 back and forth until you determine the extremes of the adjustment range that will activate the horn/whistle. Now adjust L8 to the middle of this adjustment range. Check all you other locomotives. (You could have just one bad locomotive and a good Base!)


Power Supply

The power supply is a simple halfwave rectifier and a 3-terminal 5V voltage regulator. The energy storage capacitor C23 between the diode and regulator has a 4.5V 60 Hz sawtooth ripple that swings between 15.5 and 11 volts.


Power supply ripple


A shorted output capacitor, C32, can be detected without opening the plastic enclosure. Measure the resistance from the “U” terminal to Pin 5 of the serial port. There should be an open circuit. If the reading is about 100 ohms, the capacitor is shorted and you are reading the resistance of R24.

To check the wallwart’s ground path, measure the resistance from the U-ground pin to the outer ring of the coaxial power plug. This path should be about zero ohms.

If the red light flashes and the serial output works, but the track signal is dead, or vice versa, the problem is probably in the individual output stages. If the red light doesn’t flash and both outputs are dead, but the green light is lit, the problem is probably with the receiver, opamp or uC.

For troubleshooting, you can swap crystals between the Base and a Powermaster.

This entry was posted in Service/Repair Information. Bookmark the permalink.

Comments are closed.