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
After doing the contrete base, the bridge is getting build over it. That was a little tricky, because it has to be leveled and the direction needs to be correct.
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…. 😉
It hot today and you get sweat pretty fast. So not much work done this weekend. I’m also running out of material. So just a little dirt moved as preparation for the next few meters of tracks to be laid down.
A little photo shooting with my PIKO V100 on my backyard layout at a sunny summers day. This diesel locomotive at really a huge and impressive engine…