Blog

In the layout room, nobody can hear you scream

Programming

LCC Project on Rick's Frisco Layout

I've been fortunate to be involved in a fun and entertaining on my good friend Rick's terrific Friso layout. We are installing hardware



resize_LCC II
Some of the hardware from RR-CitKits that will be used on Rick's LCC project


resize_LCC IV
The signals have been installed, awaiting wiring

resize_LCC III
Overview of the wye that comprises the plant to be signaled.

resize_LCC 1
Bret attempts to get the electrons to flow in the proper direction, while he dreams of his next Hawaiian vacation. Rick looks on approvingly, but he is silently thinking of his Rainbow Brite collection

It's the little things

Screenshot 2017-04-12 21.58.38
East Franklin Yard Entrance is now detected - the track displays yellow when occupied

I've been working on the JMRI panels lately, adding more functionality and user-friendly features.

One feature that I've wanted for a while, ever since I added train logging on the main screen, is to put block detection on the entrance tracks at Franklin Yard. With the entrance tracks detected, the dispatcher can then enter a train identifier so that the train will be tracked across the main screen

Tonight, I wired the east entrance, and set up the CMRI sensors and JMRI logic code to make it work. I will cocninue with the west entrance track tomorrow (hopefully). This should enhance the dispatcher user experience!

The pull-up resistor

SnipImage

I've been working on some arduino circuits and decided to take a break to learn a bit about pull-up resistors, which are used in a digital circuits to prevent floating conditions when dealing with inputs.

As usual, a quick search on the google provided a ton of information on the subject. Here is a great video that I found on the youtubes:

But is it "Modeling"?

Screenshot to program

Today, I spent all day in the basement, working on the layout. I didn't build or paint rolling stock. I didn't work on scenery or track or ballasting. I didn't speed match or consist locomotives. I didn't install tortimusses or string yet another mile of wire beneath the layout.

I worked on the computer program the runs the layout.

All.
Day.
Long.

So, does that count as a day of "modeling"? To me it does! I worked on the dispatcher's screen, getting the staging ladder turnouts to show the occupancy state of the ladder blocks, so the dispatcher can easily see when a train is entering and leaving the staging yards. It may not seem like much to describe, but it really adds clarity to the dispatcher's screen, and, therefore, will (presumably) make life a bit easier for the dispatcher. That was the goal of the whole exercise, anyway. Along the way, I remove some extraneous code that is obsolete since the conversion to DCC a couple of years' back. The code removal will improve the loop cycle time a tiny bit, which is already at a satisfactory 12 cycles per second.

My ruminations tonight are centered on the primary appeal of this hobby to me, namely the variety of activities and interests that model railroading offers. Don't want to do scenery tonight? Fine, build or paint a car. Do some photography. Work on some operations paperwork. There are plenty of varied activities to keep a person engaged. When you add an electrical/computer/programming aspect to the mix, you have no cause to become bored with the hobby.

Now, I don't code much these days; the program that I use to run the Mighty MKT is mature and stable, and has been refined over the years. But I was able to dispatch the layout a bit during a recent operating session, and I noticed a few things that could use some improvement. So I spent the day in the coding chair making some new and some long-overdue tweaks and improvements. Working on the program has reminded me of the beauty and power of the Computer/Model Railroad Interface (C/MRI) - with just a few lines of code, you can add a feature or change a feature. Try that with a hard-wired system!

Having made these changes, I may not modify the program for several weeks or even months - like I said, it works pretty well. But it's nice to know that my coding chops are still decent.

Nutty professor