Mobile phone layout control app

I have always liked the idea of being able to control my layout from anywhere in the room. As technology has changed over the years I have implemented this capability in various forms.

First there was a PDA version (2005) that worked very well, but the hardware became redundant.
I then redid it using HTTP so it could be controlled from any browser. This works pretty well but I never got around to making the images update without doing a full screen refresh. I also added the capability to control things by voice, but that is not conducive to cab control.

Now that I have found ESP8266 and Blynk technology I have implemented a third system that runs on Android or iOS which I present here.

There are 6 tabs in the app and the most interesting tab is of course:

Cab control tab


Miniature RemoteSign for arrivals and departures

About 12 years ago I created RemoteSign so that I could display arrival and departure information for the trains. I use that on multiple monitors in the layout room to display traffic movements for different stations. I have now taken that a step further, by implementing RemoteSign on a microprocessor that drives small OLED displays, small enough to be used within an HO scale station!

I have not yet built my main station building kit, so I took this photograph of it sitting on my desk with an HO scale figure to show its size. It shows real-time data of my model train movements in my Wilsnack station. (The protective screen is still on the screen making the text look a bit fuzzy.)


Room lighting with RemoteSign

After 6 years, I decided to upgrade my layout room lighting so that I could also control it from the layout software.

I wanted to be able to dim the room lighting automatically so that sunrise and sunset sequences could be done smoothly. Until now I had to manually adjust the dimmers of three lighting circuits which was somewhat tricky.

Purchasing digitally controlled lighting would have been prohibitively expensive and furthermore I was not prepared to remove the existing LED strips from the ceiling above the layout. I decided to implement digital access to the lighting by adding electronics where the existing lights obtained their power and were controlled by the dimmers.

I have four circuits:
  • Warm white ceiling lights - drawing about 3.5 Amps at full power.
  • Cool white ceiling lights - drawing about 5 Amps at full power.
  • Mountain backdrop lights  - drawing about 2.7 Amps at full power.
  • Hidden area lighting  - on/off - which draws about 3 Amps.


Dr Sp L 60

As much as possible (and practical) I have adopted the look and feel of the prototype control desk as used in Germany for decades. They are called "Drucktaste Spurplanstellwerk" and there were two main manufacturers, Siemens and Lorenz. Siemens used rectangular shapes tiles, and Lorenz used square tiles. Since I had already been using a square matrix to lay my track diagram out, I decided to emulate the Lorenz version. This type of control desk is known as the SpDrL60.


(Updated) updated user interface

A friend, Boyd, has made himself a control desk that uses the push button approach to set tracks for trains to enter and leave his Swiss stations. The control desk is a set of push buttons which are connected to sensor inputs, allowing software to do all the grunt work of allocating and interlocking routes.

I configured my software according to how his buttons have been allocated, and in doing so, I decided to spruce up the user interface of my layout control software. (Updated again October 2018.)

Here is the result:

I looked up how such control desks look in Europe and settled on emulating the Sp Dr L 60 desk as used in Germany for many decades, as much as is possible and practical. I changed the old style check boxes into controls that use the appropriate background colors. Turnout positions are shown in yellow.

In the image above, the thick black lines represent trains. One route (indicated in white) has been set from the track he calls 33 Ost 4 to 24 MGB helix. The route was set by pressing the button on the desk at track 33 and while holding that, pressing the button at track 24. Since the track route was clear, all the turnout commands were sent out and the track marked as reserved for the train to depart.

I generate the matrix of squares that are used for the desk each time the software loads so that they simulate the different levels of fading and wear as seen in the prototype. Buttons and counters can be aligned with the grid of tiles that make up the desk.

The trains on Boyd's layout are run manually by humans and he expects the operators to set the signals appropriately before driving trains about, so what my software does in his case, is monitor occupancy and take that into account when setting routes when requested by the dual button actuations.

Part of the sprucing up of the user interface included the ability to add images anywhere as well as adding axle counters

Since my layout is also actually run by the software, I am able to display the timetable names of the trains that occupy tracks etc. in the style used in Germany by the Sp Dr L 60. A name in red indicates that the train is present and when in white it indicates that the tracks are reserved for that train, which is yet to arrive. In the example below, the train with timetable name "Baden" has been set on a route from the hidden station up to Wilsnack Hbf. where it will arrive at Platform 5 - and its name is shown in white there. Another train, with timetable name "GZ Trafo" is running out of the hidden station track 8 and will travel all around the layout and arrive in track 8 again.

When "GZ Trafo" passes the brown axle counter, the exact number of axles in the train will be added to the counter!

Control software and user interface design is © Copyright Dale Schultz 2018


Intellibox turnout speeds and special option 13

XTrnt response codes
I turned on the logging I have in my software and noticed that I was getting a lot of responses from my Intellibox warning me that the turnout buffer was 75% full, and also numerous rejections of turnout commands when the buffer was completely full. When this happens, my software throws the failed commands back into its own command queue so that it eventually gets accepted, so once the Intellibox buffer fills up, I get many rejections until the buffer is no longer full.


Loco going backwards only

I was running my Märklin 3511 „Schöne Württembergerin“ (which has done just over 600 scale km) and it was running beautifully as ever.

I reversed the train a bit and then I wanted to make it go forwards again, but instead, it only went backwards! No amount of changing direction would make it go forwards. Even when its lights function was switched on, and could thus show that the locomotive was meant to be moving forwards, it went backwards instead.