Also see my weekly posts at Railworks page
12/06/18 Watch complete 1-7 series of videos about programming URB.
Apps on a GooglePlay is updated. Added new functions for automate movement trains.
Protocol 2 has been refreshed to 2.1 – see changes. All sketches on the site has been changed in accordance with Protocol 2.1, an all content on the site also are corrected. Added PDF-manuals for Arduino Train Junior and DUO.
10/27/18 Recommended devices for railway automation.
Control your trains with an Android App using the URB Arduino boards, all Arduino control boards off the shelf devices allowing inexpensive custom systems. No computers, only open and cheap components.
Route selection via the App setting up routes and point setting using Servo, point motors, and Tortoise motors through Arduino Sketches. And apply them to your favorite scale.
Add motion and lighting to your layout. Various effects and methods of switching light channels, intelligent lighting behavior by commands from light sensors. Individual illumination of windows and much more.
Automatic signaling via sensors using Arduino customisable Sketches, with this project you can achieve automatic control of your layout, including railway interlocking.
The project consists of three areas, a Android App, Arduino Sketches and Arduino compatable hardware, the Open source Arduino Sketch system allows you to program it to suit your layout, the URB board provides an output platform for the Arduino without the need for sheild stacking, the customability of the URB board allowes daisy chaining of URB's allowing you to place them were needed on your layout making it an all in one solution.
I really like the Arduino, this simple device allows you to create amazing designs, by combining several microcontrollers in a single system, the weak capabilities of one Arduino, in comparison to computers allow you to obtain absolute software flexibility and power in the real world. Separating the layout into sections is the way DC control has allways worked, Arduino URB brings this concept up to date, bringing the flexibility of DCC to DC layouts through Apps that work on Smart Phones and Tablets, for the first time automation is available in a simple form.
The Main Principle of the whole project is the minimum complexity and inexpensive components. Trains are set in motion by simply applying voltage to the rails, no DCC Decoders in the locomotive, The Arduino controls the speed of the locomotive, any manufactures locomotives in DC form can be used making the system is ideal for older locomotives that cannot be DCC fitted.
The URB Project uses a simple module concept, by using the same URB units programmed for different applications through open source Arduino Sketches which are readily available gives you control over the project.
Bluetooth is integrated into modern Smart Phones and Tablets making them ideal readily available platforms for the project.
Advantages of this project
Instead of a long and not always successful manufacture of a real console with buttons and throttle rudders, Arduino Train Apps immediately gives you many advantages:
- Works right out of the box. You just need to run the program on a smartphone or tablet.
- Wirelessly. Bluetooth is integrated into any modern Android device.
- You can use several Android devices for controls the one layout, that is, you can play together. Also you can just buy cheap simplest Android-tablets specially for the your model project.
The IC2 bus is integrated into the project making the connection of modules simple and reduces the cables needed by placing module's were needed on the layout, making control simple on any size of layout.
This is absolutely unique opportunities. No compromises – only realize your ideas.
Universal Railway Bus
URB is a set of rules for connecting wires and modules to a network, schemes how to connect the railway periphery, and the rules for writing sketches.
Most of the difficulties with the Arduino models are directly linked with the connection of peripherals, so I designed a connector board and called it a URB unit, and same project, the URB (Universal Railway Bus). All URB units are the same, their specialization is provided by sketches and the details that you install in to connectors.
Ready made sketches
With the introduction of the version of Protocol 2, it became possible to compose a sketch from code modules (snippets). The structure of the code was structured and simplified. Also, the tuning of locomotive traction adjustments became more comfortable.
Simple rules described in the documentation for the project allow you to avoid mistakes. Examples with a classic variants layouts allow you to use ready-made sketches in your layout.
The Open source software for the Arduino platform and the simple language for describing the behavior of the microcontroller is the Arduino IDE. The Arduino community will always support you!
Modularity of the project allows the use of prototyping. Create your a prototype, and then transfer it to the layout. This allows you to realize your thought much faster.
Cheap & robust solution
For the Arduino platform, a very large number of parts are produced: sensors, motor- drivers and etc. Thanks to the competition of the producers, they are very cheap, and you will not have compatibility problems between them and Arduino. The software has been tested by millions of users and is very reliable.
And most importantly, thanks to the Arduino community, you will always find the answer to any of your questions. A large number of training materials are also available free.
No projects is successful if it does not offer a complete and reliable solution. My version offers not only this, but also an almost infinite expansion of your railroad capabilities in building electronics, the lack of restrictions in the implementation of your own ideas. You can update your layout and add new features to it by simply updating the firmware of the the Arduino boards, you will not let you lose interest in it with time. However, this is not my merit, but the property of the microcontrollers themselves and the Arduino's platform.
Android Apps Line
The line of applications full support the Protocol version 2
A simple application that allows you to drive the locomotive. You can use it also at exhibitions, to demonstrate your layout to visitors. Free downloading this application from GooglePlay they will be able to control the train to which you will provide access. Also this application is basic for beginners.
Look also at the fun application for Kids with similar features.
Each manufacturer of railroad models produces Starter kit. Usually they are called JUNIOR. This application allows you to transform the management of these constructors or your set of rails to a new level. This is not only a convenient wireless control of trains and junctions, but also the introduction of automation and sensors. Plus bonus: funny sounds and one universal button with on-off mode for anything.
A multi-window application allowing installation on several Android devices. As a result, you can manage trains and layout elements together. The presence of feedback will always give information you and second player about the position of the junctions on the layout. Now you don't need a separate line indication block. And this is only a small part of the possibilities of DUO.
The same functions are available in the Arduino Train DNT app
Frequently Asked Questions
Hi Steve! I have a question about Interlocking, You write: «In the design, it is possible to replace a relay block to a few motor-drivers, and then it will be possible to ensure a smooth stop and the start of trains as in a video.»
Could You illustrate and write the sketch to ensure a smooth stop and the start.
I can do it, but for this I need to build a large test system. In the Video you can see a working prototype. I start collected funds for this and if the goal is achieved, I will give a full video instruction and will publish full documentation for all Donators.
Has anyone tried to link two Android controllers to two separate Arduinos on the same layout? What would I have to do to the Bluetooth setup to get them to play independently?
This project fully answers your question. And even much more so, you can expand or change its capabilities by changing sketches and adding more Arduinos.
I have a DCC control system, can I use the Arduino Train App?
No. The project works only in DC mode. You can use my application as a service for switching junctions and managing a layout, but my project is incompatible with DCC-decoders.
Can I have Signals change with the points?
Yes, this is the basic functionality of the project, see the example from the section Arduino Train Junior.
Why do not you use the Internet of Things (IOT) and Wi-Fi chips like ESP8266?
There are many reasons for this. To work in the Wii-Fi network, you must use a server or cloud technologies. This is a superfluous and complex solution, which contradicts the principles of the project. In addition, the systems based on several ESP8266 chips have many problems with routing and data transfer, since the computational capabilities of the chip are not sufficient for this. The new multicore ESP-32 chip is much better, and it is possible that I will integrate it into URB in the future.
Another problem with these chips is that they are made for maximum energy savings, and therefore their supply voltage is 3.3 volts and at their very small current on GPIO pins. In most cases, this does not allow using the railway peripheries without an additional amplifying buffer, which very differentiates them from Arduino.
And the last note: these chips have a completely different hardware architecture compared to the classic Arduino, and therefore the compilation of the sketches for ESP8266 in Arduino IDE sometimes causes problems.
I'm afraid of programming, it's too hard for me!
This is the most frequent fear that I hear from the modelers. My friend proposed a good phrase: "Don’t be afraid of programming, for Arduino programming is like teaching the dog to execute commands". In fact, in the Arduino sketch it is much easier rather other programming languages, and the threshold of the entrance to the using is very low. It is enough to watch several videos in Youtube about it.
Сontrolling trains, and switching lines and everything else in one App? And does it work? What's the catch?
No tricks! But this is not a ready solution. To use URBs you need to learn and experiment a little. This is what distinguishes the project of similar ones. But, as a result, you can use the most daring decisions in your layout: create mechanisms for lifting bridges, inventing original moving and glowing things – anything. Since for the Arduino produces an unthinkable number of sensors, drives and other things, and they are extremely cheap your result will be best.
Hey Steve, will you change the hardware?
No, it is enough to make the URB unit of any 2.X version. These PCBs will always be compatible with each other. Only sketches will change.
All versions of URB units are absolutely compatible. Versions 2.8 and 2.9 are slightly more convenient to use.
I'm Steve Massikker, a graphic and visual designer and former engineer of civil aviation.
Steve MassikkerFounder URB Project
Hello! I started this project in 2012. Then I was absolutely not satisfied with the state of affairs in railway modellings. I did not want to use the ready DCC system for a variety of reasons, one of which was my old fleet of locomotives. The attempt to sort out the zoo of Open DCC solutions terrified me. In addition, I wanted to control the trains from the Android phone and absolutely did not want to use a computer for this. I needed a simple, reliable, repeatable solution with a lot of flexibility, if I wanted to make my layout automated.
The second problem was the lack of convenient software. All the applications I've found have always come bundled with hardware. And this completely blocked the incredible possibilities of a cooperation of Android and Arduino. I wanted to independently build control algorithms and have a universal wireless console. As a result, I had to write an Application for myself. Now this is the fifth version of the program Arduino Train, and it's consists of several applications.
Gradually within a few years the project has become reliable and perfect, so, I that now they can be shared. Especially I succeeded design in the concept of URB, I myself did not expect how convenient this was.
If you have ideas and suggestions about this Project — write to me on email@example.com