Within the last two weeks the PCB boards from china and the assemblies arrived. Today I soldered everything together, which was kind of an adventure because of the SMD parts. Finally I connected the board with my VT98 locomotive and it works as expected.

Now its time for a glass of red wine to celebrate it.


It’s quite long time ago since I did something in my garden railway project. Last year no trains were running due to other projects. Anyway – I experimented in programming Arduino using the “Wemos D1 mini” devoloper board having an WIFI uC ESP8266 on. Now I started learning KiCAD, which is nice and opensource BCD designing application. So I developed a new PCB board containing a 3.6 amps DC motor driver and four reed relais to switch lights and smoke generators.

As mentioned in previous posts, I let run the uC as a mobile webserver. While connecting this uC using an ordinary webbrowser, the user is able to control the motor and switch the lights, smoke generator or other external devices.

That’s the very first time I developed a double layered PCD board in my life and ordered it at in china. I’m really curious to see the results. I’m also a bit excited when soldering the SMD parts on this board. I hope this all will work well.

Schoema goes WIFI

Since Bluerailtrains is not able to deliver BlueTooth based controllers, I decided to turn over to a self-developed WIFI controller. I already developed one controller for my V100 diesel locomotive using a NodeMCU and a L298N development board. The huge advantage of using WIFI with a webserver based technology is, that I am able to use any device with an integrated web browser. So these locomotives can get controlled by using a PC, tablet, laptop or smartphone.

In a next step I wanted reduce the size of the electronics. So I turned over to use a WEMOS D1 mini as controller in combination with a Infineon TLE5206-2S motor driver chip. The specialty of my LGB Schoema locomotive is, that I use this one battery powered. In the past I placed the accumulators in a second coach, but my goal was to integrate it into the locomotive as well.

So after a complete disassembling of the locomotive I was able to place the AA size accumulators under the front bonnet, delivering 12VDC. The controller takes place under the rear bonnet including a 5 volts regulator and a self-developed shield to supply LEDs, controlled by the 3.3VDC outputs of the WEMOS D1 mini.

It is working without any issues as it was running for the VT100 locomotive with some additional features. One of the new features is a rehabilitation of the client-server websocket connection. I also implemented a safety slowdown in case the connection is permanently shut down. So if the locomotive is detecting that no client is currently controlling the locomotive, it slowly ramps down the speed to zero for safety reasons.

The biggest challenge was the integration of all parts into a very limited space. It will get a much bigger challange to get everything integrated into my LGB Stainz locomotive….


Finally after 2 years of planning and construction the loop is closed and the the attention, that the locomotive is running over the edge, is over.

– 1.5 tons of gravel
– 600 kg of concrete
– 60 kg of jigstones
– 50 meters of tracks
– 5 switches
– 2 bridges

…and lots of fun!


The planning to close the loop is preparation. Using the software tool “AnyRail”, I tried to estimate the required tracks. That requires also a little variances to get the loop closed in a harmonized way. As soon as I received the ordered tracks, I laid them in the way, I’m planning ot have them in future. I’m also planning to integrate another train stop and place a little castle tower on top of the little hill next to the station.


First night run with the updated BR114 diesel locomotive. Is was delivered by default with three front lights. During the update with the NodeMCU I added two red backlights on each side and an interia light in the operator room. The lights are switching dependent to the drive direction. The best way to see the lights is to make a little photo session in during sunset.


I placed the nodeMCU into my locomotive. So the heart (power buffer), the legs (motor amplifier) and the brain (microcontroller) is now imbedded.

The nodeMCU – containing the ESP8266 microcontroller with WIFI functionality – is acting as webserver, that is getting connected to my private network. I stored all files such as HTML, CSS, javascript and icon and the SPIFFS area. While downloading the website a websocket connection is getting established from the browser to the controller, which is much faster than using the AJAX-technology. Using the slider, it is possible to control the speed of my locomotive. Using the “FWD” and “BWD” buttons, it is possible to change the direction. Controlling the lights will be next.

For all, who are interrested in the technology: I used the PWM functionality to control the speed. The websocket connection is not only working one way. As a usual webserver, it is possible to connect from several devices to the website. So it is possbile to control the locomotive from several devices in parallel. So I connected to the ESP8266 with my mobile, tablet and laptop in parallel. As soon as I move the speed slider on one of my devices, the slider on all other devices moves as well. Same for the state of the buttons (turned “ON” or “OFF”).


Since no boards from Bluerailtrains are available anymore, I am working on a development of my own WIFI based controller. The power supply of 10x 10F capasitors (in seria for getting 1F @30volts) and the L298N motor amplfier are already installed. The NODEMCU (development board containing a ESP8266-12) is also programmed as webserver including a websocket service to control the locomotive.

So I’m on the way to implement my first webserver on rails…. 😉

Alex world in your digital landscape