How to build your own DCC command station for SimpleDCC

In this guide, I will show you how to assemble your own DCC command station to control a DCC layout with SimpleDCC. Skip this guide if you bought a ready-to-use SimpleDCC command station and don't need to understand the hardware design inside.

To create your own SimpleDCC command station, you need three components:

Connections

After you have all three components, you can connect them:

  • Connect the ESP board GPIOs to the motor driver. DC motor drivers can use one of three input configurations:

    • 2 PWM inputs (IN1, IN2): Connect both inputs to two different GPIOs on your ESP board. We usually use GPIO 12 and GPIO 13, but you can use others.
    • 1 PWM input + 1 direction input: Connect both inputs to two different GPIOs on your ESP board. We usually use GPIO 12 and GPIO 13, but you can use others.
    • 1 PWM input + 2 direction inputs: Connect all three inputs to GPIOs on your ESP board. We usually use GPIO 12, GPIO 13, and GPIO 14, but you can use others.

Example configuration for the ESP32-S3 boards we use for testing:

Driver Type ESP Board GPIOs Motor Driver Inputs
Type 1: 2 PWM Inputs GPIO 12

GPIO 13
IN1 (PWM)

IN2 (PWM)
Type 2: 1 PWM + 1 DIR GPIO 12

GPIO 13
PWM Input

Direction Input
Type 3: 1 PWM + 2 DIR GPIO 12

GPIO 13

GPIO 14
PWM Input

Direction 1

Direction 2
  • Connect GND on the ESP board to GND on the motor driver.
  • Connect the track to OUT1 and OUT2 on the motor driver.
  • Connect VIN and GND on the motor driver to the power source. It is important to use the correct polarity: connect the positive (+) terminal of the power source to VIN on the motor driver and the negative (-) terminal to GND.
  • Connect the ESP board to your laptop via USB. If your board has two USB connectors, use the one labeled USB.

The final schematic should look like this:

                       [ Laptop ]
                           |
                           | USB Cable (Use the port labeled "USB")
                           v
+---------------------------------------------------+
|                   ESP Board                       |
|                                                   |
|  [GND]         [GPIO 12]   [GPIO 13]  [GPIO 14]* |
+----|---------------|-----------|----------|-------+
     |               |           |          |
     | (Shared GND)  +-----------+----------+
     |               | Control Signals (See your specific type below)
     |               v
     |   +---------------------------------------+      +----------------+
     |   |             Motor Driver              |      |  Power Source  |
     +-->| [GND]   [Inputs]                [VIN] |<-----| [+] (Positive) |
         |                                       |      |                |
         | [GND]                           [GND] |<-----| [-] (Negative) |
         |                                       |      +----------------+
         |        [OUT1]          [OUT2]         |
         +-----------|---------------|-----------+
                     |               | Track Power
                     v               v
         =========================================
         |         Model Railway Track           |
         =========================================

GPIO 14 is only used for Type 3 motor drivers.


Your SimpleDCC command station is now ready, and you can upload the firmware.

Questions

Feel free to contact us at [email protected] if you have any questions or feedback.