Showing posts with label JMRI. Show all posts
Showing posts with label JMRI. Show all posts

Friday, 23 October 2020

Raspberry Pi - For JMRI

No not a a Raspberry Pie (the type you like to eat).

Have been watching with a keen interest the progress of the Raspberry Pi mini computer.

The Raspberry Pi is a PC on a board that are about $100. The idea is that they are small, simple, solid state and are used for what ever project you can come up with. The Raspberry Pi 4 fits into the palm of your hand and is about as powerful as your average size Laptop these days. Has 4 USB ports, built in WiFi, a wired network port, 2 x HDMI ports etc etc. Is runs a version of Linux called Raspbian. All totally Free..




I had watched a few tutorials on setting one up to run JMRI and had been sitting on the fence for a while as I had a old Laptop that I was using to run Panel Pro on the layout. The issue with the laptop is that it takes a while to start, does not have a battery and was a general pain in the neck. I found a cheap, used Raspberry Pi 4B 4Gb on ebay so thought why not.. Lets have a crack at this.

The guys at JMRI have set up a image for the Pi so that it can just be copied to a SD card for the Pi and it will auto detect the DCC system and connection to the Loconet. Too easy I thought..... and it was..

I have now got the Pi running on the layout in a way so that it does not have a screen, it boots up when the layout power is turned on as I walk in the room. The Pi then auto starts JMRI and the Panel for the layout and then runs the layout initialisation routine to set all the turnouts to a known state for the signals to work.

It is best to shutdown the the Raspberry Pi rather than just killing the power, so I have set up a turnout number that I can operate from the throttle so that it runs the shutdown routine for the Pi. Once done I can then kill the power to the layout. 

As an alternative, I also have an old iPad in the room that connects to the JMRI web server (that auto starts when the Pi starts). I have a panel that has some basic functions on it (per below) so I can enable the staging auto reverse set up so that I can just set a train running and JMRI will set for the selected clear track and then detect when the train is in the loop and auto throw the turnout so that the train can exit safely. It then waits for the train to clear the staging turnouts and a few extra blocks and then rests.



The panel also has a switch on it to shutdown the Pi so that I dont need to use the throttle. All rather nifty.. So now I can do away with the laptop and only drag it out when I need to program a loco.

The Pi has USB ports so that a keyboard, mouse and monitor can be installed if needed, but I can just remote control to it from my laptop or the iPad if needed. So no screen or keyboard is required in the RR Room.


All rather nifty really. That was a nice distraction from buildings. Now back to the buildings.

Saturday, 4 July 2020

JMRI Panel videos

NX Routes and APB.

Here are a few short videos showing how the JMRI panel works in NX Route mode where a dispacther needs to set the route for each train for the signals to work. The second panel, is the same base file with the NX routes removed and the NX route icons removed so that the panel will operate automatically. The signals will auto set to the right colour depending on the occupancy infront of the train and the orientation of the turnout infornt of it.

Here is the NX route panel.
 
Note: The size and video quality is much better if you play the Video in Youtube rather than this small box. Click on play and then click on the Youtube icon in the box to open a new browser window in Youtube.

Here is the same panel with the NX routes removed so it effectively works in APB (Absolute Permissive Block) mode. This is so I can run the layout by my self and have the signals operate automatically.


Note: The size and video quality is much better if you play the Video in Youtube rather than this small box. Click on play and then click on the Youtube icon in the box to open a new browser window in Youtube.

Let me know of any feedback..

Tuesday, 23 June 2020

Signalling Set up Complete

Debugging Completed

Over the last few days I received some updates from the great team on the Groups.io / JMRI forum.
The issue was quickly identified in that I changed both the Appearance xml file and the aspects file to get what I wanted. The issue was, JMRI uses the user defined Appearance file but ignores the user created aspects file and uses its own. As soon as I replaced the JMRI provided one, things worked perfectly.

Here is a capture of the panel with NX routes with all signals working as expected. This picture shows a number of trains on the layout and 2 routes set for trains operating in both directions.
 
Now that the panel file is set up with NX routes, in order for signals to function a dispatcher is needed to set routes for each of the trains. While this is great when I have an operating session, it is not great when I want to run as a lone ranger. This issue is easily fixed by removing the NX routes from the routes table and going to each of the White arrows on the panel and hiding them. This effecitvely changes the panel from a APB panel to a ABS panel where all the signals will operate automatically in both directions. While not strictly prototypical as the 1st into the block will get the green and opposing trains will get a red but it at least enables signals to operate as trains pass through the sections dependant on the route set by the engineer at each of the local panels on the layout.

Here is a screen grab of the modified panel.

My plan going forward is to maintain the panel WITH the NX routes configured as the "gold"file and then once changes are made in that and tested, then I can go and copy and rename the file to a NON NX route or ABS file and go and hide each of the NX Icons. 
The best of both worlds in a simple change in the Panel file I load.

Now for more testing out on the railroad to make sure I have covered all possibilities.

Saturday, 20 June 2020

More signalling work

Debugging.

Over the last week or so I have spent a number of hours adjusting and debugging the signalling system on the JMRI panel. I have basically developed my own set of aspects based on the AAR-1946 rules and removed a number of aspects that are just not needed for my layout.

There are a few quirks to fix such as the Approach (Yellow over red) and Medium Approach (Red over Yellow) that are not showing correctly. I have enlisted the help of the guys on the JMRI Groups.io forum. So hopefully will have a fix soon.

Here are a few screen gabs of the panel showing Routes set and trains progressing around the layout in opposite directions. There are a few signals showing the wrong aspect and thats all part of the bud fixes I'm working on.

Red - Occupied, Green is a route set, and White is no route set / no trains in the blocks.

The large green arrows are used to set the start and end points of a route and once the route is set the direction of travel.

Note the large sections of green in both staging yards on all the turnouts are 1 block per yard holding all turnouts. While the entry to the staging is not that large in terms of the turnouts section or block, showing them in a cohesive way on JMRI is a bit of a challenge. Hence it looks a bit odd but it works.

This screen capture shows a Train in the middle 1 turn helix heading south and a route set into track 1 in south staging.
It also shows a train exiting the loop in Plattsburgh and heading to the 3 turn helix (bottom left) and a route set to track 1 in North staging.

This screen capture shows a Train Between Whitehall and Port Henry heading South about to enter Whitehall on track 2 with a route set to track 1 in South staging.
It also shows a train in the 3 turn helix (bottom left) and a route set to track 1 in North staging.


This screen capture shows a Train Between Whitehall and Port Henry heading north about to enter Port Henry with a route set for the main in Plattsburgh.
It also shows a train in the 3 turn helix (bottom left) heading south with a route set to enter the loop for a meet in Plattsburgh.

This screen capture shows a Train on the main in Plattsburgh waiting for a route.
It also shows a train entering Plattsburgh from the North on the loop for the meet and a route set to enter the loop in Port Henry with no route set beyond Port Henry

More to follow once I get the aspects sorted out.

Sunday, 14 June 2020

Signals on the JMRI Panel

Signal set up.

This weekend I got stuck into defining all the signal heads and then signal masts for the panel and linked them to the outputs on the various driver boards under the layout. With a careful bit of planning, this went with out a hitch.

Then I added the signals to the panels and defined the logical order or connections between the signals.

Then some virtual testing was completed.

The signals work as expected apart from a mine issue where the highest aspect is approach medium. I cant get them to go full clear. I suspect this is something to do with speeds set on the blocks or turnouts. I spent a fair bit of time looking for the issue but it has eluded me thus far. I will place a post on the JMRI Groups.io page to seek assistance from the guru's.

Here is the panel as it stands today.

If you look closely, the signals on the main through Whitehall, Port Henry and Coopersville all show a yellow over green (Approach medium). In my mind, they should show Green over red. (Clear).

The below shows 2 routes with trains leaving both ends of the layout and set up for a meet at Plattsburgh.

Will continue to fault find the issue and keep the page updated.


More to follow once I fix the issue.

Then I can start testing my existing signal masts and then start installing them on the layout.

Thursday, 4 June 2020

JMRI Panel update

All bout routes.

A little while ago I updated the arrows on the panel to make them easier to select with a mouse when setting routes. Here is a screen capture of the revised panel.

I'm still yet to add the signals to the panel.



Note the green is the routes set. So in this diagram, a train from the North staging can proceed to the loop at Plattsburgh and a train from the South staging can proceed to # 2 track in Whitehall.

More recently I have been busy adding SMD resistors to new metal wheels and then installing them into my rolling stock. I did have about 1/2 the cars with resistors now all the rolling stock on the layout has them. Should make detection even more reliable than it was.. (And it was reliable before).

More to come.

Sunday, 29 March 2020

NX Routes in JMRI

Covid 19 lock down..

With all this Covid 19 lock down, I have now been able to find time to work on the panel for the layout. Im keen for the dispatcher to use routes to then drive signals etc.

The 1st step is to set up the panel with all the NX routes. Then add signals.

Here is the panel as it stands today.

Here is a demo of the panel in operation.

Now for signals.

Wednesday, 25 March 2020

Signal logic testing

JMRI Panel development

Its March 2020 and its a strange world we live in today with the COVID-19 pandemic happening globally. Most people in Australia that can work from home are working from home. The streets are quiet and the cities are empty. There is a rush on to stem the spread of the pandemic by self isolation in our homes and only venturing out to get supplies. We expect to be like this for a month.

So its time to get more work done on the railroad.

I have been working on a test JMRI panel to test NX route setting and signal logic. This will all then be built up on the main panel for the layout.

Good progress is being made. I have tested the SP signal logic from 1930 (SPTCO-1930) within JMRI. This does not give me the number of signal aspects I'm looking for to make the signals come to life.
Next I tried the AAR 1946 signal logic and this is much better as there are a number of different aspects for 2 search light type signals.
The D&H ran 3 search light signals for all home signals and dual for intermediate permissive blocks.
I will hard wire all my lower or 3 search light heads to red (to save on wiring and DCC signal driver outputs.) So in building the panel, it will show the 2 search lights that are active.

Here is the test panel that I have been working on.

The arrows in the track are part of the NX route setting. So the dispatcher selects the block to depart from and the block or signal to arrive at arrows and the panel sets the turnouts and the signals.
Rather nice feature I think..


It is working well.
There are a few bumps to iron out with the intermediate signals, but the NX routing is working a treat.

Next to move NX routing to the main panel and test it with trains on the layout.

Saturday, 14 March 2020

JMRI Panel

Time to get going on the JMRI Panel

This week it was time to get going on building the JMRI Panel for the layout.
There is a long way to go..

The 1st steps is to get the basic diagram right and functioning with all the blocks and turnouts showing correctly.

There is also some logix built in to enable trains to automatically enter and exit the North and South staging on tracks 1 or 2.

Here is a sample of the work in progress.

Next is to go and set all turnouts to disabled when occupied. Then to set up NX routes to the dispatcher can set a route. Then this will set the turnouts and signals for the engineer.

Till next time.