Sunday, February 22, 2026

Still Struggling with the Signalling Panel

You do not have to be Einstein to guess I have continued my work on the Signalling logic for my future layout’s signal panel over the last week.  I had plans for implementing SPAD detection.  I can do it on a couple of signals, but not on all of them.  So I might back off on that thought for some time.

During the week, I installed a second Arduino UNO to attach 11 Infra-red Detectors to.  These are for the Branchline and the Dual Gauge line signals.  These IR detectors were installed into a piece of cardboard (just like the 10 other IR Detectors for the UP and DOWN Lines and the Siding lead lines) and were wired up back to the new Arduino UNO and the UNO was added to my I2C bus inside the panel. These detectors were all tested and work well.  That allowed me to then move onto the logic for the Branch Line and the Bidirectional Dual Gauge Line.  The Branch line signalling is relatively short – just three signals but it is also Bi-directional.  This means that an UP train will not effect the signal on the DOWN and vice versa, however the IR detectors will still light up to show where the trains are on the layout.

Now I have fixed up the branch line logic, and I have implemented all the Dual Gauge logic.  I have strenuously tested all the shunt movements, and cancelling the shunt movements via resetting the switches, or changing the points underneath the train and everything gives the correct results. 

From my point of view I think there is just one bug remaining, and maybe one item that is causing me some minor inconvenience.  I think the DOWN Dual Gauge logic is working perfectly, but the UP Dual Gauge logic has one signal that clears to yellow too early and my brain is currently fried a bit too much to see the cause.  I will have a good look at it tonight, or if that fails, tomorrow.  When this is fixed, I think the signalling logic will be about 98% done.   I have also installed the logic to determine if we have an UP or a DOWN train on the Dual Gauge.  But now thinking about it, I might have to dive back in and look at the UP and DOWN logic in regards to signals at 'Hold'.  This code to set and release these signals must execute regardless of an Up or DOWN train running.

The logic inconvenience can be fixed later if I don’t like it.  Basically I have some reversed logic in one of my panel switch implementations, e.g. I test certain logic tests in a different order, and thus it does not send a message to the LCD screen until a second switch is also set.  Everything works here though. 

So it is possible that on Wednesday when I have a free house with the boss out, I can roll out my 1:1 scale 8m long track diagrams onto the floor, throw around some points and some flex track and do some more detailed design work on the various layout module lengths and widths and where the modules all overlap etc., as there are modules that end up side by side, as well as end to end. 

On last Saturday (yesterday) we had our first monthly NMRA meeting for the year and I gave a talk on our trip to Rosehill Exhibition last year.  I also took along my signalling panel in the hope that at least one of the two QR Train Controllers in our group, could give me some feedback on my signal panel.  Things like the messages I give on the LCD panel, and other comments about the panel.  But the two slackos did not turn up.  I spoke about the panel at Show and Tell and gave a few demos during various breaks in the day.   I found a couple of issues during this testing.  A wire broke in transit and I found a bug in my Down Main Shunt Logic.  Both of these were fixed last night.  I will be adding a whole lot of signage to the panel over the next few days as well, to make it more understandable or self explanatory to the operator.

Sunday, February 15, 2026

More Signal Panel Progress

I have been ‘head down’ and ‘bum up’ coding in my Arduino driven Signalman’s panel for my future exhibition layout.  I’ve jumped head first in and fixed the scrolling of the LCD display on my panel.  I made the variables I was using to control the messages to be displayed on the LCD screen global and now I do not have to pass anything to the function that will do the actual scrolling.  That fixed my issue.  I still get some ghost entries not scrolling off occasionally, but I will identify what causes them and fix them in the future.  Given that my LCD screen scrolling seemed to be working as expected, I then started to offload lots of other messages into the LCD panel.  I added messages like when a signal is set to hold, or when a shunt move is given a signal approval.  Then when the signal goes back to stop, the cancelling of that shunt move signal is also causing a message to be sent to the LCD.  I think this will give the Signaller a better understanding of what he is doing, through positive reinforcement.  I also fixed a bug from last Sunday where Signal U2 after having its Hold status released, it just sent the signal through yellow and then green, instead of remaining at red if a train had just passed that location and was in the section ahead.  That would cause an issue if it continued.  I realised that I had not set a particular flag when I re-wrote that section of code used for signal U2.  One small change by setting the flag and the signal logic resumed working like a bought one.  Occasionally I get signal U1 being orphaned on a red signal after having its HOLD status released.  But it is a timing issue.  If I then set the signal again back to Hold and then release it again, the signal comes back and the aspect is correctly set.  I think I can live with that one little hiccup.  It may even be a design feature!

At this point in time I have two messages that are not being displayed on the LCD panel.  I think I am setting them correctly in the code.  So I will look into that a bit more next week.  I jumped in further and moved onto signal D2, and worked on its code.  I then moved to the two of the three signals on the Dual Gauge line that can be set to Hold.  I will install my next slave Arduino to handle the signals on the branch line and the dual gauge next week.  I will get this working before I start looking at any Dual Gauge IR Signals.  Then I will get the Dual Gauge Up signals working before I do the DG Down signals. I continued along the coding path on Wednesday and I feel that I now have the DG held switches for DG2 and DG4 working.  It allows shunting into the sidings so I’m happy.  

On Wednesday evening I think I mastered the DOWN held signal at D2.  I can now shunt to the UP main.  However, I was perplexed why my shunt switch on the panel could not get the D2 shunt signal to light.  I traced it back to a solder joint had broken.  So I resoldered that jumper wire and it worked.  I was very happy.  I noticed that one signal DG5 also stopped working.  So I jiggled some wires and all in now good.  However, signal SS1, the standard gauge shunt signal from the siding to the Dual Gauge did not work.  I was thinking that I will have to investigate that further.  Also at that stage I have not yet tested a train leaving the standard gauge.  I noticed that the SS1 signal went out maybe on Wednesday morning.

So while on my morning walk on Thursday, the old grey matter was thinking about my Signal SS1.  I realised that on Wednesday when I finally started to get signals DG2 and DG4 to respond to signal aspects.  The signal at one end of the board would light, but the track detection circuit LED at the other end also came on.  It was then that I realised that I needed to swap the addresses of my Dual Gauge Up and Dual Gauge Down expansion boards.  I did this and thought nothing further as it then brought the track detection LEDs and the signals back into sync.  However, it did not click that the SS1 signal was extinguished following this move.  So while on the walk, my brain was wandering and it turned to signal SS1.  It was at that point, I realised that the Red and Yellow LED addresses which used to be on the UP Board at ports 12 and 13, where now on the DOWN Board at those same addresses.  The code in my Signal logic, still had them setting LEDs on and off on the UP Board.  So on Thursday afternoon, I changed the code to move the addresses in the code to the DOWN board and wouldn’t you know it, after compiling the code and sending it to the Arduino, the SS1 signal now turned back on.   The plan for the rest of Thursday was to write the code for making the SS1 signal work for a standard gauge train leaving the siding.  That was to be followed by the Branch signals, then DG3 for trains stopping movements into DG4 when a train is entering or leaving the dual gauge line into the standard gauge sidings.  

So all the code for the Branch signals was written and tested and apart from one message not appearing on the LCD screen, I can shunt from the branch to the UP Main, and exit to the DOWN Main and head north.  It is now also working like a bought one.  I took it to the Club on Saturday and showed it off.  I got plenty of questions and lots were interested. 

Saturday evening I started assembling all the wiring for my second slave Arduino for the next lot of IR detectors to be installed.  Then on Sunday after another purchase at JAYCAR, I found and fixed a few cosmetic errors in my signalling logic.  Some signal aspects were not cancelling when I turned off their activation switch on the panel.  But as I was doing these changes, my memory utilisation in my Arduino continued creeping up.  It got to over 6200 bytes.  That caused a warning message to be issued by the IDE compiler, that the Arduino could become unstable due to lack of free memory.  I did some research and found out how to reduce this usage.  Basically every Serial.print statement e.g. Serial.print(“blah blah”) for debugging and programming tracking purposes, was changed to a Serial.print(F(”blah blah”)) and my memory usage reduced down to 2373 bytes.  I was amazed! 

I had a basic test of the program on Sunday afternoon and of the items implemented about 95% are working as designed.  I know of a couple of small improvements around SPAD detection.  I display this SPAD message every time around the logic loop, instead of just once while the IR Signal detection LED is lit.  I’m just too lazy to code that change in the first 8 places in the code today.  I also have the RED aspect on DG7 lights intermittently.  Its address is pin 9 in the DGBoardDOWN,  But I do not know when I activate it in the code.  So I have just referenced the wrong board or wrong address somewhere, but my brain is so fried I cannot find it.  But I will. 

Progress is good and satisfying.

Sunday, February 8, 2026

Still doing Signalling and a Clinics Day

I spent time on Monday reviewing my wiring in my Signalman's panel.  I had wired up 10 IR detectors to an Arduino UNO, which I moved from my Arduino MEGA.  I found that I had wired about 2 or 3 IR detectors back the front.  So that was fixed, and now my slave Arduino UNO was powering up and seemed to be working.  I then did some work on the main Arduino MEGA.  I was wondering about power draw again.  I started looking for a 6V or a 9V power supply in lieu of my current 12V power supply in case I am overloading the voltage regulators on the MEGA board, when it must drop that voltage down to 5V.  It seemed that my current MEGA had bit the dust and was not allowing my computer to link to it and upload a new version of its program from the Arduino IDE.  I then did a google search to see if you could repair the Arduino.  Someone was offering $89 to just look at an item’s board.   Well I could buy 4 more MEGAs on eBay for that price.  I looked on Ali Express and I ordered 3 more spare MEGA boards for about $17 total - delivered.  It looks like I need to throw that MEGA away and install my current spare board.  Thus the need for some more spares in the back pocket.

On Tuesday morning I bit the bullet and swapped out my bung Arduino MEGA for my spare one.  It fired up first time.  I then decided after reading that the input voltage should be 7-12V on the Arduino, to not get the 6V power supply and settled for the 9V version.  I used by NMRA account code and saved $4 on that one item.  I have saved this year’s membership fees already through these discounts for sure.  While replacing the Arduino MEGA, I managed to displace a few wires that I had jerry rigged for testing the IR detectors.  I also had the top of the panel come falling down on me and that dislodged a few more wires.  So after finding them, normal services were quickly resumed.  It must have been just like QR on Tuesday as there was an intermittent signalling fault on the network out near PK’s place.  I think he had a hand in its cause.

We had our Tuesday Nighter’s get together at Geoff’s place on Tuesday evening and it was good to see 10 of us turn up.  Geoff asked people to bring what they were working on.  I brought along my Signalman’s panel.  I borrowed some of Geoff’s electrons and turned it on and gave an overview of how it operates.

I went into town on Wednesday to pay up my Lotto debt.  I chose to split the travel with bus then train, just to look at what has changed over the new year network shutdown.  Well I can advise that there is new track laid through the new platform at Yeerongpilly.  However, it is not connected at either end and there is no overhead wires above it.  There is also significant progress in Clapham Yards for the new train staging facility.  So there is some progress.

I had been trying to write some Arduino code that will track messages on my LCD screen, and after about 5 seconds of being displayed, the message will scroll off.  The code is basically working, but when I try to test it with multiple messages, after a while it gets confused and the messages do not scroll.  This has me perplexed, as the logic is simple as.  I will resume this logic testing next week.  I also have identified a few gremlins in my UP code.  But I can't put my hand on the exact circumstances that are occurring for me to track it down conclusively.  I will continue investigating.  

Saturday was the NMRA Clinics day opened up to 16 members.  We had some people pull out at the last minute for various reasons, but we had a great day.  It kicked off with my doing some terraforming on a small foam block about 30cm x 25cm.  This for shaped and then plaster encrusted tissues were laid over the foam.  This was left to dry while the attendees then made a single telegraph pole and then with the rest of their wooden stick offcuts were made into split post fencing.  The wooden items were stained in my ink pad ink and methylated spirits.  Then the attendees had a lunch break.  It is planned that these items will be used in day two of the clinic, which will occur on the 28th of this month.  We will paint the scenery block, and then add dirts, sands and scatters to bring it to life.  We might get some rocks and other detail items.  So telegraph pole and the split post fencing will also be added.  After lunch the attendees were split into two groups and we had one group making a tree while the other group made a signal relay box in styrene.  Following afternoon tea, the two groups swapped over and did the other session.  These were also well received and the attendees will also add these items to their scenery block on the 28th.  They also have more styrene and tree clinics on that day as well.

Jonathan showing the crew how the tree making is done.

Some of Jonathan's trees on display

Follow these steps and you get a tree like the one on the right.

Next garage has the styrene team working on their signal relay hut.

Sunday, February 1, 2026

More Thinking About Arduinos Controlling Signals

This week I struggled to get motivated to do any modelling.  However, eventually I started doing some work with my Arduino UNOs connecting a couple of them together over an I2C bus with one reading IR detectors and the other flashing LEDs based on what IR detectors were detected on the first Arduino.  That seemed to work.  I was amazed I got it working quite easily.  This Arduino UNO will have 10 IR detectors attached to it, and it will talk to my Arduino MEGA which will run the signalling system.

Today I moved the Arduino UNO that will read my future IR detectors from the test bench into the Signalman’s Control Panel and then rewired everything.  When I started up the System, it seems I had some low voltage on my controlling Arduino MEGA and it did not seem to be firing up.  Last night it was running before I did any changes to the system.  I just need to trace back what I might have touched and try and ‘unchange it’.  I can’t seem to see anything conclusive as yet.  I have full power into the system from my power supply.

Earlier this week I was also called onto do a presentation at the upcoming February meeting of our NMRA Division.  Luckily, I had started the framework for another presentation.  So that presentation was completed this morning with the help of a couple of photos from PK.  At the same time I started the basis of another presentation that is about my Signalman's Control Panel.  But that will be quite some time before that is useable and thus the presentation will be ready.  Apparently I am also assisting a number of NMRA members to build a small Diorama next weekend and in another 3 weeks.  So yesterday I spent a bit of time putting a few things in a box to take to next weekend's clinics day.  It has been designed for up to 16 paid attendees, and at last count we have 12 nominations.  That is great.

Sunday, January 25, 2026

Empty Nester

On Monday we packed up the car and drove to Sydney with my son’s possessions.  We overnighted in Beresfield.  Tuesday night we unpacked his stuff at his share house in Glebe, and we drove to our hotel.  The Hotel was just about a 500m walk from his house.  I was amazed that when driving down Glebe Point Road there were tram tracks in the bitumen!  I knew that there was the old Tramshed a few km away, but I had no idea that trams ran down that road.  I later walked to the Tram Shed, and there is a tram sitting in one of the roads in the shed.  There is still plenty of track embedded in the car park.  My son starts work in about 3 week's time down in Sydney.

The Tram in the Tramsheds

A Three way in the carpark

More rails in the footpath

A sign to its past

I took the opportunity on Wednesday to catch the tram to Central and watch the Indian Pacific arrive into platforms 1, 2 and 3 over an approximate 45 minute period.  I find it very perplexing that the shuffling that occurs once the passengers have boarded and the various consists on the platforms depart to the outskirts of the station and the loco that brought that train in, goes to another platform to remove the next section of the train to outside the platform.  This complex shunting movement seems over complicated.

The main board at Central

Ther arrivals board showing the three sections on the IP

The first section arrived, and disconnected the locos.  They ran to the end, while the shunter changed the points

The Locos are running around the consist in platform 1.

The second part, arrived in Platform 3, with the second train loco.

The Locos from the first consist, attached at the front and are pushing the carriages back to the stop blocks in Platform 1.

The third consist arrives in Platform 2.

This section was the last to arrive, but first to leave.  Then loco then follows the section out and then attaches to the cars in Platform 3.

This section in Platform 3 leaves, and loco follows the train out.  No doubt this then goes over to Platform 1 and then takes that section out of the platform to the yard where they are all joined up.

The station Schematic of Central

On Thursday I caught a train from Central to Circular Quay so I could ferry over to Greenwich, as I wanted to walk past my father's family home in Chisolm Street.  I took a couple of photos and then walked back to the ferry terminal for the trip back to the city.  I had a good chat to a couple of old Fisherman casting off from the jetty.  They were having great success and go there4 every Thursday.

On Friday we heard from Arthur, that a local hobby shop, fairly close to us in Brisbane – HobbyOne had closed its doors.  It appears that it is doing mail order.

We drove back today from Sydney and normal programs have resumed in the household, all be it with one person down.


Sunday, January 18, 2026

More Control Panel Progress

So I have been having fun with my control panel coding and incorporating an LCD display panel into the mix.  Basically I started by writing code to test the LCD display.  I then moved to adding a series of text outputs that follows the testing of the LED lights on the panel.  All the LEDs get exercised to ensure that they all work and their wires are all connected.  I have also incorporated a self-test switch on the control panel to be run during startup of the Panel and Arduino.  When the switch is set, the Arduino advises what addresses are readable on the I2C bus, and then it does the exercising of all the LEDs on the panel.  When the self-test switch is not set, the Arduino just sets the Control Panel to its initial state and then it starts running the layout.

Late on Monday night, I was having some issues with some panel switches not working correctly.  So I went back testing the various point control switches, did some re-wiring, and the control panel switch and hold switches all work perfectly.  I found a couple of typos during the testing, when the logic says set yellow signal, then I go and set the green signal, Doh!.  Some people are just dumb!  I then copied that code in a couple of places, so I had to change those snippets as well.

I was having issues with the operation of the UP 2 signal and its Shunt Ahead aspect and the two routes to other tracks - the DOWN track and the BRANCH.  So I bit the bullet and rewrote that whole section of code.  It worked so much betterer.  Hehehe!  There was an issue that the train coming out of the siding, and one going into the siding would reset the signals after the code cancelled them (set them to stop) once the train exited the track.  But I soon fixed that logic error.  Next test was for me trying to get the train from the UP track to shunt to the DOWN track and go to the BRANCH.  I realised that I had commented out the code for the Down and Branch logic while just testing the UP logic.. So I uncommented that out and got stuck in.  I did a few more tests, changed the location of some delays in the code, removed a couple of boolean flags from the logic, and I think the UP code is now 99.5% accurate.  I’m sure I will find a bug somewhere in the future, but every test I threw at it, seemed to work.  So the focus now turns to the DOWN trains and their code.

As work on the panel logic progresses, I again realised that the UP code does not match the DOWN code.  So I upgraded the DOWN code by copying the UP code and changing names to protect the innocent.  I think I have DOWN signals 1, 3 and 4 all ironed out and identical between the UP and DOWN sides.  I will take a bit of break and get back to DOWN signal 2 in a while.  I have ordered some more Arduino stuff online and so I need for this to arrive in the post over the next week or two.  One of the issues that I think I am about to hit is that after adding the next 4 IR detectors (for my DOWN Signals), it appears that I am potentially stressing the power limit output of the Arduino MEGA.  My research suggested that an IR detector would pull about 20ma each.   I measured one and got a figure of 38ma for just one when using the 5V supply pin.  I switched this to the 3.3V pin and got about 18ma.  So the thinking was to offload the control of the IR detectors to a number of slave Arduino input boards on the I2C bus.  However, I could not find anything suitable.  I went looking and found out that I could just have say 10 IR detectors controlled from one Arduino UNO and the other 11 IR detectors controlled by another Arduino UNO.  NO need for special input boards.  I can then give these Arduinos an address on my I2C bus, like 2 and 3, and they will power up the IR detectors.  If this is still too much power for a UNO to supply, I will further break the bus down into UP, DOWN, BRANCH + SIDING and Dual Gauge offload Arduinos.  My Arduino MEGA will link to the Arduino UNOs on the I2C bus with a common GND reference.  The MEGA will poll the UNOs for their IR detector statuses and send that to the Master MEGA.  The MEGA will then take action and light the various White detection LEDs on the control panel.  In theory this is all child’s play.  In practice, it may not be.

While going through all these tests, opening up the panel and closing it again, I worked out that my self-test feature is not testing the 16 panel mounted switches.  I’m thinking that I need to verify that every panel switch is working in one direction, then ask the operator to change each switch to its opposite position and I will test again.  I will then ask that the switches be returned to their normal start up positions.  If I can’t read a different result from the two switch positions for each switch, then I have an issue with one of those switches.  Some of the issues I am having with the control panel is that a wire comes off a switch and my sensors are not reporting things correctly, and thus will not work as expected.  I then have to do through the consol log to verify various values of some variables.

This arvo while reading some stuff online, I realised that I think I can implement a SPAD feature on the control panel logic.  I will think about this a bit more and report back in the future.

Sunday, January 11, 2026

Side Trip to Sydney

So late last week and early this week, I was in Sydney with the family.  We were looking at places to rent in inner Sydney for my son.  I recon I walked close to 30Km over the 4 days on which we were there.  We also caught some busses, trains and trams.  Alas we did not find something, but later this week, he looks like he had found a nice place near Glebe.  It might be either a bus, or light rail to work, but he could walk on some days – and certainly walk home on some days to save a few bucks and also get some exercise.

Standing at Wolli Creek platform

Looking into the harbour

Looking at Circular Quay

When I got I back home and resumed work on the Control Panel for the future exhibition layout, I wired up all the special LEDs on the panel, including the signals in the siding, the four shunt ahead signals and the 2 route indicator signals.  I was amazed, when I started soldering this up on Thursday and Friday, because when I got around to testing them on Friday everyone worked first time.  That is a bit unusual for me!

So focus now turns to moving back to the first cut of the testing program, with just 5 IR detectors wired up.  Once this seems to be working, I will switch over from a Arduino UNO to an Arduino Mega and continue the testing.  I will spend time working on the inputs from the various switches on the control panel and interfacing these with the Arduino.  Another rabbit hole that will throw a spanner in the works is testing my Arduino LCD screen.  This is a 20 character x 4 line screen.  My plan is to test writing text to it, and then incorporate some messages to the screen if the Signalman does something stupid, I can inform him.  That could be something like throwing the points for a crossover or a siding without first setting the signals to stop first.

I am also thinking of having a self-test on the control panel where every LED is exercised before the Arduino gets into operational mode.  I might also write messages as to what we are doing/testing as we go through the process.