Arduino controlled model trains and layout

Hello friends! I developed a very simple and cozy model trains control system using an Arduino and Android applications. All instructions on my site: www.arduinorailwaycontrol.com. I really need your feedback. Here I will answer all your questions. Discussions are welcome!

Probably you will be interested my tutorials on Arduino.PROJECT.HUB:

How order or making the URB unit

Image from Original Post so we don't have to download it. See this Simple Image Guide

...R

It looks interesting but how does it work?

Are the trains controlled through the track using DCC or does each loco have its own Bluetooth receiver?

If the locos have Bluetooth receivers how are they powered? Through the track, or with batteries?

If you have a Bluetooth receiver in each loco can you post a photo of the module in the loco?

And how many different locos can the system control?

...R

Good question :slight_smile:
It's work only DC mode
You may use many trains on isolated tracks, so have running an automatic interlocking system are possible and simultaneous control of two players.

Robin2, Thanks so much for the guide. Really cool features!

Steve_Massikker:
Good question :slight_smile:
It's work only DC mode

Noooooooooooooooooooooooooo!

Yeeeeeeessssss! Owners of DCC systems have many reasons use other Arduino projects. My opinion about DCC here.
And the question to Parodius316, can you do this or that in your DCC system?

And my system works with any scales of model trains (HO, TT, N) and greatly cheaper compared by DCC. :wink:

I have no problem with a DC system - some competition for DCC is a good thing.

But you have not given us a simple overview of how it works - and your website seems mainly about clever pictures.

...R

The Android application on the phone via Bluetooth or computer via serial connection (USB cable) transmits simple string commands to the communicate Arduino (Communicate URB unit). The sketch converts them into a change in the state of I/O pins or sends them to other Arduino via I2C or via a more complex chain (that is, a routing occurs, which you set yourself). Thus you can build any flexible distributed control system. Response data transfer from any URB units to Android or a computer allows you to apply feedback.

In general, this is a rather complicated system, and I just cannot describe it simple. :confused:

And thanks again for Image Guide. Funny trick!

Variants connections between URB

Steve_Massikker:
In general, this is a rather complicated system, and I just cannot describe it simple. :confused:

I can understand that there may be some levels of complexity but at the bottom of the pile a loco has a DC motor which is simple to control - how is that done.

Another way of looking at it is if I want to drive a single train what Arduino bits do I need to buy?

...R

PS ... In my working experience, the "real" experts I dealt with (physics, engineering, economics) had no trouble explaining themselves in simple language for "ordinary folk".

Hmm... Simple start

All sketches on my project are specially written based on the simpliest classic sketches from Arduino IDE (for example SerialEvent).
Sorry, I do not understand your opinion about "experts" and "not for ordinary folks" :frowning:

Steve_Massikker:
Video and link to sketch for an one train.

I have looked at the link.

It seems to be very traditional DC control of power to the track using a motor driver. I presume that means that the user who wishes to run several locomotives has to implement some form of what model-railway-folks call cab-control.

Does your system manage that? The wiring and switching can be very complex - which is why DCC is attractive.

You might also consider a more modern and more efficient motor driver than an L298. I am using Infineon TLE5206 drivers for a system I am building for a group in my model railway club. Those chips have overload and short-circuit protection and fault indication.

...R

You're right!
You can use any motor-driver, you only need to change the sketch. I just find it more convenient to use a ready-made module, especially since the L298 has two channels, since my system was designed to control many players simultaneously.
As for the DCC control, then on a system is impossible making even such a simple function as automatic stopping a train before a red signal. Or I'm wrong?

Steve_Massikker:
You're right!
You can use any motor-driver, you only need to change the sketch. I just find it more convenient to use a ready-made module, especially since the L298 has two channels, since my system was designed to control many players simultaneously.

You did not answer my question about how your system can control several trains. Or, is your plan that each train is on a completely separate track with no capability to cross from one to the other?

As for the DCC control, then on a system is impossible making even such a simple function as automatic stopping a train before a red signal. Or I'm wrong?

I am not advocating DCC but, yes, you can control trains in great detail with DCC and suitable train detection equipment. Stopping a train before a red signal requires the system (any system - DC, DCC or wireless) to know that the train is approaching the signal.

...R

Just as in the DC, it is not trains that are controlled, but isolated sections of rails. Together with Arduino it gives advantages.
Moving several trains. How it work.

You did not answer my question about how DCC stopping concrete train before red signal. DCC is one-way data send system. How does the DCC-decoder on a train determine that in front of it is the red signal?
I saw that it works the same way as in the DC, it just disable the voltage from the insulated rails in front of the signal.
In the classic DC, and my system as well, you can add several motor-drivers to these rails to make a smooth stopping and starting move trains near the signal or Interlocking system. Or I make an AWS system, on DCC it's impossible.

Steve_Massikker:
You did not answer my question about how DCC stopping concrete train before red signal. DCC is one-way data send system. How does the DCC-decoder on a train determine that in front of it is the red signal?

The train does not know there is a red signal with DCC or (as far as I can see) with your system. It is the computer control system that knows when a train must stop and sends the appropriate instructions to the DCC decoder in the loco telling it to slow down and stop.

Maybe you are creating a dead section of track before the red signal so the loco comes to an abrupt stop when it runs out of power?

...R

I broke down my last layout years ago and have not gotten back into model railway. I never used DCC but to my knowledge DCC does not cut power to the track; it definitely does not need to. Simply sending new speed info to the loco will do.

You however need a quite complicated control system that knows which signal has which state and which loco is where.

If I ever build again, I will build using my existing non-DCC locos; but digitally controlled.

Robin2:
The train does not know there is a red signal with DCC or (as far as I can see) with your system. It is the computer control system that knows when a train must stop and sends the appropriate instructions to the DCC decoder in the loco telling it to slow down and stop.

It does not work like this :slight_smile: In order for a computer to know the position of a particular train on a layout, it must receive the coordinates of this train via feedback. In the DCC, it is impossible in principle to organize such a function. Moreover, to determine this position, the decoder on train must constantly read the tags from the track. Therefore, I asked my question.