![]() |
Last modified: 2025-11-21 ==> Deutsche Version |
Directly to the table of contents of this repository
Switching points is an important part of model railroading. There are many ways to control turnouts, uncouplers, disconnectable tracks and other components. Who doesn't want to be able to do this in different ways?
The following image shows a part of an RCC control (RCC = Railway-Component-Control) with information display, switching and LED feedback.

Figure 1: Example user interface RCC control unit
The simplest method of switching is, of course, to do it all by hand. In this case, you don't even need point machines. But with more distant or distributed components, this mode of operation quickly becomes cumbersome.
For this reason, magnetic drives are usually used to switch the components. In the simplest case, the AC voltage is switched directly:

Figure 2: Direct switching of model railway components
(turnout = turnout, uncoupler = uncoupler track, disconnectable track = disconnectable track)
However, direct switching of the AC voltage has disadvantages: There is no feedback on the actual switching status and automatic switching of several components is not possible.
These disadvantages can be eliminated by commercial, digital control systems. Unfortunately, this is usually associated with considerable costs. For this reason, self-construction is an option, which also offers additional possibilities and flexibility.
If you like building things yourself, you've come to the right place. The low-cost RCC (Railway Component Control) model railroad component controller presented here allows you to switch model railroad components in three different ways:
- directly on the module or on the layout at the touch of a button
- via DCC
- via MQTT commands üover the WLAN
In the standard version, up to 32 digital outputs and inputs are available. This means that a maximum of 16 two-way switches or 10 three-way switches etc. can be controlled. This number is normally sufficient for modules.
Expansion of the system is generally possible and only depends on the I²C-IO expanders used.
Some skills are advantageous for the successful use of the RCC system:
- Soldering and some manual dexterity
- Compiling and uploading a file to an ESP32 microcontroller
- Basic knowledge of the open source circuit board layout program KiCad
- Basic knowledge of MQTT, if MQTT is to be used for control
- you should first get an overview of the contents of this repository and the RCC system. This is provided in the chapters below in this manual.
- If the RCC system is the right choice, the requirements for your own system have to be defined:
- Which components are needed?
- How many of each type are needed?
- Which DCC address for which device?
Example demo program:
1x uncoupler with DCC address 11, 1x two-way turnout (DCC 21), 1x three-way turnout (DCC 31 and 32), 1x traction current (DCC 41) and 1x flashing light (DCC 51).
- the next step is to manufacture the required components. How to do this is described in the chapter “How do I start the RCC project?” (/fab/rcc0_start/README.md).
- the demo program is then adapted to your own system and the ESP32 microcontroller is programmed. This is described in chapter
/software/rcc_demo1 /CUSTOMIZE_E.md. - Finally, all components are wired and the entire system is tested.
The detailed description of the construction of module #12: “passing loop and siding” can also be a great help.
This repository deals with the production and use of components for controlling turnouts, uncouplers, disconnectable tracks etc. on an electric model railroad using DCC, MQTT or manually.
The following topics are covered in various subdirectories:
Information about the system
- How do I begin the RCC project?
- Electrical connection of railroad modules according to NEM 908D
- Drill holes and covers for the front of the module
Manufacturing the system components
- Manufacturing of Components for the power supply
- Manufacturing of the ESP32-Shields
- Manufacturing of i2c boards
- Manufacturing of the switching blocks
- Manufacturing of additional boards
- KiCad files of RCC components
Software for the ESP32
- MQTT commands for controlling the components
- Overview of the demo software
- Customize the demo software to your own needs
- Structure of the demo software in detail
- Automatic execution of MQTT command sequences
Examples, use of the system
- Example wiring of a turnout
- Construction of the “RCC block tester”
- Construction of module 12: “passing loop and siding”
- Construction of module 13: “reverse loop - west”
- Construction of module 14: “Two tracks to one track”
- Conversion of module M01: “Track 1 to 2 with goods shed (2010)”
Other practical ideas for modules and the like
The RCC system has a modular structure and mechanically consists of a series of modules or blocks. Logically, it consists of six parts:
- FEED-IN (power supply): Generation and provision of the supply voltage (here AC voltage) and the DCC signals for the RCC system by external components.
- SUPPLY (module supply): The AC voltage, the traction current and the DCC signal for switching the magnetic articles are taken from the 25-pin plug according to NEM908 and a separate 5V DC voltage is generated.
- µC (microcontroller): The microcontroller, equipped with additional shields, is used to control the module. An ESP32 is used, which also handles communication with the MQTT broker.
- I2C: Connection between the microcontroller and the control blocks (RCC blocks). I2C I/O expander boards with PCF8574 are used for this purpose.
- RCC block: The control element for a model railroad component with local operating and display elements.
- the model railroad components such as turnouts, uncouplers and disconnectable tracks.

Figure 3: Block diagram for switching railroad components with 5V
By using the I2C-I/O-Expander-Boards it is possible to control several components:

Figure 4: Block diagram switching several railroad components with 5V
Before e.g. the first switching of a turnout with RCC, some components must first be manufactured. How to do this is described in the chapter “How do I start the RCC project?” (/fab/rcc0_start/README.md).
The following figure shows an example of the modules required to control a three-way turnout:

Figure 5: Demo setup of an RCC-5V system: the individual parts
On the far left you can see the 25-pin connector with the 5V power supply (“SUPPLY”), behind it is the ESP32 with a 1.56 inch display (“µC”). Two I2C-PCF8574 boards (“I2C”) are mounted in the front center, behind them the RCC block. On the right you can see a three-way turnout with two Fleischmann 640000 turnout drives. The electrical connection of the modules is made using 6-pin ribbon cables and wires.
The following image shows an example of a possible front view of a module:

Figure 6: Example of module front view (= operating side)
The following picture shows the electrical circuit diagram for controlling a turnout with DCC, MQTT or manually. The light green rectangles represent circuit boards developed in KiCad 8.0 and manufactured by PCB Way. To do this, simply install the PCB Way plug-in in KiCad and the data required for production is then transferred with a click of the mouse.

Figure 7 Overall circuit diagram of the RCC-5V system
The upper third of the picture shows the supply of the DCC signal and the AC voltage (“FEED-IN”). The DCC signal for the traction current and the digital switching of the points is generated here with an old Roco-Multimaus, a 230V/18V/2.9A transformer (e.g. BV00/026 from Conrad) is used for the AC voltage supply.
The middle third of the picture shows the connection of the 25-pin connector to the microcontroller (5V and DCC signal) and to the RCC blocks (5V and AC signal). The ESP32 operates two separate I2C buses, one for the 1.56” OLED display (with 3.3V) and the second I2C bus for the PCF8574 boards (with 5V).
Finally, the lower third of the picture shows the control of a two-way switch by an RCC block.
The RCC block receives the switching command "Straight" (set WSA to 0V) or "Branch" (WSB=0V) from the microcontroller, switches the turnout and returns the state of the turnout (WRA=5V, WRB=0V for “Straight” or WRA=0V, WRB=5V for “Branch”). The RCC block also contains two buttons for local switching of the points and two LEDs for local display of the switching status of the points.
You can also see that each RCC block requires a 5V and an AC voltage to switch the points.
