Inspired my Mark Found’s tv series “The Garden Railway”, I started building my own garden railway in my backyard. It is build right from the scretch.
I created this blog in order to share my experiances to interrested people, who also want to start with building up their own garden railway in their own backyard. So every comment and feedback it apreciated.
A garden railway is a great possibility to combine nature and technic in a home environment. It is also a great hobby to free up the mind from daily business. And it is completely different to smaller inhouse scales, because everyone starting with this hobby has also think about weather and stability, security and many other impacts. Working with garden railways needs rockery work, concrete mixing, gardening, and way more.
Please enjoy my little blog. I hope, that I am able to share some good inspirations.
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 jlcpcb.com 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.
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….
There are some bridges required to close the loop. So I made one and another “jig-stone-day” to spill the stones and glue them together. A temporarly positioning is giving an impression, how it will look when finished.
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.
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…. 😉