Skip to content
MCU Atlas
ARDUINOESP32ATMEGA2560ESP8266

DCC-EX EX-CommandStation: a Wi-Fi DCC command station for your model railroad, run from phone throttles

Turn an Arduino Mega 2560 and two stacking shields into a Wi-Fi DCC command station: flash DCC-EX, then run your trains from throttle apps on your phone.

Difficulty:BeginnerSource available

What it is

Turn an Arduino Mega 2560 and two stacking shields into a Wi-Fi DCC command station: flash DCC-EX, then run your trains from throttle apps on your phone.

What you need

  • ELEGOO Mega 2560 R3 the clone DCC-EX's purchasing guide recommends; the Arduino that runs the station
  • L298P Shield R3 motor driver (Deek-Robot type) the booster — the power stage that drives the rails; 1.3–1.5 A class
  • Makerfabs ESP8266 WiFi Shield v1.1 (EX-WiFiShield 8266) stacks on top; the station's Wi-Fi and WiThrottle server
  • 12 V 5 A power supply (LEDMO-class) docs-recommended brick for the track side — never power the track from USB
  • Track feeder wire + screw terminals two feeders: A = main track, B = isolated programming track
  • Two male-to-female jumper leads crossed Tx/Rx links for the Wi-Fi shield after removing its plastic jumpers

How hard

Beginner (matching DCC-EX's own 'Conductor' tier for this stack): flash with the EX-Installer, stack three boards, land two track feeders — no soldering, with one knife cut on the motor shield and two crossed jumper wires as the whole of the board prep. Budget one to two hours to a first lap. The ESP32-WROOM route is 'Tinkerer' level and is a second project, not a first.

Key Facts

  • Free GPL-3.0 command-station firmware: Arduino Mega 2560 + motor shield + ESP8266 Wi-Fi shield = a complete DCC station, no handheld throttle to buy
  • Built-in WiThrottle server + native DCC-EX protocol; supported throttles: Engine Driver, JMRI, wiThrottle, EX-WebThrottle (browser)
  • Budget electronics $47.93 — Mega $22.99 + L298P shield $14.99 + Makerfabs Wi-Fi shield $9.95 (checked 2026-11-16; the Mega showed $19.54 at a 2026-11-27 re-check, holiday-week pricing); ~$60.81 all-in with the docs-recommended 12 V 5 A supply, assuming the Mega stays USB-powered from the flashing PC — a standalone budget station adds a 7–9 V Mega supply, and the EX-MotorShield8874 powers the Mega itself
  • Upgrade motor board EX-MotorShield8874: 2 outputs, 5 A, short-circuit protection — electronics $57.94–67.94 (store $44.95, US resellers $34.95–39.90, checked 2026-11-16); ready-made EX-CSB1 $132 without power supply, $159.80 with
  • v5.6.0 production release (May 2026) drops UNO/Nano; Mega 2560 is the recommended DIY build, ESP32-WROOM is 'Tinkerer' level with hardware mods
  • Actively maintained: v5.6.0 production May 2026, v5.6.6 production release current at a 2026-11-27 check, repo pushes Nov 2026
  • Hobbyist framing, verbatim from r/modeltrains: "a command station you can create yourself using an Arduino or similar device, which can cost less than $100 if you use your phone as the throttle with a free app" — and, from the "When DCC is Too Expensive" thread: "DCC-EX is a very affordable way to get into DCC — costs less than $100"
  • The DCC-EX team's 2023 pitch (a team member, stale at 2026 prices, attributed): "Right now you can buy a Wemos ESPDuino-32 and our EX-MotorShield8874 and have a 5Amp per track WiFi Command Station for under $50 US." — today that ESP32 combo sits around $45–58 before any power supply; the version that still holds is the Mega stack in the parts list

About This Project

For a parts stack that costs a fraction of a commercial starter setup — an Arduino Mega 2560 clone, a motor-driver shield and a Wi-Fi shield — you can flash the free DCC-EX firmware and run your whole model railroad from throttle apps on the phones already in your pocket. That is a complete DCC command station, the box that model railroaders in the threads we checked say a commercial Digitrax or NCE starter setup asks hundreds of dollars or more for, and here it's a shield sandwich with no soldering. The checked, dated prices — budget electronics, all-in with power, and the upgrade path — are in the key facts and the Parts list below. DCC, quickly: Digital Command Control puts power and control on the same two rails, with a small decoder in each locomotive listening for packets addressed to it — so you can run several locos independently on one track, lights and sound and all. A command station is the box that generates that signal and drives the rails; a throttle is what you hold. EX-CommandStation, the DCC-EX team's flagship firmware (GPL-3.0, free), runs that whole job on an Arduino Mega clone: motor shield for the rails, ESP8266 Wi-Fi shield stacked on top, and a built-in WiThrottle server — WiThrottle is one of the two throttle protocols the station speaks, alongside DCC-EX's own — so Android phones running Engine Driver, or JMRI, the wiThrottle app or a browser-based EX-WebThrottle, connect over your home Wi-Fi as throttles.

It is written for newcomers: DCC-EX's own hardware table calls this stack "Conductor", their beginner tier, and the recommended first build is stacking shields and flashing with an installer, not wiring a protoboard. Honest framing, because the internet is full of stale DCC-EX advice: since firmware v5.6.0 (May 2026) the Arduino UNO and Nano are no longer supported, so ignore any older tutorial built on them; the ESP32 route people keep recommending is real but "Tinkerer"-level — the DCC-EX docs warn that ESP32-WROOM boards "Most require hardware modifications to work". And while the budget electronics stack lands far under the price of any commercial starter system, a realistic all-in first build adds the docs-recommended 12 V power supply and (on the budget motor shield) keeps the Mega USB-powered from the computer you flash it from — the exact checked figures are in the key facts and the Parts list. Still an order of magnitude under the commercial box, and it's a first microcontroller project with a purpose: at the end of the afternoon there's a railroad, not a blinking LED. MCU Atlas is not affiliated with the DCC-EX team.

Why build it

The usual blocker into DCC is the starter-system price tag. This is a recurring theme in the hobby threads we verified: a returning modeler who had used Digitrax for twenty years recommends DCC-EX to a beginner on r/modeltrains as a build-it-yourself command station on an Arduino-class board with your phone as the throttle and a free app — no hardware throttle to buy at all. Another r/modeltrains thread titled "When DCC is Too Expensive" sums it up in its top comment: DCC-EX is a very affordable way to get into DCC. Both threads land on the same ceiling for the whole setup, and our checked parts list comes in under it (the verbatim quotes, and the numbers, are in the key facts above). Even the DCC-EX team's own 2023 pitch — a 5-amp-per-track Wi-Fi command station from a Wemos ESPDuino-32 and their EX-MotorShield8874, for a price it has since drifted past — the verbatim quote and today's checked figure are in the key facts above. The version of that promise that still holds in 2026 is the Mega stack in our parts list, verified the day we wrote this. And if you'd rather not build at all, the same team sells the EX-CSB1 (Booster One Express), a ready-to-run ESP32-based station with built-in Wi-Fi and dual 5 A outputs — still far below the commercial systems the community compares against (checked prices are in the key facts). Why build it anyway? Because for a model railroader this is the friendliest possible first microcontroller project: the parts are three boards that stack, the firmware is flashed by a point-and-click installer, and the payoff is your layout running — the microcontroller is a means, not the point.

What you get

A real command station, not a demo. EX-CommandStation generates the DCC signal and drives the rails through a motor shield; DCC-EX's own line runs from this free firmware up to commercial hardware, and it is actively developed — the current production release is v5.6.6 (checked 2026-11-27), a bugfix release on the v5.6 line that began with May 2026's v5.6.0, with development commits continuing through autumn 2026.

Wi-Fi throttles included. The station runs a standalone WiThrottle server plus the native DCC-EX protocol, so supported throttles include Engine Driver on Android, JMRI, the wiThrottle app and EX-WebThrottle in a browser. Your phone is the throttle; there is no handheld to buy.

Shield-stack hardware. On the recommended Mega build everything stacks: motor shield for the track outputs, ESP8266 Wi-Fi shield (the "EX-WiFiShield 8266", co-designed with DCC-EX) on top. Two track outputs on the supported motor boards.

Room to grow. The budget motor shield is fine for a small layout; the team's EX-MotorShield8874 (two outputs, 5 A, short-circuit protection) takes the same firmware to a bigger railroad, and the EX-CSB1 is the plug-and-play ceiling.

Open and free. GPL-3.0 firmware, downloads and installer from dcc-ex.com, hardware sold at the team's own store to fund development. No subscriptions, no lock-in.

The hardware you need

The budget build is three stacking boards — every item a supported, beginner-tier ("Conductor") part in DCC-EX's current hardware tables: an ELEGOO Mega 2560 R3 (the clone DCC-EX's purchasing guide recommends), an L298P Shield R3 motor driver of the Deek-Robot type (listings sell it explicitly "for DCC-EX Command Station and Model Railroad Automation"), and the Makerfabs ESP8266 WiFi Shield v1.1 — the "EX-WiFiShield 8266", co-designed with DCC-EX. Line-by-line prices with their check dates are in the Parts list below, and the subtotals — budget electronics, all-in with power, and the upgrade stack — are in the key facts.

Power note, because it matters: with the budget motor shield the stack needs the Mega powered separately from the track supply — either USB from the computer you flash with (that is how the all-in figure in the key facts is calculated) or the Mega's own 7–9 V tip-positive supply (the docs' purchasing list, item 07). The 12 V brick feeds the motor shield only. The EX-MotorShield8874 changes the math: it powers the Mega itself, so a standalone station on that board needs just the one track supply.

The upgrade path swaps the motor shield: EX-MotorShield8874 RevA — two outputs, 5 A per the docs, with short-circuit protection — sits at the electronics price recorded in the key facts, at the DCC-EX store and US resellers per the docs. If you are eyeing the ESP32 instead: ESP32-WROOM dev boards are individually cheap, but that route is "Tinkerer" level and most boards need hardware modifications, so it is not this page's build.

Wiring is the friendliest part: the two shields stack directly onto the Mega — motor shield in the middle, Wi-Fi shield on top — so there is no breadboard and no soldering if your boards arrive with headers pre-soldered. The only prep is two steps in the build sequence below: one knife cut on the budget motor shield, and two crossed jumper wires on the Wi-Fi shield. Your two track feeders (one per rail pair) go to the motor shield's output terminals — A is the main/operations track, B the programming/service track, which the docs expect electrically isolated from the main — and the 12 V supply feeds the motor shield's power input; the Mega is flashed over USB. The wiring overview and terminal names are in DCC-EX's DIY guide (linked below), and the motor board's current rating is the number that sizes your layout — see the safety notes before you power up.

Build and flash

Six steps, condensed here — the full sequence is in the tutorial below. Get the installer from dcc-ex.com's download page: the EX-Installer puts the firmware on the board for you (the current production release is v5.6.6, checked 2026-11-27), and DCC-EX's own DIY walkthrough walks the whole sequence — installer, board, motor shield, first config — as the team's maintained source of truth. Prep the boards before stacking, the step beginners skip: on the budget L298P motor shield, disable power sharing by cutting the Vin trace on the underside of the board (a few firm strokes with a hobby knife) or bending or snipping the Vin pin — left shared, the shield can feed track voltage into the Mega and damage or destroy it, and the EX-MotorShield8874 does not need this. Then, on the Wi-Fi shield, remove the two plastic jumpers and fit the two male-to-female jumper leads, crossed: Wi-Fi Tx to Mega pin 19 (Rx1), Wi-Fi Rx to Mega pin 18 (Tx1). Still a no-soldering build — a knife cut and two jumper wires are the whole of the board prep. With the Wi-Fi shield stacked, the station serves WiThrottle to your network, and in the EX-Installer you pick the motor driver type, tick that you have Wi-Fi, then choose Access Point mode (the station broadcasts its own network) or Station mode (it joins your home Wi-Fi). Power last: USB to the Mega for flashing; the 12 V supply to the motor shield only when you're ready to put power on the rails. And skip stale tutorials — anything flashing an UNO or Nano is pre-v5.6.0 and will not work on current firmware; v5.4.x was the last series supporting them.

First session: connect Engine Driver and run trains

Install a throttle — Engine Driver is the free Android throttle DCC-EX's throttles page lists first; JMRI, the wiThrottle app and a browser-based EX-WebThrottle are alternatives. Put your phone on the same Wi-Fi as the station and point the throttle app at it — the station is running its WiThrottle server. Acquire a locomotive by entering the DCC address your loco's decoder is set to (a factory decoder's default address is in its manual; most locos sold as DCC-equipped arrive ready), and the app becomes that engine's throttle: speed, direction, lights and sound functions. Extra phones (or a JMRI machine, or the web throttle) connect the same way — each tends to its own engine. Running two locos as one consist, and re-addressing decoders on a programming track, are standard DCC-EX territory once the basics work. The step-by-step is in the tutorial below.

Difficulty and time

DCC-EX's own hardware table rates the Mega stack "Conductor" — their beginner tier — and that matches our read: flash with an installer, stack shields, land two track feeders. Budget one to two hours for a first build from parts-in-box to first lap (flashing, config, wiring check, throttle connect) — that's our editorial estimate, not a repo promise. The difficulty comes back if you insist on the ESP32-WROOM route: "Tinkerer" level in the same table, and the docs warn those boards "Most require hardware modifications to work". That's a second project, not a first.

Tips and gotchas

The motor shield's current rating sizes your layout. In DCC, the power stage that drives the rails is called a booster — on this build the motor shield is that booster. The L298P/Rev3 shield class is a 1.3–1.5 A device: fine for a small layout and a couple of locos, not a club railroad. The EX-MotorShield8874 is a 5 A board with short-circuit protection. Never hang more track on a shield than its rating; grow with bigger DCC-EX hardware instead.

Cut the Vin trace on the budget shield before you power it. Standard motor-driver shields like the L298P share their power with the Arduino through the stacking pins by default — the docs warn this can supply too much voltage and damage or destroy the Mega. Cut the Vin trace on the underside of the board or bend/snip the Vin pin before stacking (the DIY assembly guide makes this its first step); the EX-MotorShield8874 is exempt.

Power the track from the 12 V supply, never from USB. The docs-recommended brick is a 12 V 5 A LEDMO-class supply, scoped by the docs to Z and N scale (many HO modellers want ~14 V); the Mega's USB connection is for flashing and console only. With the budget shield that means two supplies — the 12 V brick for the track side, USB or a 7–9 V supply for the Mega — while the EX-MotorShield8874 needs only the one.

Some motor boards simply don't work. L293D-based shields (Kuman kits and friends) are not supported by CommandStation-EX, and L298-clone shields "require modification for use with 3.3V ESP32-WROOM" — two reasons the beginner build is the Mega, not an ESP32 dev board.

Don't follow UNO/Nano tutorials. Support ended at v5.6.0 (RAM and flash limits); v5.4.x is the last series that runs them, and staying there means missing fixes.

Price stamps go stale. Every figure on this page was live-checked 2026-11-16, and the four budget-stack items were re-checked live on 2026-11-27: three held while the ELEGOO Mega showed holiday-week pricing below its recorded figure — the under-fifty electronics claim holds with margin at either price (the dated numbers are in the key facts and Parts list). Treat every total as a snapshot, not a promise.

Two DCC-EX levels you'll meet in the docs. "Conductor" is their beginner tier (this build), "Tinkerer" means expect modifications — the docs use the same words for hardware and software paths.

License and credits

EX-CommandStation is GPL-3.0 — verified against the repo's license via the GitHub API, not just the README's say-so. It is developed by the DCC-EX team, who also design the hardware (EX-MotorShield8874, the EX-WiFiShield 8266 co-designed with Makerfabs, the EX-CSB1 command station/booster) and sell it at store.dcc-ex.com to fund the project. The hobbyist quotes on this page are from public r/modeltrains threads; the 2023 under-fifty pitch is from a DCC-EX team member and is flagged as such — and as stale at 2026 prices. MCU Atlas is not affiliated with the DCC-EX team; prices on this page were checked 2026-11-16 and re-checked 2026-11-27, and will drift.

Skill takeaway

The transferable idea: a microcontroller plus an H-bridge motor driver is a protocol gateway. DCC is just packets riding a power line, and the same pattern — cheap controller, driver stage, firmware that speaks an established hobby protocol — builds DMX lighting gateways, CNC controllers and LED installations; see everything on the /esp32/ hub for the Wi-Fi-microcontroller side of the skill (the Wi-Fi shield here is ESP8266-based, and DCC-EX's own ready-made station is an ESP32). The second lesson is ecosystem reading: DCC-EX rewarded us for checking the maker's current docs instead of repeating forum wisdom — the forum-recommended ESP32 build and the famous 2023 under-fifty pitch had both aged out. That habit — maker docs first, threads second — is the real beginner skill.

Source & Attribution

Creator: DCC-EX team
Source: GitHub
License: GPL-3.0 (verified via the GitHub API license field, checked 2026-11-16 and 2026-11-27)
Last verified: 11/27/2026
DCC-EX EX-CommandStation: a Wi-Fi DCC command station for your model railroad, run from phone throttles

Illustration

How to Build It

Stack two shields on an Arduino Mega 2560, flash DCC-EX with the EX-Installer, then connect Engine Driver on your phone over Wi-Fi and run trains — the full first-build sequence, including the two board-prep steps beginners skip.

Parts Needed

  • ELEGOO Mega 2560 R3
  • L298P Shield R3 motor driver (Deek-Robot type)
  • Makerfabs ESP8266 WiFi Shield v1.1 (EX-WiFiShield 8266)
  • LEDMO 12 V 5 A power supply
  • Track feeder wire + screw terminals
  • Male-to-female jumper leads (2)

Steps

  1. 1

    Get the parts

    Three stacking boards and supporting wiring: an ELEGOO Mega 2560 R3, an L298P Shield R3 motor driver (Deek-Robot type), and the Makerfabs ESP8266 WiFi Shield v1.1 — budget electronics $47.93 at our check (2026-11-16; the Mega showed $19.54 at a 2026-11-27 re-check, holiday-week pricing), plus the docs-recommended 12 V 5 A supply ($12.88) for ~$60.81 all-in, assuming the Mega stays USB-powered from the computer you flash it from — a standalone budget station adds a 7–9 V tip-positive supply for the Mega. Per-line stamps and notes are in the Parts list.

  2. 2

    Get the installer

    Download the EX-Installer from dcc-ex.com's download page — it puts the firmware on the board for you. The current production release is v5.6.6 (checked 2026-11-27), a bugfix release on the v5.6 line that began with May 2026's v5.6.0.

  3. 3

    Prep the budget motor shield (the step beginners skip)

    Before stacking, disable power sharing on the L298P shield: cut the Vin trace on the underside of the board (a few firm strokes with a hobby knife) or bend or snip the Vin pin. Left shared, the shield can feed track voltage into the Mega and damage or destroy it. The EX-MotorShield8874 does not need this step.

  4. 4

    Prep the Wi-Fi shield

    Remove the two plastic jumpers on the Makerfabs ESP8266 WiFi Shield and fit the two male-to-female jumper leads, crossed: Wi-Fi Tx to Mega pin 19 (Rx1), Wi-Fi Rx to Mega pin 18 (Tx1). Still a no-soldering build — a knife cut and two jumper wires are the whole of the board prep.

  5. 5

    Stack and wire the tracks

    Motor shield in the middle, Wi-Fi shield on top. Two track feeders (one per rail pair) go to the motor shield's output terminals — A is the main/operations track, B the programming/service track, which the docs expect electrically isolated from the main. The 12 V supply feeds the motor shield's power input; the Mega is flashed over USB.

  6. 6

    Flash and configure

    In the EX-Installer, pick the motor driver type, tick that you have Wi-Fi, then choose Access Point mode (the station broadcasts its own network) or Station mode (it joins your home Wi-Fi). The WiThrottle server needs no separate enable. Work from DCC-EX's DIY guide alongside this page — it is the team's maintained source of truth for the whole sequence.

  7. 7

    Power up last

    USB to the Mega for flashing; the 12 V supply to the motor shield only when you're ready to put power on the rails. Remember the budget stack's two-supply rule: with the L298P shield the Mega runs on USB power from the computer you flash with, or its own 7–9 V tip-positive supply — while the EX-MotorShield8874 powers the Mega itself, needing only the one track supply. Never power the track from USB.

  8. 8

    Install a throttle

    Engine Driver is the free Android throttle DCC-EX's throttles page lists first; JMRI, the wiThrottle app and a browser-based EX-WebThrottle are alternatives.

  9. 9

    Join the network and acquire a locomotive

    Put your phone on the same Wi-Fi as the station and point the throttle app at it — the station is running its WiThrottle server. Enter the DCC address your loco's decoder is set to (a factory decoder's default address is in its manual; most locos sold as DCC-equipped arrive ready), and the app becomes that engine's throttle: speed, direction, lights and sound functions.

  10. 10

    Run, add throttles, grow

    Extra phones (or a JMRI machine, or the web throttle) connect the same way — each tends to its own engine. Running two locos as one consist, and re-addressing decoders on a programming track, are standard DCC-EX territory; the team's command reference and throttles documentation cover them once the basics work.

  11. 11

    Skip stale tutorials

    Anything flashing an Arduino UNO or Nano is pre-v5.6.0 and will not work on current firmware — v5.4.x was the last series supporting them, and staying there means missing fixes.

Bill of Materials

Parts list

6 parts · 0 linked

Heads up: some Buy links are affiliate links. If you buy through one, MCU Atlas may earn a small commission at no extra cost to you. It never changes which parts we list. How this works

1× ELEGOO Mega 2560 R3

$22.99 at ELEGOO's own Amazon listing (checked 2026-11-16; $19.54 at a 2026-11-27 re-check, holiday-week pricing).

No verified link — check the original project

1× L298P Shield R3 motor driver (Deek-Robot type)

$14.99 on Amazon (checked 2026-11-16, held 2026-11-27); listings sell it explicitly "for DCC-EX Command Station and Model Railroad Automation".

No verified link — check the original project

1× Makerfabs ESP8266 WiFi Shield v1.1 (EX-WiFiShield 8266)

$9.95 at Makerfabs (in stock, re-checked 2026-11-27); the same shield is $17.50 as the EX-WiFiShield 8266 at the DCC-EX store (both checked 2026-11-16).

No verified link — check the original project

1× LEDMO 12 V 5 A power supply

$12.88 on Amazon (checked 2026-11-16, held 2026-11-27) — the docs-recommended track-side brick.

No verified link — check the original project

1× Track feeder wire + screw terminals

No verified link — check the original project

2× Male-to-female jumper leads

No verified link — check the original project

Not included: Nothing beyond the six lines above — the budget stack is three boards plus power and wiring, and it needs no soldering, Upgrade option, not a BOM line: EX-MotorShield8874 RevA — 2 outputs, 5 A, short-circuit protection — $44.95 at the DCC-EX store / $34.95–39.90 from US resellers per the docs (checked 2026-11-16); it powers the Mega itself, so a standalone station needs only the one track supply, Prerequisites, not parts: the phone you already own (Engine Driver is free on Android) and a computer with USB for flashing

Download CSV

Related Projects

OVMS 3: Open Vehicle Monitoring System
Illustration
ESP32
An all open-source module that plugs into your car for live monitoring, alerts and remote control of charging and climate, with deep CAN tools.
Intermediate·Code
2 parts listed
WiCAN: open-source ESP32 OBD-II adapter with Home Assistant
Illustration
ESP32ESP32-S3
An open-source Wi-Fi and BLE OBD-II dongle that reads your car over CAN and sends it to Home Assistant, MQTT or apps like RealDash.
Beginner·Code
1 part listed
ESP32-S3 Touch OBD2: a round-screen dashboard for your motorcycle
Illustration
ESP32ESP32-S3
A round 1.85in touch dashboard for your bars: an ESP32-S3 shows live engine data over Bluetooth — RPM, speed, gear, temps, fault codes — no wires cut.
Beginner·Code
6 parts listed