Building an N-gauge model railway – crying out for Arduino control!

I’m really getting into this blogging stuff. I realised that it doesn’t really have to do with our core business, just as long as its fun and I can justify that at least SOME of our customers will find it useful 🙂

Ever since a young age, I’ve been into model railways. I used to have a huge 18 foot by 9 foot OO gauge layout in the attic at my mum and dads house and I spent many hours getting everything looking nice. When I was about 16 I realised that there was a couple of things that were much better fun than model railways – Beer and Girls – so I sold it all.

Now that I am older, the novelty of beers has worn off and the “girls” have turned into just the one girl – my wife. In addition, we have a wee boy who is obsessed with trains and so I started to rekindle my interest in the hobby again.

I decided that the perfect scale to be workable with would be N gauge. Everything is about half the size of OO, so you can fit quite a complex layout in a very small space, say about 6 foot by 4 foot.

My first attempt was a disaster. I tried to make it too complicated. I had what was effectively 6 lanes of tracks, the inner track having a radius so tight that long locos couldn’t travel round it. I knew I wanted DCC (Digital Command and Control) control so that I could control more than one train on the same piece of track independently. I thought I also wanted to use Peco finescale code 55 track, with electrofrog points, for better realism.

But when it came to wiring up the points it was just a pain. What should have been a fun past-time turned into more of a chore. For example, to use a scissor crossover with DCC, I had to fit two microswitches to the turnout bars and at last count I had 22 wires soldered onto that one piece of track so I could swap polarity as the trains passed over.

I know there were many other ways I could have tackled this problem – an auto reverser module, for example, but by this point I had all the track pinned to the boards and I was having to desolder joins to get access to the back of the track. Bad planning.

I decided to rip it all up and start again. This time I was going to admit to myself that I wasn’t building a super realistic detailed model of a real railway – I was just building something that would give me and my Son lots of fun over the coming years.

I settled upon using the Kato Unitrack system. This has track already sitting on a piece of plastic moulded underlay – something that I would have never thought would look in any way good, but the Kato Track is fantastic looking in my opinion and very reasonably priced.

The other bonus of Kato Unitrack is that the points have the motors for electrical control already built in! This means that the KATO scissors crossover has only 2 wires coming out of it, instead of the 22 I had previously with the PECO setup.

I planned a simple layout that would give me three trains running at the same time using AnyRail 5 software – the trial version. With the trial you only get to lay 50 pieces of track, but by designing your layout in a few different sections, you can still make use of it.

Once I had the plan finalised, AnyRail gives you the complete shopping list of parts to buy. To get round my wife, I bought all the track in three smaller purchases, rather than altogether:). I bought all of my KATO parts from Keith Blanchard at because I could speak to him on the phone for advice and everything I needed was in stock at great prices.

So, to the build.. I took some step by step pictures. The build is nowhere yet near complete but I went from an empty attic to something my Son and I can play with and add to within about 3 weeks – not too bad.

photo7Pic 1. First thing was to build a base board. I used CLS for the legs and frame and then used 9mm MDF as the base. Building the frame securely is important to ensure that the baseboard won’t sag over time. I then painted the whole surface of the MDF with Solvent based green paint to protect the MDF from any water ingress from Paper mache etc at later stages – since MDF is fibre board it will swell up if wet. I put castors on each leg – doesn’t help with stability but makes it a dream to slide the baseboard around the attic so I can get access where the roof slopes. The baseboard is 1metre x 2.4metres.

photo77Pic 2. Using the Woodland Scenics range of terrain forming equipment, I placed risers where I had planned for track inclines.

photo777Pic 3. 9mm MDF pinned around back and edges of board. Starting to plan for a tunnel in the back quarter. Note that there are cutouts in the MDF so you can get your hand in to pull a derailed train out!

photo5555Pic 4. Using newspaper wads, dry but secured with tape, we bulked up the open spaces at the edge of the incline risers. Also, using polystyrene sheets, we created the retaining walls at the edge of the hill, where the mainline was going.

photo666Pic 5. This is the bit my son likes. Using rolls of wet plaster cloth, cover everything to creat a hard shell of terrain.

photo55Pic 7. Placing the main track loops into location, so we can start working on the tunnel

photo33Pic 8. Paper Wads on main Hill and tunnel

photo555Pic 9. Main hill plastered

photo11Pic 10. Branch line and bridge installed and track functionality “tested” 🙂

photo6Pic 11. Using Woodland Scenics Liquid Pigments and Scatter materials, we started to build the base colours on the hills sections of the branch line, to see how things would look.

photo5Pic 12. Started to add clump foliage to the hill section. White drips are just the PVA glue which dries clear.

photoPic 13. Overview of back section with clump foliage, home-made trees and scatter material. Back board also painted blue to provide a good separator from scenery to sky.

photo1Pic 14. View back along girder bridge, showing scissors crossover.

photo3Pic 15. One piece of track actually complete. This is how it should all look. I reckon the trees that my wife made by hand look awesome!

And that is as far as we have got, so far. The woodland scenic materials are great. As you scatter the grass on and add more and more detail it suddenly goes from looking terrible to looking real!.

This layout is crying out for an Arduino control system. Having all the locos and points DCC controlled means that every item has its own address that can receive commands. Roy, our tech guru has already built a wireless DCC controller for the system. The next stage is to program a few Arduino UNOs, so that myself and my son can sit back and watch the points switch and the trains starting and stopping at the station by magic. If I can get Roy to stop playing with his Raspberry Pi for long enough to get the code written!



About protopicelectronics

Lots of schools / colleges but mainly self taught in the art of embedded electronics.
Image | This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Building an N-gauge model railway – crying out for Arduino control!

  1. Al says:

    I have modified Peco n-gauge level crossing barriers to be driven by servomotors, controlled by an Arduino, triggered by a signal from the DCC accessory controller. Also made a box for 3 types of two-tone horn sounds, operated by reed switches, done via a Mini-Pro.

    • Hi Alisdair
      Sounds real nice. I think my problem is – when I work with it all day, I just want to play when I get home! So although it would be awesome to automate it all and the guys here cant believe I haven’t done it already, I just cant seem to motivate myself to get started. Sometimes its nice just to scatter the grass on and stick a sheep on and keep it simple. 🙂 I know that given a couple of years I will get Roy to do it for me- that’s the perfect solution, Arduino Control without me getting me hands dirty! 🙂

  2. Over the years I’ve bought a number of Graham Farish, Minitrix and, now, Dapol locos and rolling stock as well as a few kits and now have around 20 locos plus associated rolling stock. I’ve also got several buildings, none of which have ever been finished though I did get close a couple of times. Plus I’ve managed to pick up all the usual scenic extras.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s