Building a DCC-EX Command Station

Building a DCC-EX command station is one of the easiest and most affordable ways to get started with DCC. If you’re comfortable with basic electronics or have built an Arduino project before, you’ll find the process straightforward. For a deeper dive into DCC-EX, including build-versus-buy considerations and the many available hardware options, visit the DCC-EX website.

If you’d rather skip the research, build a DCC-EX command station using a proven set of parts and get your model trains running, this guide is for you. The following sections describe a simple DCC-EX command station configuration that has become the “standard” DIY DCC-EX build because the parts are inexpensive, widely available, and well supported. You’ll find a complete parts list along with easy-to-follow assembly instructions.

If you’d rather skip assembling your own DCC-EX command station then you can purchase a pre-assembled unit directly from the DCC-EX group or one of their resellers.

Before You Start

This guide assumes you’re comfortable with basic electronics or you’ve assembled simple Arduino projects before but have never built a DCC command station. No soldering is required. You’ll only need a screwdriver, wire stripper and about 30 minutes. Genuine Arduino or compatible Mega 2560 boards both work fine.

information

Note

All assembly steps below are set apart as bullet-items for easy distinction between “wordy-words” and the steps required to assemble the DCC-EX. So, if you already have a good general understanding of assembling a DCC-EX then just look for the bullet-items and supported images.

Parts List

If you buy through these links, we may earn a small commission at no extra cost to you.

Notes: Genuine Arduino Mega 2560 boards and compatible clones both work well. The 9V power supply powers the Arduino and the electronics. The 12V supply powers the trains. They intentionally remain electrically separate as you will see below when you connect the Mega 2560 and the motor shield. Here is an image of all the parts you will need.

Connect Arduino to Motor Shield

Gather the Mega 2560 Microcontroller board and the Motor Shield board. The Mega 2560 is the brains behind the entire DCC-EX command station. It generates the timing and signals required for DCC to control your layout. The motor shield is the brawn behind the DCC-EX command station. It generates the necessary power (voltage and current) and transfers the DCC signal to your layout to control your trains.

The motor shield plugs directly into the Mega 2560 and sits on top of it.

  • The power output block (the blue, or sometimes green, terminal block with 6 screws) on the motor shield should face the same direction as the USB port on the Mega 2560 board
  • NOTE: Ensure the power pin labeled “Vin” or “VCC” is NOT aligned within the Mega 2560 board (see image below – that pin should hang outside of the Mega 2560 female header. This is so the power of the Mega 2560 board and the motor shield can remain isolated from each other)
  • Carefully align all pins and verify that every pin is entering its matching socket before pressing the boards together.
  • The final result should look like the image below (take note of the single Vin/VCC pin which is NOT sitting in the female header)
warning

Warning!

Aligning the Vin/VCC pin is the single most important step in the build. If the Vin/VCC pin is inserted into the Mega header, the Arduino and motor shield power supplies become connected together, which can damage the hardware.

Here’s an up-close image of the motor shield’s Vin/VCC pin slightly bent out so it does not sit in the female header of the Mega 2560 board. You can cut-off that extending pin if you prefer.

Connect WiFi to Motor Shield

  • Remove any jumpers on the WiFi shield’s 24-pin header (you can either remove the small black jumpers completely or have them hanging off a single pole on the header). These jumpers are only used when programming the ESP8266. They must be removed for normal operation with DCC-EX.
  • The WiFi board sits on top of the Motor Shield
  • The 24-pin header on the WiFi shield must be positioned opposite the USB port on the Mega 2560 board
  • Carefully align all pins and verify that every pin is entering its matching socket before applying pressure to the WiFi shield (note the pins might not seat entirely within the female headers – this is okay)

Connect Jumper Wires

Two jumper wires are required to connect the Mega’s serial port to the ESP8266 WiFi module. TX1 transmits data from the Mega to the WiFi shield, while RX1 receives data back from the WiFi shield. This allows the Mega to communicate with a wireless throttle, such as DCC Commander, via a WiFi network connection.

  • Connect one jumper wire from pin 18 (labeled TX1) on the Mega 2560 board to the left-most pin on the first row of the 24-pin header of the WiFi shield (see the text and arrows in white on image below)
  • Connect a second jumper wire from pin 19 (labeled RX1) on the Mega 2560 board to the right-most pin on the first row of the 24-pin header of the WiFi shield (see the text and arrows in yellow on image below)
information

Note

The left-most and right-most pins are referenced when holding the Mega 2560 board such that the USB port is pointing upwards and the WiFi shield pointing towards you (also, see arrows on image below)

Jumper wires connected to the Mega 2560 and WiFi shield:

The assembled DCC-EX command station:

Assemble Power Plug

Assemble a power plug to be used for easily plugging in the power supply for the layout to control your DCC trains and accessories.

  • Cut 2 wires about 4″ long using the 20 gauge wire and strip about 1/4″ of insulation from both ends
  • Loosen the screws in both of the terminals of the power connector
  • Insert the wires into the slots below the screws
  • Polarity matters, note the + and – on the power connector above the screws (for consistency, use the red wire for the + connector and the black wire for the – connector)
  • Tighten-down the screws in both of the terminals of the power connector to secure the wires
  • Gently tug each wire afterwards to ensure it is secure
  • Ensure no exposed copper is visible

Cut Track Power Wires

You will need wires to connect the output of the motor shield to your layout to control trains and accessories.

  • Cut 2 (or optionally, 4, if you’re going to use a programming track in addition to the Main track) pieces of 20 AWG wire long enough to reach from the DCC-EX to the track on your layout (for consistency, use red wire for + and black for – )
  • Strip about 1/4″ of insulation from all ends of the wires

Connect Power Plug to Motor Shield

  • On the blue power terminal strip on the motor shield, locate the Power In + and Power In – poles (these should be located just above the USB port on the Mega 2560)
  • Loosen the screws in both of the terminals
  • Insert the wires from the power plug into the slots below the screws
  • Polarity matters, note the + and – on the power connector above the screws
  • Tighten the screws in both of the terminals of the power connector
  • Gently tug each wire afterwards to ensure it is secure
  • Ensure no exposed copper is visible

Connect Main Track Power Lead Wires to the Motor Shield

  • On the blue power terminal strip on the motor shield, locate the PA + and PA – poles (these should be located just above the USB port on the Mega 2560)
  • Loosen the screws in both of the terminals
  • Insert one black wire (on the – pole) and one red wire (on the + pole) below the screws
  • Polarity matters, note the + and – on the power connector above the screws
  • Tighten the screws in both of the terminals of the power connector
  • Gently tug each wire afterwards to ensure it is secure
  • Ensure no exposed copper is visible

[Optional] Connect Programming Track Lead Wires to the Motor Shield

  • On the blue power terminal strip on the motor shield, locate the PB + and PB – poles (these should be located just above the USB port on the Mega 2560)
  • Loosen the screws in both of the terminals
  • Insert one black wire (on the – pole) and one red wire (on the + pole) below the screws
  • Polarity matters, note the + and – on the power connector above the screws
  • Tighten the screws in both of the terminals of the power connector
  • Gently tug each wire afterwards to ensure it is secure

Complete Hardware

Congratulations! Your DCC-EX hardware is built and ready to use. It should look something like this:

Final Hardware Checklist

Before applying power, confirm each item below:

✅ Motor shield fully seated on Mega 2560
✅ Vin/VCC pin NOT inserted into Mega 2560
✅ WiFi shield jumpers removed
✅ WiFi shield fully seated on motor shield
✅ TX/RX jumper wires installed from Mega 2560 to WiFi shield
✅ Power plug polarity correct
✅ Main track and programming track wires polarity correct

Initial Power-Up

A quick test to verify everything is looking good. After applying power, if you feel any heat from any of the boards or see any visible smoke then disconnect power immediately and review the checklist again. If you saw smoke then you’ll likely have to replace the part that smoked – extremely rare though!

  • Power on the Mega using the 9V power supply first on its own
  • You should see a solid green LED light up on the Mega and possibly some blue LED’s blink on the WiFi shield but not much else to see yet
  • While keeping the Mega 9V power supply plugged in, plug in the motor shield 12V power supply
  • You should see the 4 LED’s next to the blue power header on the motor shield blink. Pressing the small toggle button on the motor shield should reset the motor shield and blink those lights again. Not much else to see yet
  • If the LED’s light up then you can claim success. Congratulations!

Next Step

The next step is installing the DCC-EX firmware. Once that’s done, you’ll be ready to connect your command station to your layout and begin running trains.