null > pinterest-site-verification=1a76c93b17e8cd89c9c7073bcb8f4d99

[Building Your Model Railroad is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to See Disclosure Page.

Fast Shipping!

Order Online Only 

The only online store with a comprehensive guide on how to build your own model railroad!

Free Shipping in Continental USA on Orders over $100

Pay over time with Sezzle or Paypal Credit - No interest and no effect on your credit!

Wiring and Control

Wiring and Control

Apr 11th 2021

Model Railroad Wiring

and Command Control

Computer-Operated Layout Using Digitrax Digital Command Control and CTI Train Brain Integration and Software.

Model railroad wiring is an extremely interesting facet of the hobby and definitely part of its appeal. Our layouts and landscapes aren’t just there for viewing. The electronics make things happen. Trains travel, lights come on and off, switches switch, campfires burn, signals change, smoke comes out of the stacks, train whistles blow, with the sounds of chugging in the background, video cameras attached to trains give you a front seat cab view of where the trains are going or a caboose view of where they’ve been, neon signs light up buildings and billboards, street lamps light up city streets, etc., etc.

Model railroad wiring is an extensive topic that one could write a whole book about (as are most of the sections of this website, incidentally). I’ll try to summarize some of the basic things to know for now and get into more detail in other sections of this website (See Special FX).

You may want to also see the page on Basic Electronics for a brief refresher course on circuits, resistors, voltage and current, etc.

Avoid Short Circuits by Matching Polarity

Throughout this discussion, no matter what type of model railroad wiring that you use, it's important to remember to always pay attention to polarity.

Think of the rails of your tracks as big long wires that extend around your entire layout. One rail serves as the positive "wire" and the other rail serves as the negative "wire". These tracks ("wires") carry the current that make your engines work.

Now think about your power unit, or transformer. The wire that is connected to the positive terminal of the power unit will carry the electrons from the power pack to one rail of the track making that rail the positive side of your track throughout the entire layout. The wire connected to the negative terminal on your power pack must then be connected to the other rail which carries the electrons back to the power unit. This makes that rail the negative rail for the entire layout.

In order to keep this straight for all your model railroad wiring, you should use different colors for the positive and negative wires.

If this consistency in polarity is not maintained, you will have short circuits. If positive rails are connected to negative rails, for example, nothing will work, and even worse, your equipment might be damaged.

Once you know this about model railroad wiring, then you realize that in order for a reversing loop to work, you have to have a section of that reversing loop that is isolated from the rest of the track. The polarity of this isolated section can be reversed as needed by a manual toggle switch, depending of which track you want your engine to travel on. In order for your engine to get on to the isolated track, the polarity of that isolated track must be the same as the polarity of the mainline track that the engine is coming from. When your train leaves the isolated loop, the mainline polarity has to be changed to match that of the isolated track your train is coming from. The wiring is illustrated in the following diagram...

Model Train Wiring for Reverse Loop Track

How do you isolate a section of track? - You do this by using rail gaps between the isolated section and the rest of the tracks on both ends of the isolated track.

How do you make rail gaps? - Use plastic rail joiners instead of metal rail joiners between the tracks that you wish to isolate. If you've already glued your track down and don't want to tear it up just to add plastic rail joiners,

it's easy just to take a rail saw and cut through the rail where you want the gap to be. To assure that the track doesn't expand and remake the connection by itself you can add a small piece of styrene to the gap or use a silicone sealer trimmed to make a smooth transition from one rail to the next. Make sure the joint is smooth as you run your finger across it, and especially that the inner aspect of the rail has no obstruction, in order to avoid derailments.

Types of Model Railroad Wiring for Train Control

Most of us will start out with just one transformer to control our one train. However, eventually you will probably want to get into running and controlling two or more trains at the same time. To do this, your model railroad wiring will have to get a bit more sophisticated; but it's not that difficult, and it's a lot more fun...

1. Analog (non-digital) Model Railroad Wiring

Common Rail Wiring for DC, or "analog", trains (those operated by Direct Current) helps to keep the polarity straight on your layout and allows for branches and sidings to be controlled separately. If you have an oval of track, one of the rails should be labeled as the "common rail" (which can be either positive or negative). The other rail will then be the "blocked" rail (the one that you will use to create insulated blocks). Having insulated blocks allows you to create branches and sidings that can be controlled separately from the main track.

According to the NMRA, the positive rail ( which may or may not be the "common" rail) is the one that is to the right of your locomotive as it is moving forward with the direction switch on the transformer pushed to the right. If that is not the case on your track, then ideally you should switch the leads on your transformer.

The common rail stays the same polarity around the entire layout. It is not always the inside rail or the outside rail. In the case of a figure-8 layout, the common rail is inside on one half the layout and outside on the other half. The common rail remains uninterrupted throughout the entire layout without rail gaps, except in the presence of a loop or a wye.

The other rail, the "not-common" rail (my term), or the "blocked" rail is the one that will need rail gaps to connect to branches and sidings. Power to this rail on a branch will be controlled by a switch. When the switch is off, the locomotive will sit on the branch without moving. When you want to activate power to that branch and move the locomotive, simply turn on the switch that goes to that rail.

This method of model railroad wiring is often referred to as "block wiring", since you can use this to have your layout divided into electrical blocks separated by rail gaps in the "not-common" or "blocked" rail (accomplished by using plastic rail joiners or simply by cutting a gap in just the one rail with a saw, as mentioned above). Each block is wired separately and attached to a toggle switch (on your control panel) that can be turned on or off.

In this drawing, the common rail happens to be negative and the "blocked" rail is labeled as positive. Note that the common rail is not interrupted by any rail gaps, but the "blocked" rail (in this case, positive) does have rail gaps that isolate the spurs, or branches so that they can be controlled separately with switches.

If you have just one cab (transformer) to power your layout, you can run the wires from this cab to a terminal strip, which will then carry the power to the toggle switches for the different blocks (or you can use the Atlas slide switches which greatly simplifies this wiring process).

Once you have this set up, the advantage of this type of model railroad wiring is that you can have several trains sitting in “blocked” freight yards, branch lines or team tracks, that won’t move when you want to power the train on your mainline. If you want to then park your train on a branch line, you turn the toggle switch “on” which powers that particular branch, throw the turnout and then power the train onto that branch. Once it’s there, you can turn that branch off and turn another branch on that contains a different train that you want to move out onto the mainline.

The only problem is that if you are using only one transformer, you can still only control one train at a time. If you want to control 2 trains, you will have to add another control unit or transformer…

In this situation, you have each cab connected to opposite poles of double pole toggle switches. If the toggle is thrown one way, Cab A controls the train in that block. If it's thrown the other way, Cab B controls the train in that block.

With this set up, you can now have 2 operators each controlling his/her own train in different blocks on the same layout. The simplest example of this would be to have one person doing all the switching and setting up consists in the freight yard while another person is running his train on the mainline.

This method of model railroad wiring is often referred to as cab control, which utilizes the common rail and block wiring methods described above to form a complete system of operating the layout using multiple transformers, controlled by different people (engineers, yardmasters, dispatchers, etc.)

If you have a large layout, you could potentially add more cabs and more operators to control different parts of the layout; and you could add rotary switches to dial in which cab is controlling a certain block.

Also with larger layouts, it is helpful to use “walkaround” throttles or cabs, so the operator (engineer) can follow his train around the layout. In this instance it might be useful to have the toggle switches placed in appropriate areas on the fascia corresponding to the area in which s/he is working (small sub-control panels).

If you want your model railroad wiring to be a little more interesting, you can have automatic block detection devices attached to certain blocks to...

a) power up a panel light to tell the chief dispatcher where your train is, or

b) automatically send an electrical impulse to a relay switch that can turn on or off another device (like a signal lamp for example).

If you have a crossing in your layout where there is a high risk of trains crashing into each other, you can put a block detection device on one arm of that crossing, such that when a train approaches and is detected by the device, it will automatically activate a relay to turn off the power to the track leading to the other intersecting arm of the crossing. The second train will then stop and allow the first train to go forward into the crossing.

The page on Automated Train Operation provides additional, more advanced, model railroad wiring information and special effects on how to get trains to start and stop automatically at certain places on your layout.


Using a Track Power Bus in Analog Model Railroad Wiring

A bus is a large 12-14 gauge wire that can serve as a common or ground wire to which a large number of feeder wires can be attached. 14 gauge should be the minimum size used for most layouts. If you have more than 80 feet of track, 12 gauge would be better.

For regular block wiring or cab control, you can use a 14-gauge power bus to power the common rail using feeder wires dropped down through the surface of the layout.

All the feeder wires from the common rail (black wires) can be connected to the one common power bus (black) that runs around your entire layout, usually below the plywood base.

However, the blocked rails will have red (doesn't have to be red, just any color other than the one used for the common rail) feeder wires attached, which will then go separately to toggle switches or slide switches on your control panel. You won't be able to use a bus for these wires because they have to be controlled with separate switches.

2. Digital Command Control

Digitrax Zephyr DCC for smaller layouts. Includes auto-reverse function for loops. Digitrax boosters can be added later if more power is needed.

Link to ZEPHYR and other DCC Items

Digital command control (DCC) is a newer form of model railroad wiring and train control in which each locomotive can be separately controlled from one power unit or from one walkaround throttle. There is no need for blocks (except in the instance of reversing tracks, discussed later) or for turning power on and off to different sections of track.

Each locomotive has to be fitted with a special decoder device programmed to accept signals from the power ( or control) unit when that particular decoder is “dialed in” from the control unit. In this case there is power going to all the tracks all the time: however, only the loco that is “dialed in”, will be responsive to the power unit.

If you have 2 operators, each will have to have his own control unit to run his particular train. Each person can change the loco they wish to control by making a number selection on their control unit or throttle.

Digitrax DCC Advanced Starter Set

The decoders control more than just power to the wheels. They can also control headlights, ditch lights, sound, etc. There are also decoders made for electrical remote turnout devices (e.g., Digitrax 4 turnout control device)

Digitrax DCC 4 turnout control device

so that you can control your turnouts as well as your loco by touching different numbers on your walkaround throttle. This way, you can walk around the layout, following your train, controlling where it goes by switching turnouts, stopping at stations or industries along the way, backing up into a branch to spot a car, then moving back into the mainline again – all with the handheld throttle.

DCC model railroad wiring is considerably less labor-intensive with this method of train control since all tracks can be wired with feeders going into the same bus lines running under your layout, with the common, or negative, rail connecting to the common bus wire, and the positive rail connecting to the positive bus wire. There is no need for wiring different blocks of track separately, each block requiring a separate switch, as in DC wiring.

When you install a new decoder or after you purchase a new DCC-equipped locomotive, you have to program it so that your system will recognize it. Make sure you use an isolated section of track to program your new loco. Otherwise all the locos on your entire layout will become programmed with the same code.

When you do have to isolate tracks on a DCC powered layout, make sure you isolate both rails to avoid short circuits. This is different from block wired cab controlled layouts where only one rail needs to be blocked to isolate a section of track.

You can purchase automatic reversing units, train detection and location devices, sound devices for your locos, etc. to further enhance your DCC model railroad wiring. If you have a section of track that loops around and reconnects to itself (reversing loop), I would strongly recommend that you buy an auto reversing circuit for this. It will save you from complicated wiring and toggle switches, and the trains will run smoothly through it without starting and stopping. You will have to use plastic rail joiners, or rail gaps, at both ends of the loop before it reconnects to itself to prevent a short circuit.

Wiring for a DCC Reversing Module

Wye reversing tracks can be wired in the same way with the output from the auto reversing module attached to the isolated track rails. When the locomotive travels into the wye and then backs out into the opposite limb, the polarity is automatically reversed.

Wiring for Wye Reversing Tracks for DCC

If you would rather not purchase an auto reversing module right now, you can still wire it for manual toggle switch operation. Just connect the wires from one DPDT switch to the isolated track on the wye and attach another DPDT switch to the mainline, the same as it is for the reversing loop noted in the section on polarity...

Atlas makes a "Twin" switch which basically contains 2 DPDT switches to help simplify this wiring. This Twin switch can also be used in the same way for the manual control of the reversing loop.

Circuit Breakers

Speaking of short circuits in DCC model railroad wiring, some people do recommend that if you have a large layout, you should create 2 or more electrically separate regions of the layout and connect them to circuit breakers, such that if you do get a short circuit somewhere in one region, it will automatically break the circuit to that region only and won’t affect other areas of the layout. This may be helpful during a group operating session, where most of the model railroad wiring and layout will still work even if there’s a short circuit in one area. This may be easy to fix or it may require some troubleshooting. You don’t want your whole operating session to have to shut down due to one little technical problem if you can avoid it. The PM42 Digitrax Power Manager device makes it easy to connect up to four sections of your layout to one booster, or power station.

Instead of circuit breakers, you could have separate boosters, each with its own built-in circuit breaker operating each large section of the layout. This would provide more power to each section. However, you have to be sure the boosters are in phase with each other or you will have a short circuit as your locomotive crosses from one section to another,. If this happens, reverse the leads on one of the out-of-phase boosters and that should correct the problem.


Of course, the downside is that DCC model railroad wiring costs more to set up. Also, you need to have all your locos equipped with decoders. If they haven’t already been installed by the manufacturer, you will have to enlist your hobby shop to install them for you or install them yourself if you wish. Some locos come from the factory with the label “DCC ready”. In this case you have to buy the decoder separately, take off the shell of the loco and plug the decoder into the plug supplied for this within the loco. If the loco is not DCC ready, you will need specific instructions on how to install the decoder which can be found in specific articles and books on the subject and which may vary depending on the decoder and the particular loco.

Can you find and use decoders for N and Z scale trains? The answer is definitely “Yes”, although installing them if they are not already installed may be somewhat challenging and may require some physical modification to the inside of the loco in order to get everything to fit properly. You can often get specific instructions from the manufacturer of the decoder or the locomotive on how to do this for those particular devices. Also, there are certain hobby shops that will install them for you, for a fee. If your local shop doesn’t, you can send your loco in the mail to one that does and usually get it back within a few weeks.


There are a number of different manufacturers of DCC control systems

available, which makes it somewhat difficult to decide which one is right for you. This decision will most likely depend on the size of your layout, the ease of use, the expense, and whether the system is expandable. An excellent paperback book that may be helpful to read before making a long-term commitment to a particular DCC system is The Dcc Guide: How to Select and Use Your Command Control System.

Layout Command Control

LCC, or Layout Command Control, is an enhancement for DCC developed and standardized by a group within the NMRA, called OpenLCB, allowing for faster and more reliable signaling to locomotives and other decoder-operated devices by adding an LCC bus to the DCC bus. The LCC bus carries all the non-engine signals, like light, sound, etc. freeing up the DCC bus to just take care of the locomotive-engine movements. Read more about LCC on the Layout Command Control Page.

Control Panels for Model Railroad Wiring

Simple control panel for Digitrax Zephyr DCC controlled model railroad layout. The small Atlas slide switches on the right are for controlling the turnouts. They are arranged to correlate with the location of the turnouts on the layout.

Model Railroad Control Panel

A more sophisticated control panel for a larger model railroad

If you have a layout with any more than a simple oval, You should consider using a control panel - a central place, or hub, for your model railroad wiring, where all your switches, transformers and basic trackplan resides for you to electrically control everything that happens on your layout. You may even want additional smaller control panels placed at strategic locations around your layout if necessary for local control.

Some model railroaders with large layouts will even have a large dispatcher's desk, where the chief dispatcher sits and regulates the flow of trains by communicating with headsets to the other folks in the room who are operating the trains.

As you get into more advanced model railroad wiring applications, you may also want to consider computerizing your layout. It's not as difficult as it sounds and you don't have to be a computer programmer to do it. This is a great way to really optimize your train layout control with state-of-the-art electronics.


Keep Your Wiring Neat and Organized

Your model railroad wiring can become quite extensive even on small layouts if you have a lot of remote turnouts, building lights, multiple track blocks, block detectors, etc. Try to remember as you go along to keep your wiring neat. Bundle wires that are going to the same areas with plastic ties. Use plastic hooks on the underside of your layout to carry these wire bundles from one place to another. Label your wires so you know where they go or what they're for. You will thank yourself many times over when you have an electrical problem 2 years from now.


There is obviously much more that can be written on model railroad wiring, but the above review can get you started. Check out your local hobby store for books with more information and various electrical projects that you can do on your layout.

One book in particular, Creative Effects for your Model Railroad, by Paul Newitt, is a goldmine of information on basic model railroad wiring, but also includes all kinds of special electrical effects specifically for model railroads, including signaling, sound effects, electroluminescence, automated track circuits, animation effects, smoke and fire simulation, etc. You might be able to find it at your local hobby shop or train show, or you can order it online...A Beginner's Guide to Creative Effects for your Model Railroad.

This page was last updated on March 21, 2021.

Q&A for Model Railroad Wiring
How to make holes for the track feeders
Q - To make a hole for the track feeders: I will use the Atlas Terminal Joiners (the ones that come with the rail joiner and the cable). Which tool can I buy to make the holes starting in the roadbed, going through the risers and ending in the underside of the layout, so I can pass the track feeders??

A - What I have done is to buy a long enough 1/4" drill bit to get through the entire thickness of the risers, roadbed, subroadbed and anything else you have to go through to get to the bottom of the layout. Then buy a long brass (or other metal) 1/4" tube (or slightly smaller) and thread it through the hole. Then thread the wire (an extension from the terminal joiner wire) through the metal tube from the top to the bottom. Use a small fishing weight on the end of the wire if necessary to help pull the wire through the tube to the bottom; or use a stiff straight guide-wire with the thin electrical wire attached to one end and thread it through the tube with the guide-wire going in first. Once the wire is all the way through, you can pull the tube out being careful not to pull the wire out along with it. Then you can re-use the same metal tube for the next hole.

The other thing you can do to avoid a lot of drilling is to run 2 bus wires along the base of the risers and and attach the feeder wires from the tracks to the bus wires. This will be a lot easier and accomplish the same task. The bus wires would then be connected to your track power source. The bus wires can then be easily covered up by your scenery. Just make sure you solder and insulate the connections well. You won't be able to use bus wires for the lighting and the accessories or turnouts because you will want to control each of these things separately with a switch on your control panel.

(Reprinted with edits and permission from


Note: All non-product photos used on this site have either been taken by the author or the licenses have been purchased.

©Copyright 2020-2023. All rights reserved.