
Information on ordering a commercial kit or assembled and tested unit of this circuit is available from the TracTronics Price List.
This is the second in our series of articles describing a set of electronic building blocks we have designed to control our model railroad layouts: Rich Weyand's N&W Pocahontas Division, Bill Pistello's Union Pacific, and the Reid brothers' Cumberland Valley System. In the last article we discussed SwitchWitch, a twin-coil switch machine drive circuit. This time we will discuss SwitchLock, a stall motor switch machine drive circuit.
This article will probably be the longest in this series, because after we designed the circuit we found a bunch of neat stuff we could do with SwitchLock other than just operate stall motors. We'll keep the tech-talk to a minimum, though, and the use of the circuit is pretty simple, so don't give up before you try. This circuit is really worth the effort, as it can add a lot to your control panels without a lot of pain.
We are presenting these circuits both as circuit diagrams and as circuit layout patterns, allowing readers to breadboard or etch their own circuits. For those who do not wish to breadboard or etch these circuits, both kits and assembled & tested units are available from TracTronics, 1212 South Naper Boulevard, Suite 119, Naperville, IL 60540 (708-527-0000). As before, thanks to our friends Steve and Scott Ackerman of ACS in Sarasota, Florida (813-377-5775) for the excellent layout work on these circuit boards.
After we got done solving Bill and Wayne Reid's problems with their Shomo Yard switch ladders, Bill Pistello said 'Hey Rich, what about us? We're not using twin-coil switch machines, we're using stall motor switch machines. What can we do to improve our control of those?' Stall motor switch machines, such as Circuitron's Tortoise, American Switch & Signal, and Hankscraft, have become very popular for new layout construction. They use very little current, making the heavy wire, large power supplies, and capacitive discharge systems used for twin-coil switch machines unnecessary. And they have a slower, more prototype actuation speed.
Stall motor switch machines do present some problems, however. To reverse them, the polarity of the motor wires must be reversed, and the operating voltage must be held on continuously, even after the switch motor has gone all the way over and 'stalled'. This means momentary push-buttons will not work for stall motor switch machines, which makes controlling them with diode matrices or from multiple locations a problem. With some trade-offs, either of these problems can be solved, but not both, and not with push-buttons.
We wanted push-button control of our stall motor switch machines, from multiple panels, and using diode matrices, and we wanted panel indication of the switch position to boot. So we set to work designing a circuit that uses push-button controls to operate stall motor switch machines and LED indicators.
The module we designed, which we call a SwitchLockTM (Figure 1) actually contains four circuits on a single 2-1/2" by 2-1/2" circuit card. Each of the four circuits will operate one stall motor switch machine, and is activated by two momentary push-buttons, one for the normal position and one for the reverse position. Actually each circuit can handle enough current to operate two stall motors, allowing two machines in a crossover to be operated by only one of the four circuits on the module.
Understanding the circuit operation is not required to be able to build and use the unit, but for those who want to know:

The two 7438 ICs are wired to form four latches which 'remember' the last push-button pressed for each of the four stall motors. Pins A1, B1, X1, and Y1 work as follows: when input pin A1 is momentarily connected to ground, output pin X1 goes down to ground, and output pin Y1 goes up to +5 Volts; when input pin B1 is momentarily connected to ground, output pin Y1 goes down to ground and output pin X1 goes up to +5 Volts. Similarly for A2, B2, X2, and Y2, A3, B3, X3, and Y3, and A4, B4, X4, and Y4. The outputs on pins X1 through X4 and Y1 through Y4 are used to drive indicator LEDs and other logic circuits.
The LM324 IC provides outputs on pins Z1 through Z4 for driving four stall motors. When output pin Y1 is at +5 Volts, output pin Z1 will go to the positive value of the stall motor power supply; when output pin Y1 is at ground, output pin Z1 will go to the negative value of the stall motor power supply. Similarly for Y2 and Z2, Y3 and Z3, and Y4 and Z4. The stall motor power supply is listed here as +12 and -12 Volts, but you can use any value from +5 and -5 Volts to +16 and -16 Volts, depending on which stall motor you use and how fast you want them to operate.
The circuit etch pattern and component placement diagram are given in Figure 2 for those who want to etch boards, rather than perfboard the circuit. Note that this is a double-sided board, which makes alignment of the two sides important if you etch your own. Iron on one side and drill two of the holes at opposite ends of the board, then iron on the other side with the two hole pads lined up on the two holes. Also, if etching your own boards, components mounted on the board need to be soldered on both sides to form the connections from the front to the back sides of the boards; use long-tailed IC sockets so you can solder the IC connections on the top.
Please be very careful to install C2, C3, and C4 to match the polarity indications in the component placement diagram; electrolytic capacitors will explode when power is applied if they are wired backwards.
This module, and most of the rest of the modules in the series, includes connectors instead of soldering the lead wires directly to the board. We put quite a bit of thought into what kind of connector we wanted, and settled on the Molex KK156 series. These connectors are durable, and will take quite a bit of abuse without bent pins and the like. We did not use screw terminals because we wanted to be able to substitute a spare module during an operating session without having to disconnect and reconnect a dozen or more wires from the screw terminals. Using the Molex KK156 connectors, if an IC lets go during an operating session, we can just go under the layout, unplug a couple of connectors, and plug in the spare module, letting it dangle by the wires under the layout until there's time for repairs.
The power supply connector includes one blank position, to be filled with a plug called a polarizing key to ensure the connector cannot be plugged in improperly. This is the one connector on this module which could destroy the module if plugged in incorrectly. You will need a crimp tool for the KK156 connector pins; this tool is Digi-Key WM9903-ND.
The module should be placed in or near the control panel to reduce the chance of electrical noise in the control leads. Multiple circuits can be mounted together on four #6-32 threaded rods using #6 nylon spacers between the boards, and #6 nylon washers and nuts at each end as in the photo. The assembly can then be mounted behind the panel or under the layout using nylon loop cable clamps (such as Digi-Key 7624K-ND) around the spacers.

The connector layout is shown in Figure 3. The power supply input pins are all on connector J1, together with the polarizing key. The input pins A1 through A4 and B1 through B4 (the normal and reverse push-button leads for each of the four circuits) are on connector J2. The output pins X1 through X4 and Y1 through Y4 (the normal and reverse LED indicator leads for each of the four circuits) are on connector J3. The output pins Z1 through Z4 (the stall motor leads for each of the four circuits) are on connector J4. From now on in this article, we will talk about a single SwitchLock circuit, with inputs A and B and outputs X, Y, and Z; this can be any of the circuits on the board, 1, 2, 3, or 4.
Note that the A and B inputs and X and Y outputs for each of the four circuits are directly across from one another to make it easy to remember the pinouts. When an A input is momentarily connected to ground, the X output directly across the board from it goes to ground and stays there. When a B input is momentarily connected to ground, the Y output directly across the board from it goes to ground and stays there.
The basic application of the circuit is shown in Figure 4. Normal and Reverse push-buttons are used to operate one stall motor and Normal and Reverse LED indicators. Note that we can use just one resistor for both the Normal and Reverse LEDs because only one of the LEDs will be on at a time. Only one of the four circuits of the module is shown in Figure 4; the other three can be wired similarly to operate four stall motors per module, following the connector diagram in Figure 3.

The Z output of each circuit connects to one stall motor lead, and the other motor lead is connected to ground. The Z output goes positive when the A input push-button is depressed, and it goes negative when the B input push-button is depressed. This means that only one wire per switch machine motor needs to be run from the panel out to the layout, with the other lead of all the stall motors connected to one common ground wire back to the power supply ground. If a stall motor goes the wrong way when you depress the push-buttons, swap the two wires at the motor.
The circuit inputs A and B can be connected to multiple momentary push-buttons connected to ground, to diode matrix circuits which connect to momentary push-buttons to ground, or to other electronics, such as train detectors, which have open-collector outputs to ground, as shown in Figure 5. The inputs require very little current to ground, so the smallest push-buttons will work quite well, even if you have a diode matrix button which actuates dozens of switches.

The X and Y outputs of each circuit can be used to run multiple LEDs by connecting them as shown in Figure 5. The X and Y outputs are each capable of 48 mA, so as many as three LEDs can be run from each output if the limiting resistor is chosen to result in a 15 mA LED current. For most LEDs, the resistor value is 220 Ohm 1/4 Watt (Radio Shack 271-1313). For two LEDs with 20 mA LED current, the resistor value is 150 Ohm 1/4 Watt (Radio Shack 271-1312). Note that we can use just one resistor for each pair of normal and reverse LEDs because only one of each pair of LEDs will be on at a time.
Bipolar (two-color) LEDs can also be operated using the Z output of a circuit as shown in Figure 5. The Z output of each circuit is capable of 20 mA total, so the bipolar LEDs should be connected in series with the stall motor. This will slow the stall motor down a bit, as the LED will use some of the motor voltage, but if you use these LEDs on all your stall motors, you can just use a value for the power supply voltage which is 2 to 3 Volts higher.
If high current is required to turn on or off an accessory or track power to a siding, a relay can be connected to the Z output of a circuit as shown in Figure 5. You might want to do this for a coal dumper which can be run from both sides of a peninsula, or for enginehouse tracks which can be turned on or off from both sides of the engine facility. This relay will operate on the sum of the positive and negative power supply voltages, so if you use plus and minus 12 Volts for your supply, use a 24 Volt relay.
Note that the other side of the relay is connected either to the positive or negative lead of the stall motor power supply, and not to ground. Try connecting the other side of the relay to positive power supply voltage first, and if the relay actuates the wrong way, change the other side of the relay from positive to negative power supply voltage. In either case you will need to put a 1N4001 rectifier diode (Radio Shack 276-1101) across the relay coil as shown in the figure to keep the coil shutoff surge out of the circuit. The banded end of the diode should be towards the positive power supply voltage, or away from the negative power supply voltage.
Another nifty application of the circuit is to implement electric lock switches off the main line. On the prototype, not every switch is controlled from CTC panels. Wiring remote control of every powered switch for every industrial siding on a railroad is prohibitively expensive. On the other hand, these switches need to be tied into the CTC block signal system so that Amtrak doesn't get a green signal into the lumber yard at 80 miles an hour. The prototype uses electric locks on these switches to occupy the block and ensure that block signals stay red when a switch crew has the switch unlocked.

Figure 6 shows the wiring for an electric lock switch using one SwitchLock circuit to be the lock, and one to operate the stall motor. For those using twin-coil machines, Figure 7 shows the wiring for an electric lock switch using one SwitchLock circuit to be the lock, and one SwitchWitch circuit from last month to operate the twin-coil switch machine. The diodes in both of these circuits are 1N4001 rectifier diodes (Radio Shack 276-1101). Note that the SwitchWitch in Figure 7 must be powered from the same plus and minus 12 Volt power supply as the SwitchLock for this to work; also one set of contacts on the switch machine must be used to connect the Lock push-button to ground when the switch machine is in the normal position. The SwitchWitch must be constructed to actuate when the inputs are grounded; this is the enhanced circuit from last month.

I won't try to explain how these circuits work here, but if you are interested, you should be able to puzzle it out. Note that the circuit does know how it works, so you don't need to in order to use it!
The buttons and indicators of this circuit should be located on the fascia adjacent to the switch to be locked, where the local crew can get at them when they switch the siding. When locked, the green Locked LED will be lit, and the Normal and Reverse push-buttons will be disabled. To switch the siding, the local crew pushes the Unlocked push-button first, which turns on the red Unlocked LED and knocks down the block signals for this block to red by pulling down the Occupied signal from the train detector to the CTC panel. The switch can then be operated using the Normal and Reverse push-buttons. The Occupied signal to the CTC panel will stay down, and the block signals will be held down to red, as long as the switch is Unlocked, even if it is in the Normal position. When departing, the train crew restores the switch to the Normal position and pushes the Lock button to relock the switch. The switch will not Lock in the Reverse position.
We will present the train detector and the CTC panel circuit we use to implement this setup in later articles of the series. This setup also works with many of the other train detectors and CTC panel circuits which are in use in the hobby. The key is that the train detector provides an open-collector output to signal occupancy to the CTC circuits. If you don't know what an open-collector output is, don't fret, just check the manual for your detector. If the detector has an open-collector output, copy the diagram; it'll work.
The electric lock switch is a really neat use of this circuit, and is the only way we know of to implement electric switch locks on industrial sidings as it is done on the prototype. Oh, and what do you do if the switch crew leaves the switch unlocked, tying up the main line so that the CTC operator can't get a green signal through the block? Same as on the prototype: you send signal maintenance out there to see what's wrong, lock the switch, and write up the train crew for rule infraction!
The power supply we used on Bill Pistello's Union Pacific is shown in Figure 8. This supply will put out 5 Volts DC at 1 Amp for the logic power supply, and plus and minus 9 Volts at 3 Amps for the stall motor power supply, which results in a pretty good actuation speed for Circuitron's Tortoises. If you want to use plus and minus 12 Volts for the stall motor power supply instead, substitute Radio Shack #273-1515 18.0 VCT transformer for the #273-1511 12.6 VCT transformer called for in the figure. Be sure to fuse the 110 Volt side of the transformer. If you are not experienced in wiring 110 Volt connections, get someone who knows what he's doing to help you!

We have installed eight of the SwitchLock modules on Bill Pistello's Union Pacific to control the stall motor switch machines in his Riverside, CA, yard. The SwitchLock modules, Riverside yard, the control panel, and the installation of the SwitchLock units and power supply under the layout are illustrated in the photos. It's important to note that, unlike the SwitchWitch units of the last article, the SwitchLock units are located close to the control panel to keep electrical noise in the control leads to a minimum.
Now that we have a stall motor switch machine control module which we can use on Bill Pistello's Union Pacific and Rich Weyand's N&W Pocahontas Division, the next words out of Bill's mouth were, 'You know, we could really use a good diode matrix board.' See you next time!