The CAB-1 controller provides handheld operation of Lionel TMCC Command Control layouts. The pushbuttons and rotary knob provide addressing and control of trains, switches and accessories. A jack on the top end of the unit provides a connection for an external “Last Command” button which retransmits the last active command when pressed.
The CAB-1 is somewhat restrictive in that it cannot access all of the address space provided by the TMCC command functions. The limitations include:
0-99 engines out of 0-127
0-9 routes out of 0-31
0-9 trains/tracks out of 0-15
0-99 switches out of 0-127
0-99 accessories out of 0-127
No access to “Group” commands to activate groups of accessories
The basic subsystems are the keyboard, knob, microcontroller (uC), RF transmitter and battery.
The main keyboard PC is connected to the uC/RF board by an 11-wire flat ribbon cable. For identification purposes, the cable connects to an array of holes marked “J1” on the uC/RF board, and herein Pin 1 of J1 is adjacent to the right end of the “J1” outline in the picture above. Likewise, the rotary encoder is connected by a 5-wire cable to “J2”, with Pin 1 again on the right. An additional small board with the Set, L, M, H and Halt buttons is attached to the main button board by a 6-wire flat cable.
The keyboard consists of an array of buttons that activate conductive rubber pads that jumper between two printed circuit board traces when depressed. The buttons are connected in an array pattern that allows the intersections of the rows and columns of the array to be interrogated.
The PIC 16C57-HS is an 8-bit processor operating at 8 MHz. The pin utilization is:
Switch scanning – pins 12, 13 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
Wheel phototransistor detectors – pins 10, 11
Wheel LEDs – pin 6
Beeper – pin 8
uC clock oscillator – pins 26, 27
Encoded data output – pin 7
Transmitter active – pin 9
uC Master Clear – pin 28 (Reset on bootup)
TOCK – pin 1 (Timer input pin is not used)
+V supply – pin 2
Ground – pins 4, 24, 25
Not connected – pins 3, 5
Rotary control wheel – Red Knob
The rotary encoder consists of two LEDs that shine though a disk with 40 radial slots (9 degrees of rotation per slot) onto a pair of phototransistors. The phototransistors “see”
the LEDs’ light after it passes through a phase grating with fixed slots that are offset by 90 degrees (1/4th of 9 degrees rotation.) This geometry produces two partially overlapping quadrature output signals that encode the direction of rotation, with the direction determined by which of the two signals rises first.
To conserve power, the LEDs are only pulsed ON every 735 us. when the system is interrogating the rotary encoder. The LEDs are connected in series with the top end of the string tied to the battery +V terminal. The bottom of the string is pulled to ground through a 300 ohm resistor to uC pin 6.
The optical components must be properly aligned to produce the necessary 90 degree phase differential and a rail-to-rail voltage swing. The best way to achieve this alignment is to use a dual-trace oscilloscope in “Chop” mode to observe both channels simultaneously by monitoring R7 and R8. The waveforms should extend all the way from +V to ground when the optos are properly positioned. The patterns will vary with very slow knob rotation through the following sequence:
Neither opto on
Only one opto ON
Both optos ON
Only the other opto ON
Changing the direction of knob rotation will reverse the roles of the optos. The optotransistors can be repositioned slightly for alignment by bending their leads.
Note that both the top and bottom halves of the case provide alignment and support to the opto board. When operating the board with the case open, use your fingers to align the opto board to vertical. Always recheck knob operation after the case is closed.
Direct external light may falsely activate the optotransistors. Shield the encoder area from workbench lighting during adjustment and testing.
Radio Frequency Transmitter
The CAB-1 transmits a radio signal at a nominal 27.255 MHz. The actual frequency is stepped between two discrete values, with the transitions between the frequency representing the rising and falling edges of the data being transmitted. This form of modulation is called Frequency Shift Keying (FSK). The TMCC Command Base or Powermaster receiving the signal detects the frequency shifts to recover the data. FSK is a form of frequency modulation (FM), yielding a radio link that is relatively immune to interference.
The two discrete transmitting frequencies are generated by oscillator transistor Q7 and varactor diode D3. The varactor diode changes capacitance when a control voltage representing the encoded data from uC pin 7 is applied. This capacitance shift “pulls” or changes the tuning of the oscillator slightly to created two discrete frequency outputs when the varactor is OFF or ON. Test Point #3 displays the oscillator output voltage of about .5 volts P-P riding on a 3.5 volt DC step.
The oscillator feeds the output amplifier to generate a strong signal to feed the antenna. Transistors Q4 and Q5 are connected in parallel to boost the output power while Q3 provides a feedback loop to limit the maximum power. The waveform from the output amplifier (Test Point #2) is cleaned up by a lowpass filter composed of L3, C13, L4, and C17. The voltage at TP2 is about 8 volts P-P riding on the +V rail, and after the filter the voltage is about 7 volts P-P.
The antenna is fed by loading network L5 and C18. With the antenna full retracted, the voltage to the antenna is about 16 volts P-P; with the antenna fully extended the voltage drops to about 8 volts P-P.
To conserve power, the transmitter is only turned ON when data is actually generated by a button push or knob turn. Transistor Q6 applies plus voltage to the oscillator and output amplifier whenever uC pin 9 goes low.
Pin 8 of the uC feeds a squarewave signal to a bimorph disc (marked “LS1” on the PCB silkscreen – LoudSpeaker 1?) mounted on the back shell to produce beeps to create user tactile feedback. Note that the black wire is actually connected to the plus side of the battery. Pin 8 is active Low to draw current through the bimorph.
In the picture above, the bulge in the black wire between the hot glue globs is a diode in series with the battery to avoid damage from reversed battery polarity. This diode is not present in all CAB-1 units. If the diode is present, the apparent battery life will be reduced somewhat because of the extra voltage drop across the diode.
The jack at the top end of the case can receive a 2mm mini plug that connects a simple external pushbutton to the uC. When the button is pressed, the uC re-issues the last transmitted action command.
The 4-cell battery pack is connected in series. Looking at the back of the unit, the terminal in the lower left is the minus terminal, and the terminal in the upper right is the plus terminal.