McWaffel

Lego Railway Signaling

15 posts in this topic

Hey guys!

After a few weeks of break I'm back and working on my test-setup for train signaling. As some of you know, I've built a small test track on my desk and wired up a lot of sensors and LEDs to program and develop a signaling system for trains. I'm finally at a point where I can drive trains over a layout that has block signaling fully working and completely automated too.

Here's a video:

When the train passes over the block sensor, a flag is set and it's only when the flag is removed (i.e. the train has fully passed over the signal and an additional time of 1 second has passed), that the signal switches to red and vice versa. The code only makes the block-section check it's sensors and flags get set and removed automatically meaning I have minimal code maintenance to do if I want to change anything. 

I have a lot more signals planned for the future including switch track signals, crossings and station signals. If you're interested, I can provide a PDF with all the signals I came up with.
Let me know what you think. All feedback is appreciated.

Share this post


Link to post
Share on other sites

This... is awesome. I don't think I have seen this implemented in LEGO before! I, too, can't wait to see the finished project.

Share this post


Link to post
Share on other sites

That's a very simple but effective system so far. I'm not up on the electronics, but it looks very good.

As the system develops will you be adding caution (yellow) aspects between green and red?

Share this post


Link to post
Share on other sites

Posted (edited)

On 19.4.2017 at 0:14 PM, Hod Carrier said:

That's a very simple but effective system so far. I'm not up on the electronics, but it looks very good.

As the system develops will you be adding caution (yellow) aspects between green and red?

Thanks, the electronics are quite complicated. There's about 20-25m of wires on a 3m circle track. It's quite excessive.

I've thought about yellow aspects but I haven't planned to add them yet. If I were to add any, I would probably hard-wire them to the main signals (red-red-green) so that when the red or red-red signal is shown, the according yellow lights come up automatically. I'll add them to the list of signals. I'm planning to use the color yellow on switches to show wether the track is diverging or not. I might change that though. 

 

//Edit:
I thought of a better solution: Because the blocks on most Lego track are relatively short, adding a distant signal with yellow aspects doesn't necessarily help the driver. Instead what I think I'll do is I'll make the main signal green light flash, if the next main signal shows red. Since this is my own phantasy railway it works better for me anyway. I don't want to be too close to real life. I see it as a sort-of improvement on real life :laugh:

Edited by McWaffel

Share this post


Link to post
Share on other sites
On 4/20/2017 at 0:04 PM, McWaffel said:

...make the main signal green light flash, if the next main signal shows red.

This is actually the opposite of how the real railroads would do it: flashing aspects always (in the US at least) are less restrictive than solid ones. This is so that if the flashing mechanism fails, the signal doesn't erroneously show a more permissive aspect. In other words, the flashing green would mean the next signal is clear and the solid green would mean the next signal is red. Granted, you're not trying to replicate the real railroads, but I thought I'd comment on the fail-safe nature of the system. 

Share this post


Link to post
Share on other sites
On 2017-04-20 at 7:04 PM, McWaffel said:

Instead what I think I'll do is I'll make the main signal green light flash, if the next main signal shows red. Since this is my own phantasy railway it works better for me anyway. I don't want to be too close to real life. I see it as a sort-of improvement on real life :laugh:

That's how Swedish railway signals work.

https://en.wikipedia.org/wiki/Swedish_railway_signalling

While I may be biased, this signalling system is one of the most straightforward I've come across. It has the option of using 2-5 lights and still gets a lof of information across.

Share this post


Link to post
Share on other sites

In Britain we have up to 4 aspects: red, green and two yellows. Red = stop, 1 yellow = stop at next signal, 2 yellows = stop 2 signals away, green = clear. 3-aspect signalling is more common however, i.e. without the two-yellow phase; that's only necessary on longer, faster running lines. Some smaller lines even only have two aspects (red and green). 
With advances in LED technology signal brackets have been reduced to only one or two 'lights' anyway as each one can do multiple colours, and only two will ever need to be shown at the same time (see above).

Share this post


Link to post
Share on other sites
15 hours ago, ColletArrow said:

Some smaller lines even only have two aspects (red and green).

Without wishing to delve too much further into comparative signalling methods, these lightly used lines don't have just two aspects.

Each signal may only be capable of displaying two aspects but the signalling sequence still uses three aspects, as you will never get a red directly after a green under normal circumstances. Therefore the signals will be capable of displaying either yellow/green (distant signal) or red/green (stop signal) and will alternate along the line. That way you will always get a yellow to warn you that the next signal is red.

I could go further and explain overlaps (which ensures the driver doesn't see the signal revert to red while it's still in his/her line of sight), blocking points (which protect the rear of the train by keeping the previous signal at red until it has completely passed the next signal) and different methods of signalling that a diverging route is set, but it occurs to me that McWaffel is building a fictional system that follows no existing practice, which makes sense to him and is easy to build and operate.

Hod Carrier (UK train driver)

Edited by Hod Carrier
Spelling

Share this post


Link to post
Share on other sites
7 hours ago, Hod Carrier said:

Therefore the signals will be capable of displaying either yellow/green (distant signal) or red/green (stop signal) and will alternate along the line

Oh yeah... oops. :look: I was forgetting that. That is like the earlier steam-era semaphore signals (still in use today) which are either yellow-arm for distant or red-arm for stop, as you said.

And yes, @McWaffel's system appears to be freelance, I just wanted to give details on another prototype he could use if he wished. There are many, many options available for inspiration!

Share this post


Link to post
Share on other sites
On 24.4.2017 at 0:03 PM, sjim said:

While I may be biased, this signalling system is one of the most straightforward I've come across. It has the option of using 2-5 lights and still gets a lof of information across.

I give you that, but it's not failsafe. I guess with modern LED technology that's not so bad, but I can imagine it causing much havoc in the old days. 

 

11 hours ago, Hod Carrier said:

I could go further and explain overlaps (which ensures the driver doesn't see the signal revert to red while it's still in his/her line of sight), blocking points (which protect the rear of the train by keeping the previous signal at red until it has completely passed the next signal) and different methods of signalling that a diverging route is set, but it occurs to me that McWaffel is building a fictional system that follows no existing practice, which makes sense to him and is easy to build and operate.

Overlaps sounds like a neat concept! I have not thought of that yet but it seems that I should give it a thought some time.
My signals all stay red, until the train has fully cleared the block. Only then they change back to green. But generally yes, I'm building a fictional system which in my opinion works better for a fictional world with Lego figurines. Also it's probably the only opportunity you have, to be able to design such a signaling system for something and then actually see it work. The designing part of it is great fun :classic:

 

3 hours ago, ColletArrow said:

There are many, many options available for inspiration!

I absolutely agree! I love to look at different types of signaling systems (Germany, UK, US, Japan, Sweden...) and think about them. Then I think about the parts that I don't like about them and parts that I like and get inspired.

Share this post


Link to post
Share on other sites
14 hours ago, skaako said:

Wow @McWaffel that looks awesome :thumbup:

How many sensors are you using with the signals? It looks like 4 but can't quite tell..

Thanks! I'm actually not really using sensors with signals directly. It's a bit more complicated. I'll try to explain it in a simple way:
The track (in this example a circle) is split into different sections called "blocks". Every block owns two signals (one for each end of the block). In my video you can see only one signal per block (I haven't built the signals for the other direction yet), so every block would have two signals. And also every block has two sensors. One at each end. Which also means that two conjoining blocks share the same sensor. The signals and the sensors never communicate with each other. Sensors influence the block's data and this in return influences the signals. This way I have to run way less wires and it saves money. The downside is, that the software is a lot more complicated this way.

Edited by McWaffel

Share this post


Link to post
Share on other sites
On 27/04/2017 at 9:20 AM, McWaffel said:

Thanks! I'm actually not really using sensors with signals directly. It's a bit more complicated. I'll try to explain it in a simple way:
The track (in this example a circle) is split into different sections called "blocks". Every block owns two signals (one for each end of the block). In my video you can see only one signal per block (I haven't built the signals for the other direction yet), so every block would have two signals. And also every block has two sensors. One at each end. Which also means that two conjoining blocks share the same sensor. The signals and the sensors never communicate with each other. Sensors influence the block's data and this in return influences the signals. This way I have to run way less wires and it saves money. The downside is, that the software is a lot more complicated this way.

Thanks for the explanation. I was trying to see if I could figure it out from the video :laugh:

Would you be looking at automating it so it could stop a train if another train tries to enter a block that is red? That would be cool!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.