Some Legacy: Trains in MattzoBricks Train Automation System 1.0
The following video is a bit outdated, and describes how to operate LEGO trains in the first version of our MattzoBricks Train Automation System.
The video contains information about:
- Our LEGO trains, their controller and power supply,
- how our automation software controls the trains,
- the tracks on which the trains are operating.
In the video, we show how to control the trains with our nControl enhancements. Please note that we recently went away from nControl for different reasons, and control our trains now with “Rocrail”. Thus, the information in the video is more of historical value.
Trains in MattzoBricks Train Automation System 2.0
Our present automation platform, which we call MattzoBricks Train Automation System 2.0, supports the following types of train controllers:
- MattzoTrainController for Power Functions
- MattzoTrainController for Powered Up
Have a look at the following diagram, which shows the differences between the different types of controllers:
MattzoTrainController for Power Functions (MTC4PF)
To operate LEGO train with Power Functions motors, you need the “MattzoController for Power Functions” (MTC4PF).
The MTC4PF consists of a micro controller ESP-8266 / ESP-12.
The controller receives messages from RocRail via MQTT, parses the commands and powers the motors. Motors are usually directly connected to the MTC4PF with standard Power Function cables, and the MTC4PF travels on board of the loco with the train.
The following picture shows a MTC4PF in a 3D printed case, designed and built by Mattzobricks electronics expert Thorsten of the Mattzobricks Advanced Electronics Competence Center Aachen:
One or two powered function motors can be connected to the controller. If two motors are attached, they can be configured to run in concurrent or reverse direction. Additionally, the controller has two ports for LEDs or other consumers, which can be used to switch train headlights or other accessories on and off.
The following picture shows the components that are typically required to build a MTC4PF:
Another really cool way of using the MTC4PF is to relay the Rocrail commands via Infrared to LEGO Infrared Receivers 8884. The MTC4Pf can stay on land or travel with the loco for better infrared reception in tunnels, behind tall buildings or landscapes, or if the layout extends over multiple rooms. If left on land, it can handle multiple trains at the same time.
It is also possible to use the MTC4PF to make 4DBrix WiFi Train Receivers compatible with our automation system. A single MTC4PF can control any number of 4DBrix controllers. For more information see below.
Watch this video to learn about the MattzoTrainController for Power Functions:
Here is a video about the infrared support for the MattzoTrainController for Power Functions:
Building instructions can be found here.
MattzoTrainController for Powered Up (MTC4PU)
The “MattzoTrainController for Powered Up” (MTC4PU) consists of a simple ESP-32 micro controller and – nothing else! It just needs a simple power source like an USB power bank.
This controller receives messages from RocRail via MQTT and WiFi. It acts as a bridge between the MQTT broker and one or more Powered Up Hubs, which it connects to via Bluetooth. A direct galvanic connection between the controller and Powered Up Hubs is not required, which makes deployment of the controller very flexible. One controller can control one or more powered up hubs. A single controller can even control multiple independent trains.
The following pictures shows six trains in a test setup, all being controlled by a single MTC4PU.
The controller can be placed somewhere in a central location of the train layout, or in a waggon of the train that it controls. Carrying the controller in the train has the advantage that the Bluetooth range problems, which regularly spoil the fun on larger layouts, should be a problem of the past.
No wiring or welding will be required to use this controller. You just need to upload the firmware and configure it, and you’re good to control all of your powered up based train.
Special thanks to Markus, who contributed the idea for this controller and also developed the initial version of the firmware.
Development is almost done, so be prepared to find some nice videos about it on MattzoBricks in the near future!
Building instructions will be published here.
Support for 4DBrix WiFi Train Controller
The WiFi Train Controllers from 4DBrix can also be used with the MattzoBricks automation platform 2.0. As 4DBrix has left the market, these controllers are no longer available on the market, and the market for used 4DBrix parts is at our knowledge narrow. It can be assumed that the relevance of these controllers will decrease over time. Anyway, if you own some of these controllers, you may use them with our automation platform.
The MTC4PF is able to translate the Rocrail communication protocol into the genuine 4DBrix protocol. As both systems work on MQTT, the MTC4PF is just hooked up to the WiFi network and does its translation work directly on the message queues of the MQTT broker. It can be deployed anywhere on your premises and just needs access to your WiFi network – that’s all. No soldering or other electronic components are required to build the controller.
A single MTC4PF can control any number of 4DBrix WiFi Train Controllers.
Support for SBrick
We are working on it… 🙂
Some general things
There is a couple of things that work indepedently of the specific MattzoTrainController that you use for a particular train. One important thing speed handling, which is a pretty complex topic. Other topics include the setup of locomotives in Rocrail, and letting trains run automatically from block to block.
I will cover some of the these topics in the near future on this page.
Thanks for your patience.
Outlook and next steps
We are constantly improving the MattzoTrainControllers. We are going to publish progress and the final products on this website.
Make sure to subscribe to our newsletter and social media channels on Youtube and Facebook to stay up to date!