Skip to the content
2 layers99.1 × 33 mmDcc track UI detection V2, the printed circuit board in 3D

Dcc track UI detection V2

khartinger/RCC5V

Controlling model railroad components with DCC, MQTT and manually

Size
99.1 × 33 mm
Copper layers
2
Thickness
1.6 mm
Parts
49
Nets
30
Pads
123
Tracks, vias
226, 1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
27 Nov 2024
Updated
4 Nov 2026

Overview

Dcc track UI detection V2 is an open-source printed circuit board by khartinger, from the khartinger/RCC5V repository on GitHub. It is a 2-layer board of 99.1 × 33 mm with 49 parts on 30 nets, routed with 226 tracks and 1 via.

It is built around the LM393, SFH615A-3 and BC337, with the SB240, BAT48 and JUMPER2 among its other parts. Its parts include 18 resistors, 8 capacitors, 6 diodes, 4 connectors and 3 ICs. It belongs with the home automation and IoT boards of this library.

Main components

6

README

README.md
Last modified: 2025-11-21 [blocked]

Controlling model railroad components with DCC, MQTT and manually

==> Deutsche Version     

Directly to the table of contents of this repository

Introduction

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.
Example RCC controller
Figure 1: Example user interface RCC control unit

Traditional switching of turnouts etc.

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:

RCC5V_DirectSwitching
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.

How to do it better?

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

How do I get started?

  1. 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.
  2. 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).
  1. 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).
  2. 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.
  3. 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.

To the top of the page
[blocked]

Overview

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

Manufacturing the system components

Software for the ESP32

Examples, use of the system

Other practical ideas for modules and the like

To the top of the page
[blocked]

The RCC-system at a glance

The RCC system has a modular structure and mechanically consists of a series of modules or blocks. Logically, it consists of six parts:

  1. 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.
  2. 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.
  3. µ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.
  4. I2C: Connection between the microcontroller and the control blocks (RCC blocks). I2C I/O expander boards with PCF8574 are used for this purpose.
  5. RCC block: The control element for a model railroad component with local operating and display elements.
  6. the model railroad components such as turnouts, uncouplers and disconnectable tracks.

RCC5V_BlockDiagram1x
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:
RCC5V_BlockDiagram3x
Figure 4: Block diagram switching several railroad components with 5V

Practical setup

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:
RCC5V_Demo_Setup
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:
Example front view
Figure 6: Example of module front view (= operating side)

To the top of the page [blocked]

Example: Circuit diagram for switching a turnout with the RCC5V system

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.

overall_circuit_diagram
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.

To the top of the page

Parts

49
QtyValueFootprintReferences
510k_kh_library:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_Vertical_khR1, R2, R6, R7, Rs1
51k_kh_library:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_Vertical_khR4, R8, R10, R13, R15
51u_kh_library:C_L4mm_D3mm_P2.54mm_khC1, C2, C4, C7, C8
4MountingHole_kh_library:MountingHole_2.2mm_M2_Pad_TopBottom_khH1, H2, H3, H4
210kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalRs2, Rs3
210u_kh_library:ELKO_L4.32mm_D3.81mm_P2.54mm_khC3, C5
247_kh_library:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_Vertical_khR16, R17
247k_kh_library:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_Vertical_khR9, R14
2BC337_kh_library:TO-92_Inline_Wide_customQ1, Q2
2SB240Diode_THT:D_DO-15_P3.81mm_Vertical_AnodeUpD1, D2
2Screw_Terminal_01x02_P5_kh_library:Screw_Terminal_01x02_P5J1, J2
1100Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR11
110k_kh_library:Trim_Bourns_3296W_VerticalRV1
11N4007_kh_library:D_DO-41_SOD81_P3.81mm_Vertical_AnodeUp_khD5
11kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR12
1220kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalRs4
133k_kh_library:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_Vertical_khR3
133u/35VCapacitor_THT:CP_Radial_D8.0mm_P2.50mmC6
147k_kh_library:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR5
1BAT48Diode_THT:D_DO-35_SOD27_P2.54mm_Vertical_AnodeUpD3
1Box_02x03_P2.54_Vertical_kh_library:Box_02x03_P2.54mm_Vertical_khJ5
1INA333_Board_kh_library:INA333_BoardU1
1Jumper_2_kh_library:PinSocket_1x02_P2.54mm_Vertical_khJ3
1LED grünLED_THT:LED_D3.0mmD6
1LED rotLED_THT:LED_D3.0mmD4
1LM393Package_DIP:DIP-8_W7.62mm_Socket_LongPadsU2
1SFH615APackage_DIP:DIP-4_W7.62mmU3

More from khartinger/RCC5V

12
  • 2 layers41 × 41 mmRW 5V W3 LED V5, the printed circuit board in 3D

    RW 5V W3 LED V5

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    41 parts
  • 2 layers41 × 41 mmRW 5V W3 STRG V4, the printed circuit board in 3D

    RW 5V W3 STRG V4

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    41 parts
  • 2 layers41 × 41 mmRCC TUI B LED V1, the printed circuit board in 3D

    RCC TUI B LED V1

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    39 parts
  • 2 layers41 × 41 mmRCC TUI M LED V1, the printed circuit board in 3D

    RCC TUI M LED V1

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    39 parts
  • 2 layers41 × 41 mmRCC PULS2 TVn STRG V1, the printed circuit board in 3D

    RCC PULS2 TVn STRG V1

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    38 parts
  • 2 layers41 × 41 mmRCC PULS1 STRG V1, the printed circuit board in 3D

    RCC PULS1 STRG V1

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    37 parts
  • 2 layers41 × 41 mmRCC RGY LED V1B, the printed circuit board in 3D

    RCC RGY LED V1B

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    36 parts
  • 2 layers41 × 41 mmRCC RGY TVn LED V2, the printed circuit board in 3D

    RCC RGY TVn LED V2

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    34 parts
  • 2 layers41 × 41 mmRW 5V RGY LED V2, the printed circuit board in 3D

    RW 5V RGY LED V2

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    34 parts
  • 2 layers41 × 41 mmRW 5V W2 LED V2, the printed circuit board in 3D

    RW 5V W2 LED V2

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    31 parts
  • 2 layers41 × 41 mmRW 5V W2 STRG V2, the printed circuit board in 3D

    RW 5V W2 STRG V2

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    29 parts
  • 2 layers41 × 41 mmRW 5V 2IO STRG V1, the printed circuit board in 3D

    RW 5V 2IO STRG V1

    khartinger/RCC5V

    Controlling model railroad components with DCC, MQTT and manually

    24 parts

Similar boards

  • 2 layers142.2 × 175.3 mm6502protoboard, the printed circuit board in 3D

    6502protoboard

    rjhelms/6502proto

    A prototyping board for experimenting with 6502 hardware and software design

    95 parts2
  • 4 layersRoboRyo, the printed circuit board in 3D

    RoboRyo

    KaitoTLex/RoboRyo

    This is team1280's replacement for the Robo Rio for more redundant and less annoying controls.

    68 parts1MIT
  • 2 layers24202BBAE1, the printed circuit board in 3D

    24202BBAE1

    GreenEllipsis/Green_Ellipsis_Parts_Library

    our open-source parts

    16 parts
  • 2 layers190 × 110 mmSaunaPCB, the printed circuit board in 3D

    SaunaPCB

    JuergenMH/SaunaControlUnit

    Control unit for sauna oven. Ensures comfort and safety.

    78 parts
  • 2 layers96.5 × 73.2 mmBt radio manager e01, the printed circuit board in 3D

    Bt radio manager e01

    marianobilli/bluetooth-radio-manager

    A self-contained, battery-powered box that puts four 2.4 GHz radios under one ESP32-S3, with a small OLED and encoder UI, in a 3D-printed case.

    32 parts
  • 2 layers105.6 × 73.3 mmSTM32F767ZI LCC PNET Router, the printed circuit board in 3D

    STM32F767ZI LCC PNET Router

    RobertPHeller/RPi-RRCircuits

    A collection of circuit designs for various MCUs, not just Raspberry Pis relating to Model Railroading

    52 parts24
  • 2 layers102.9 × 116.7 mmPocketBeagleCommandStation, the printed circuit board in 3D

    PocketBeagleCommandStation

    RobertPHeller/CommandStationsAndBoosters

    Command Stations and Boosters

    133 parts
  • 2 layers52.8 × 149.3 mmPixelSlasher, the printed circuit board in 3D

    PixelSlasher

    CTXz/Video-Glitch-Array

    A collection of glitch art circuits dedicated to VGA signal manipulation

    22 parts30

Questions

How big is the Dcc track UI detection V2 PCB?

It measures 99.1 × 33 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Dcc track UI detection V2 use?

49 parts, built around the LM393, SFH615A-3, BC337 and SB240. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Dcc track UI detection V2 KiCad files?

From the khartinger/RCC5V repository on GitHub, at the commit this page was made from: the board is fab/kicad/dcc_track_UI_detection_V2/dcc_track_UI_detection_V2.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Dcc track UI detection V2 design in my own project?

Its repository states no licence, so its author keeps all rights: ask khartinger before reusing the design.