Category Archives: N Gauge

Model Railway Arduino Signals – Design

As previously explained, I’m working on the use of an Arduino and an old laptop to control the points on my very small N Gauge model railway. Well, I’m also going to control the signals too.

Working on this track plan:

Simplified Garwick Track Plan

I consulted my tame signalling engineer (some say that he once completly ruined the brakes on my MG Montego, and that he spends his spare time writing cod-1950s hard-boiled detective story versions of his work, but all we know is that he’s called The Sig), explaining to him that all the lines were bi-directional. He put on his thinking-trilby, sharpened his crayons, and came up with this idea:

timmy2

(Only the signals inside the box are to be modelled. The ones outside it are off-scene, and therefore just implied to be there and functioning.)

So, 6 signals. As I only had six remaining outputs left on the Arduino, I decided on 2-Aspect light signals.

And, lo, these were on eBay:

z0a

Six of them for £19 incl shipping, actually from http://hezhiqing.com/NSIGNAL.html (yeah, it says 5 on the website, but all the eBay listings show 6 of them).

Nominally they run off 12v but are plenty bright enough with 5v from an Arduino supplied to them. Plus, if you tie the Green line to 5v and the Black to GND, putting 5v up the Red line from the Arduino will switch the signal from green to red. This is counter-intuitive to me, as surely the signals should fail-to-Red, not fail-to-Green?

No, matter, it still make the wiring easier.

sigwires

Eagle-eyes will spot the the lights are the wrong way up.  Ah, well, it’s too late now.

Next… build up the control board for one pair of points, and one signal as a test.

 

Model Railway Arduino Point Control – Design

As stated elsewhere, I’ve mothballed the Arduino Dalek Project, and started to cannibalize bits for a new project: Arduino control of the turnout points on an N Gauge model railway layout.

For a start, heres some information about the point motors I’m using: The PECO PL-11 side mounted motors, which attach to the side of the points, like this:

PECO PL-11 (© PECO Publications)
PECO PL-11 (© PECO Publications)

These motors operate on 16v AC and require only (and indeed cannot tolerate more than) momentary current, and are currently controlled from “passing contact switches” drawing power from a Capacitor Discharge Unit.

There are currently 6 turnouts/points, arranged in pairs as below. As it would be reckless (and in real life impossible, due to interlocking) to operate either of the pair independently, I’ve decided to activate them together.

points1Thus, at all times both A and B will either both lead straight ahead, of both lead off to the left (for sets C&D and E&F it will be right not left).

As the Arduino can only throw out 5v DC, each pair of motors will need to be driven via a 5v DPDT replay. But, as we can’t leave the current on without melting the motors, each pair will actually need two relays (one for each direction of change), driven independently from different output pins. Another complication is that the relays will have to energised and then de-energised within a specific time-frame to avoid motor damage, but this is a programming issue to be dealt with later.

PL-11-CDU-Relay WiringThe above diagram shows only the 16vAC side of the wiring. The Arduino 5vDC is shown below.

Arduino-Relay Wiring

Obviously I could have chosen to just use SPDT relays, and connect the outputs together, but due to the vagaries of how the motors work and the orientation and placement of them on the layout, I thought it was safer to design and wire it this way at the outset, rather than back-fix it later when it went wrong. Plus, I had all the wiring in place, so thought I might as well use it.

Note the lack of common Ground between the two halves of the circuit. Grounding AC and DC together isn’t a good idea. Just say no.

Anyway, here is all is again on one convenient image.

Arduino-Relay-PL-11 Wiring
Click to embiggen

So now the next stage to to take that abstract squiggle and build it as a circuit.

Note – for myself, mainly: Each “pair” takes up 2 outputs, so for the three pairs of points we need 6 lines from the Arduino, out of a total of 12 (not 14, as I’d rather not use the 0 and 1 lines (RX & TX) as this could cause issues with data transfers activating the relays – something that the Dalek had problems with at first.

To be continued… with a start on Signalling!

Adventures in N Gauge

It seems a long time ago that I started working on an OO Gauge model railway. Well, true to form I abandoned that idea and moved on. Because of space problems, I switched to N Gauge, which takes up half the space.

I came up with the idea of “Garwick”, a station on a mainly industrial line which still handles passenger traffic. The layout is based mainly on the long-closed Maudlands station in Preston, but with several additions which “just seemed like good ideas at the time”.

The Original Plan - it does not look like this anymore.
The Original Plan – it does not look like this anymore.

The time period is somewhat confused, being set in a fictional era where British Rail never ended, and bus deregulation never happened. Hence old-style DMUs and Ribble buses sit alongside late model Transit vans, Austin taxis, modern cars and a BR Blue liveried Class 66.

Version 2 of the layout. Still not finished
Version 2 of the layout. Still not finished

Garwick is actually two stations. Firstly there is the main station which handles commuter traffic and has a taxi rank and bus stop.

Garwick Bus Stop. A Ribble/Notional Express waits.
Garwick Bus Stop. A Ribble/Notional Express waits.
Garwick Taxi Rank. Some Austin FX/4s wait patiently.
Garwick Taxi Rank. Some Austin FX/4s wait patiently.

This station was originally a two platform station, but one of the platforms was demolished to provide extra siding space for Shocks Mill.  The underpass entrance on the platform now leads to a corridor and storage facilities.

The station sees frequent DMU trains which run to Pill End.

Since the closure of the second platform, the other through line  has been mainly used for freight traffic to the nearby coal depot and bitumen processing plant.

There is also the secondary platform which is generally only used by the single car Class 121 service to the main town station . This was built on part of the former marshalling yard of  Shocks Mill, which still stands above the site but has been converted in to a housing, and the former site of the original No 2 platform.

Unfinished version of Shocks Mill, overlooking some old coal wagons from another layout.
Unfinished version of Shocks Mill, overlooking some old coal wagons from another layout.
Unfinished Garwick Platform 2, with industrial estate behind, and a Class 101 former Express Parcels unit waiting.
Unfinished Garwick Platform 2, with industrial estate behind, and a Class 101 former Express Parcels unit waiting.

To the west, after Farish Lane bridge, the lines split. A single track line runs on to Pill End, and a line runs to the industrial sites at Chain Lane and Caul Road.

66626 hauls Bitumen tanks under Farish Lane bridge as a Ribble Atlantean heads towards Oxford Lane.
66626 hauls Bitumen tanks under Farish Lane bridge as a Ribble Atlantean heads towards Oxford Lane.

To the East, one line runs through the short Victoria tunnel to the City Centre, passing the DMU maintenance depot, while the the main line runs though the double track Albert tunnel to the south to join the main line. Locally, the Albert and Victoria tunnels have been nicknamed “George and Mildred”.

Metcalfe Row and the "Ferret and Dartboard" on the corner of Hatton Street above the tunnels.
Metcalfe Row and the “Ferret and Dartboard” on the corner of Hatton Street above the tunnels.

Obviously there is still a lot for work to do. The who track formation needs re-ballasting, the buildings need tidying up, and a lot of dead space needs to be filled. And that’s even before I start trying to hide the various point motors that are highly visible.