Sunday, September 20, 2026

Servo Research

This week I completed a project that I probably started about 10 years ago.  This was when I made a couple of HO Scale 6.5m x 6.5m garages in styrene, but these models were fitted with a garage door that could open and close.  These were tilt-a-door models.  I included a servo at the back of a garage, hidden by a wall and then ran a cotton connection from the servo to the tilt-a-door mechanism.  So these models just sat on the shelf in the train shed for a very long time.  

So this week, I bit the bullet and started to get into working on servo control from an Arduino.  I first got a servo working directly from an Arduino UNO.  So I then connected the Arduino to my garage Arduino and after adjusting the throw of the hidden Arduino, I could get the tilt-a-door on the garage model going up and down.  Next step was to reconfigure the wiring to/from the Arduino so that I could install a push button inline so that would control the opening and closing of the garage door via a press of the push button.  So some quick changes to the Arduino code and it was working.  The code would wait until a press on a certain pin in the Arduino – in my case pin 8 and the door would open.  It would then wait again for another button press on the same pin and the garage door would close.  I took this working garage door opening model to yesterday's ‘Show and Tell’ at our local NMRA meeting.  I got a couple of nods from the audience.  I was happy.

However, during the week, the main task that I was trying to master was to incorporate servo control from the Arduino via a PCA9685 16 port expansion module.  I tried it about 50 times.  I could not work out why this was not working.  I was bamboozled.  So on Friday I rang up my Arduino mentor - Bob, and asked if he could bring a spare PCA9685 16 port expansion module from his collection to Saturday’s NMRA Meeting.  I thought that the only reason I could not get the servo to work via the expansion port, is that my expansion module must have been bung.  If I proved that by using Bob’s spare module that it worked, then I'd order a few more of the 16-port expansion modules online to replace my bad one and then have a spare nearby.  So on Saturday morning I was sitting in the audience of the NMRA meeting with my PCA9685 port expander sitting on my lap, and I just happened to read the bottom side of the PCA9685 expansion module.  It said that if using servos, then the power had to be supplied via the V+ pin.  Oh firetruck!  I had not powered the V+ pin on the PCA9685 expansion module.  Now I have 7 of these expansion modules working in the internal logic of my Signalman's Panel.  But these are used only to control LEDs.  However, all of these were powered by the Alternate Power plugs on the module.  This powered the V+ pin, but doesn’t use the V+ pin.  My testing with LEDs on the expansion module in question did not need the alternate power plugs used, but the LEDs still worked on the module.

The message above 'Use V+ for servo supply'.  It is quite clear.

So at half time in the Brisbane Lions and Hawthorn AFL game on TV later that evening, I reloaded the code into my Arduino to run the servo via the PCA9685 16 port expansion module, but this time with an extra cable from the 5V pin on the Arduino to the V+ pin on the module.  Guess what?  The bloody thing worked.  Damn Dork!  I did advise all the attendees at the NMRA meeting that I might have worked out why my Arduino testing was having an issue controlling the servo via the expansion port module.  I did get a few laughs.  I also got a few jokes throughout the meeting about powering the V+ pin.  We really need to separate Clinton, Greg and PK at future NMRA meetings.  Note to Div 1 Superintendent – separate those bozos!  When I told them that, they all laughed.  Given that one of them is a teacher you would think he would know better.

So now I just need to get some MERG servo components to fit underneath another test module and I will incorporate a servo that will actually change a point on this new test module, controlled and interlocked from my Signalman's Panel.  Hopefully my mate has placed the order from MERG in the UK.  I’d expect that in 2 or 3 weeks it might arrive.

I have an Operations Session scheduled for this coming Sunday, so this week I will be cleaning up the train shed and cleaning the track and testing everything in preparation.

Sunday, September 13, 2026

Interlocked Points Control

So this week I went to Jaycar and picked up some 3 pin bi-colour (actually they are tri-colour if you power both sides at once) LEDs that I intended to replace my 2 pin – bi-colour LED’s that I already have installed on my Signalman’s Panel for the point indicators.  Jaycar had ones that were common cathode, which was what I wanted.  I set up a test rig on an Arduino UNO running through a 16-Port Port Extender (PCA9685).  I had it working as I thought it needed to be and I was happy.  Then I had another think.  So I then rewired it and tested it and I was even happier.  I halved the number of ports used on my PCA9685 by putting two of the 3 pin Bi-Colour LEDs back to back, instead of powering each pin separately.  The issue is that when I put two of these 3 pin LED back to back, the colours of the Red and Green LEDs are at different intensities.  So I did a bit of playing around and I needed about a 47 ohm resistor on the Red output and the intensity of both outputs was then the same.  So on Friday I started to install the new LED’s into the Signalman’s Panel and remove the old LEDs.  I did the first one and I could control the actuation of the LEDs by the panel mounted switch.  I then did the second one and the third switches and they would not change.  Then I realised that I had not uploaded the new version of code to make the points other than Point number 4 toggle correctly.  So I uploaded the new code to the Signalman’s panel.  Then I did a new test version of the LEDs as I had a crossover on the future layout which this time needed three LEDs to work together.  Two were for the parallel lines and the third was for the crossover toute.  The code allowed for the points to not be changed if the signals were not previously set to stop.  So now I have fully interlocked points on the future layout.

I had a small test jig for the 3 x bi-colour LED’s and the operation worked on the test jig.  It was plugged into the Signalman’s Panel and while I was testing other things, I heard a pop.  Oh No!  It seemed that I had blown up my test rig.  I have no idea what caused it.

So I worked out again how I would wire three bi-colour LEDs again and directly put them into the Signalman’s Panel and gave it a test and it worked.  I then did a full test of the Signalman’s control panel.  I set up various routes and now if you change a point and the signals are not already set to Red, then the points on the layout and the Signalman’s panel do not change.  The Signalman gets a message on the display either that the points was successfully changed, or that it was not changed, as he had not set the signals to Stop first.  So this is working really well.  I can set up all the routes and when I reset the signals, I can change the points back and I can get everything to go back to automatic mode.  I am very happy.

On Saturday it was the AGM of my Model Railway Club.  I nominated for a position on the Executive – General COMMITTEE MEMBER, for the first time in about 25 years.  I actually got selected.  There were 4 positions in this category and 6 applicants.  I was amazed that one member missed out for the same position.  The numbers of votes for each candidate was revealed this arvo.  63 people voted either in person or via proxy, and I got 62 votes.  Not bad I suppose.  But I wonder why PK did not for me?  While at the Club I received an order for a few styrene industrial bins.  I will make some at the upcoming RMCQ Exhibition in 4 weeks’ time.  I might as well make a few more – maybe 10 total.

Before lunch today I went down to the shed and started to do a bit of a clean-up.  I have an Ops Session in 2 weeks, so I need to move a lot of things from the floor and from the North Coast Control’s desk.  I also did a bit of work on a fettler’s shed that Paul provided me with last week.   I have another to clean-up and put together.  I had one at the Club yesterday and received a few requests from members for their own copy of the fettler’s shed.  I might have to ask Paul if he can print some more.  I have since found out that these models are Walker Models 3D prints and cost $15 to download.  So we will not be distributing copies to anyone.  They can get their own.  

Today after lunch I spend some time refining my presentation notes for the Armidale Convention.  They are basically complete now.  I might add an extra photo or two to the document, but that is it.  This coming week I will be working on actual servo motor control from my Arduino and my Signalman's Panel.

Sunday, September 6, 2026

This Week's Review

This week I went on a bus, train and tram trip to Burleigh Heads on the Gold Coast for something to do.  Total trip $1.00 due to our $0.50 fares.  I chose Wednesday to go, as I thought I’d get the most mates available to come share the experience.  But as it turned out, it was just Dean and myself who attended after 16 people were asked.  They had varying excuses.  Some I can actually agree with.  Anyway, it was a great day.  I walked just under 10km that day, including around the hill at Burleigh.  Boy was there people around, on the train, on the tram and on the beach and stacks also walking around the National Park.

Burleigh Heads looking towards the hill.

Burleigh looking up towards North Burleigh and onwards to Surfers Paradise.

Saturday was a working bee day on the FreeMo modules.  We had about 6 of us there working on them.  Bit by bit we are getting them finished.  While taking a break yesterday I was shown how Paul controls his servo point motors on his layout.  I think I will use the same MERG servo mounts and then interface the servos with my Signalman’s Panel for control of the servos.  I’m thinking of also having up to 4 catch-points also controlled with servos.

MERG based Servo controls for point motors.

As today was Father’s Day, I got my combined Birthday and Father’s Day present (which I purchased myself) from the kids.  It was a Model Box BCC bus kit in Lego type blocks.  This is a fantastic model.  My only complaint is that my local bus service number and destination (the most populous Buzz service in Brisbane) or even the City Destination board, were not in the list of destinations available.  I might have to reach out to the guys and see if they can make up those destinations.  But apart from that my present is completed and I’m very happy with it.  Did I say it was a great little model?

The completed bus.

The rear.

During the week, I was confirmed as a presenter at this Year’s Armidale Convention.  My topic is Automated Signals for the Layout.  My presentation is completed, but I need to spend some time on the notes for the convention handout.  I know I started some somewhere, but I cannot find them.  I will keep looking.