Sunday, 10 November 2024

N Gauge Model Railway - Episode 4 - All aboard for Upper Carrom

Tony's Model Railway

Documenting my journey into model railways.

It's high time that this layout got a name and it seems appropriate to call it Upper Carrom as it is quite literally above the Carrom Table.

Of course it wouldn't be a real railway station if it didn't have a railway station sign.  There are plenty of places you can download but I wanted to model one myself and the technique I used to make my badges and the famous Okey Dokey sign is a great fit for what is a very simple design. 

Use The GIMP

I have been a GIMP user for many years ever since Photoshop 5 and it is an awesome free alternative.  Yes it has it's quirks but once you get used to them it's pretty much plain sailing and has everything I need in a bitmap image manipulator / Photo editor.

On a transparent layer floating above the white background layer, I added the station name using the text tool making sure that this was 100% black.

The basic name plaque lozenge shape is easy to create using the circle and rectangular select tools to create shapes on seperate layers filled with 100% opacity black.  These were then merged together to create a single "half" which could be duplicated and flipped and then merged to create the whole lozenge.

The middle lozenge was just a repeat of the steps above.  Do not merge the full width lozenges together at this stage.  You shouls have 4 layers (from top down) Text, text lozenge, middle lozenge and finally the white background.  Hide the text layer temporarily.

For each of the lozenges, select the black area and use the select > shrink command to reduce the selection to an appropriate size then fill this with white.  Merge Down the sign lozenge onto the middle lozenge to create a single lozenge layer 

Unhide the text layer.  You should now have a black and white railway sign.  Export this for Tinkercad as a png no larger than 1000px wide.

Finally select in the lozenge layer select everything outside the lozenge using the fuzzy select tool, invert the selection and create a new layer above the white background fill this with black.  Turn off the layers above and export to png.

In Convertio

Convertio.co is a fantastic free web based converter tool.  Just upload the two png files and convert these to SVG.

In Tinkercad

Import each of SVG files you have just created as "Art".  Modify the height of the text layer so that the text and the border of the sign protrude protrudes out of the background.

Upper Carrom Sign in Tinkercad

Export your model as an STL for 3D Printing.  Import this into your slicer (it will be big) and scale to your needs. 

Upper Carrom 3D Printed Railway Station Sign

Obligatory Running Video

The first running of the newest addition to the ready-to-run rolling stock collection, a cheap aliexpress Canadian Government grain wagon... it's on loan okay. 


Saturday, 9 November 2024

N Gauge Model Railway - Episode 3 - Loops, Points and Elevation

Tony's Model Railway

Documenting my journey into model railways.

As I mentioned in the first episode of this series, my wishlist includes 3 loops of track which requires a significant number of points if one is to return a train to any one of the loops.

The largest radius I can realistically run on this board without the whole layout  turning into a helix is going to be 12".  I printed out some tracksetta style gauges to help me lay the random collection of secondhand flexitrack.  I also made a rudimentary  curve compass out of a strip of hardboard to help scribe the radii on the baseboard and also to cut sections of track bed which will be elevated.

Scribing Radii with a makeshift compass

Where we're going we don't need... plans

I am not following any plan with this layout.  It's a case of design on the fly based on what track I can scrounge together.  In fact the layout has changed and will continue to change based on the age old philosophy of do I really need 11 sets of points!!

At this very moment the plan looks something like this:

The Track Plan as far as we know it

Notice the addition of the first scenic items in the form of the viaduct fascias.  All will b e revealed in the fullness of time or when the 3D Printer has finished printing them off.

3 Continuous Running Loops

What is the point of a coffee table layout if it doesn't have continuous running.  My 3 Loops are loosely defined as follows:

Loop 1 (Purple) - A 9" radius (1st radius?) with the smallest points I have turning this into an oval.  I could really do with replacing these points for a matched pair of 1st radius curved points so that I can properly form the fiddle yard.  At the moment I am not confident that the southern tank engine can make a tighter radius curve.  Fingers crossed I can get the little black shunter working as it has a set of tiny little wheels in an 0-6-0 configuration.  Being a diecast body it's got some weight to it unlike the Southern which is made of plastic. 

Loop 2 (Green) - A mix of radii from 10" to 12" and traverses the entire layout from the staging area at the bottom up the left side and into a tunnel which runs underneath the viaduct and then emerges on the right side of the layout.  This is essentially a branch line and will be running a mix of small 4 wheel coaches (when I buy or make them) and goods wagons.  This will be the preserve of the Southern Tank Engine unless something better comes along.

Loop 3 (Yellow) - The largest loop (but not by much) and is a squared off 12" radius circle.  It takes you all around the layout rising on the left to the viaduct and falling back down on the right to rejoin the staging area bottom left (blue).  I have tested the gradient with the only working loco I have and it can pull a full rake of 6 wagons weighed down with nuts and bolts.  This will be the main line and hopefully I will be able to run larger coaches and goods wagons with articulated bogies.

Power to the People

With all this going on and the potential of having 3 simultaneous running loops and accessories, I am going to need to get some more controllers and isolate each loop with those isolating fish plates all the cool kids use.  This of course is going to be a whole other ball game, but I am going to stay DC rather than go DCC as I just can't justify the complexity at this stage.  However, there is nothing to say I won't change my mind further down the line.

Talking about Tracks but specifically making a point about Points

There are a lot of joblot auctions on eBay for collections of track and it is somewhat daunting to a beginner to try to find exactly what you want to fit in a given space.  Flexitrack is your friend as you can essentially lay track from point to point.  Track is so goddam expensive and I'm trying to keep the cost to a minimum, I'm not a Rothschild you know (only when I'm Bunty), so I buy what looks right, even if in the end it might not be.  False economy I know.  Especially when you don't know that PIKO track is a completely different connection standard to PECO... fortunately this only cost me £10 to learn.

However, when we get down to the tight transitions between the curves I think I might need to bite the bullet and buy specific radii turnouts.  Wouldn't it be awesome if each manufacturer published a set of photocopiable templates of their set track and turnouts so you could literally try before you buy.  If you know of any please do pop a comment in the section below.

Points Theory

Finally, there is some points theory to consider (which I am also slowly learning) behind designing a three loop continuous running layout.  I will cover this in a future episode as it is driving me insane trying to visualise what I need to buy compared to what I want for the layout and my available space.

Obligatory Running Video


Saturday, 2 November 2024

N Gauge Model Railway - Episode 2 - MDF uh huh uh huh!!

Tony's Model Railway

Documenting my journey into model railways.

If you read episode 1 of my carrom table layout build then you will have heard me rant about how the "big box" DIY stores in the UK have fully transformed into soft furnishings stores.  

What you probably don't realise is the markup is significant.  Two pieces of 12mm MDF required to make just my baseboard would have cost in excess of £32 leaving me to buy extra wood for the side panels.  However, a whole sheet of MDF custom cut to my requirements by an oldfashioned builders merchant was £40 and left me with so much extra from the full sheet that I have MDF coming out of my ears. 

Building my N Gauge Layout Baseboard

With all my wood precut to approximately the right size it was a fairly easy task to trim the panels to final size and screw together.  The whole structure sits neatly on top of the carrom table and can be lifted off in case carrom needs to be played.  The carrom tabletop is hinged to allow access to the storage bin below and this can still be operated with the layout sitting on top although any loose items like rolling stock will need to be removed first.

N Gauge Layout - baseboard and sides constructed

What did the Romans ever do for us... The Viaduct

This week also saw the addition of the first scenic item to the layout in the form of a viaduct.  I purchased the single track viaduct model by Crafty 3D from Cults3D  and threw it on the printer.  

Whilst this is a scenic item, adding this to the layout early on is crucial as it dictates the height of the elevated Loop 3.  Working out the exact gradient of the incline from base to viaduct is going to be a process of trail and error, but I would like a train to be able to pass from Loop 1 to Loop 2 and ultimately to Loop 3 and back again.

I will not be printing these viaducts en masse as my viaduct is also a front for the Loop 2 tunnel.  I don't fancy carving a hole through 8 or 9 of these bad boys, to say nothing of the wasteful use of resin in printing something just to cut it out.  The future is here, there is a better way...

N Gauge Layout - 3D Printed Viaduct

My solution is to make these into removable fascias, allowing me to extricate any trains which may have derailed inside.  The plan is to print out a series of these fronts which can be linked together to form a long fascia.  The fascia will be magnetized to stick to a solid shelf which will carry the Loop 2 track and allow wide access for said emergency train extraction.

This is a fairly trivial task to open the STL in Meshmixer and use a plane cut to remove all the unwanted model leaving you with just a thin fascia.  Taking this approach is doubly advantageous as it also allows me to spread these fascias around a curve.

Small Businesses

The viaduct model also comes with a selection of arch inserts ranging from shop fronts to a warehouse.  These will of course be magnetised to allow for easy swapability and add a bit of variety to the layout.  

The exact nature of these businesses remains to be seen and will be covered in a future episode.

Obligatory Running Trains Video

To ensure that I keep up the momentum it is important for me to keep a section of the layout in running order.  The layout is in my front room and so it is everpresent and what good is a model railway if you can't play with it.


Sunday, 27 October 2024

N Gauge Model Railway - Carrom Table Layout - Episode 1

Tony's Model Railway

Documenting my journey into model railways.

Coffe Table Layout (or should I say Carrom Table)

Those who know me in meatspace are aware of my passion for Carrom, the tabletop shuffleboard game played in most parts of the indian subcontinent.  I purchased a table a few years ago and converted into a coffee table.

This is the perfect base for my N gauge Layout and measures 32" square to the outside edge.

Starting with a Starter Set

I was lucky to snipe a Graham Farish 370-025 Tank Loco Starter Set from ebay for less than £80.  This was an absolute bargain and in great condition.  The set includes 8 pieces of settrack scribing a circle with the smallest 9" radius curve.

268 Southern 0-6-0Tank Loco (Graham Farish)

Also in the set came a 0-6-0 Southern Tank loco, 2 wagons and a brake van.  The loco will definitely be getting a paint treatment as it looks really quite plasticky and I think with the application of some black panels and some pin striping it will look much less like a toy.

I did also have a small collection of 3 wagons and a Minitrix 2f 0-6-0 Dock Tank Locomotive 47160 which I found in a charity shop for £3.  I hope to get that loco working again as I seem to have blown it up!!.

Building a Box

All the best layouts are enclosed with beautifully painted backdrops and so I designed my enclosure to be tall on 3 sides with a lower front section enabling easy access to rail locos and rolling stock and to get unfettered views of the layout.   

Carrom Table Model Railway Layout Enclosure

The sides also pull double duty creating a well so that the layout can be removed easily when that all important game of Carrom needs playing.  My design should allow for everything trainset related to move with the layout and also provide easy access to the underside of the layout where the wiring channels will be.

I tried to get some MDF for this project from my local B&Q and Homebase stores.  However, they seem to have stopped selling DIY materials in real world sizes and now appear to only sell Christmas decorations and pillows.  The struggle is real people.

I need the following boards:

  • 1 x 32"x 32" (813mm x 813mm) 
  • 3 x 33" x at least 6" (813mm x 153mm)
  • 1 x 33" x at least 3"(813mm x 76.5mm)

I am designing much of this layout using my go-to 3d modelling software sketchup free and hope that this will be of great assistance when planning out the placement of tracks.

Layout Wishlist

32" square is not exactly a huge space, but I would like to try to get

  • 1 x central small 9" radius loop with some internal shunting space
  • 1 x middle larger 12" radius mainline loop which perhaps goes into a tunnel at the rear of the layout.
  • 1 x outer elevated loop which climbs on the left drops down on the right and reconnects with the mainline at the front of the layout.

The elevated loop ios going to be most challenging as there will need to be a removable section so that any loco's going through the tunnel can be retrieved if they derail.

Carrom Table Layout Running Video


 

Saturday, 26 October 2024

Mega City Block Upgrade - Arduino Nano MAX7219 Display

A while ago I built a Mega City One Miniature Cary Case for my Judge Dredd miniatures and it was always my intention to have some sort of digital display which I could display random "in game" messages and to send instructions to the players such as ROLL FOR INITIATIVE.

The Components

Arduino Uno / Arduino Nano

I'd been itching to mess around with an Arduino microcontroller for years but never had the courage to just dive in.  However, there are so many people on ebay and Aliexpress selling ridiculously cheap arduino kits that there really is no barrier to entry. 

I plumped for an Arduino Uno Rev 3 Starter Kit which included a breadboard, jumpers and a whole pack of additional resistors and what nots.

The goal here is to make a small form factor self contained device so migrating from the large Uno dev board is essential.  I ordered a random Nano board from Aliexpress before realising that they come in 3 varieties with different board to PC connectors.  the cheap one I had picked came with an old style mini USB B connector and no lead.  Fortunately I had an lead from an old digital camera to use in the meantime, but I quickly ordered a bunch of nanos with USB C connectors for this and other projects I have in mind.  

MAX7219 8x32 Dot Matrix Display

The perfect lo-fi display for this project is a MAX7219 LED 8x32 dot matrix display.  It's small enough to work as a standalone unit and can take its power from the Arduino itself.  I bought one from AliExpress for only a couple of pounds. 

Wiring the MAX7219

I grabbed a bunch of dupont wires (these are the handy dandy push pin connectors which you get in your arduino kit.  I chopped one end off each wire and soldered them to the MAX7219 pins:

  • VCC - Purple - 5v
  • GND - White - GND
  • DIN - Black - Digital Pin 11
  • CS - Blue - Digital Pin 10
  • CLK - Grey - Digital Pin 13

Wiring the Button

The button is wired into:

  • VCC - Red - 5v
  • OUT - Orange - Digital Pin 7
  • GND - Yellow - GND

Entering the The Matrix Code

A bit of googling discovered the perfect code in the form of MAX7219 Message Selector on the Arduino Forums by user groundFungus.  Some tweaking later and I had a bunch of messages which I could toggle through with the addition of a button push on PIN7

// Program to demonstrate the MD_Parola library
// button select canned messages
// MD_MAX72XX library can be found at https://github.com/MajicDesigns/MD_MAX72XX
// by groundFungus AKA c. goulding

#include 
#include 
#include 

const byte  buttonPin = 7;    // the pin that the pushbutton is attached to

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 4

// Scrolling parameters
#define SPACE_IN      A5
#define DIRECTION_SET 8 // change the effect
#define INVERT_SET    9 // change the invert

#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10

MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);

// individual messages in strings
const char msg_1[] = "<< WEATHER ALERT>> RAIN IN 10 MIN <> SECTOR 237 RIOT IN PROGRESS <> HOTTIE DAWGS ARE GOOD TO EAT <> BE GOOD CITIZENS LITTERING IS A CRIME>>  ";
const char msg_2[] = "<> ROLL FOR INITIATIVE>>";
const char msg_3[] = "<> GET UGLY GET OTTO SUMPS OIL OF UGLY TODAY!! >>";
const char msg_4[] = "<> HEAVY TRAFFIC ON THE BIG MEG CHOOSE ALTERNATE ROUTES >>";
const char msg_5[] = "<> THIS AREA IS IN LOCKDOWN >>";
const char msg_6[] = "<> CLEAN UP CREWS IN TRANSIT >>";

// an array of pointers to the strings
char *messages[] = {msg_1, msg_2, msg_3, msg_4, msg_5, msg_6};
byte messageNum = sizeof(messages) / sizeof(messages[0]);

int buttonPushCounter = 0;   // counter for the number of button presses
int buttonState = 0;         // current state of the button
int lastButtonState = 0;     // previous state of the button

void setup(void)
{
   Serial.begin(115200);
   Serial.println("\nParola pick a message program\n");
   P.begin();
   pinMode(buttonPin, INPUT_PULLUP);
}

void loop(void)
{
   if (P.displayAnimate())  // time to show next frame?
   {
      P.displayText(messages[buttonPushCounter], PA_CENTER, 50, 3000, PA_SCROLL_LEFT, PA_SCROLL_UP);
   }
   checkButton();
}

void checkButton()
{

   static unsigned long timer = 0;
   unsigned long interval = 25;
   if (millis() - timer >= interval)
   {
      timer = millis();
      buttonState = digitalRead(buttonPin);
      // compare the buttonState to its previous state
      if (buttonState != lastButtonState)
      {
         if (buttonState == LOW)
         {
            // if the current state is LOW then the button
            // went from off to on:
            buttonPushCounter++;  // add one to counter
            // if counter over number of messages, reset the counter to message 0
            if (buttonPushCounter >= messageNum)
            {
               buttonPushCounter = 0;
            }
            //Serial.println(buttonPushCounter);
         }
      }
      lastButtonState = buttonState;
   }
}

Debugging the Code

Unfortunately this particular code only reads the button state at the end of each scroll.  This is where an interrupt is going to be necessary.  The arduino Uno and Nano boards that I have access to are only enabled for interrupts on digital pin 2s and 3 and will necessitate a bit of a rethink in the code 

MAX7219 Case - Thingiverse: Thing 6809712

No one wants to live in a run down cyberpunk world with exposed wires everywhere, so I needed a case for the display with enough depth to house the nano and the button which would switch modes.

I found a simple MAX7219 8x32 case on Thingiverse which I could easily embed magnets into to affix to the top or side of my Mega City Block Storage Case.  Sadly this did not fit my particular MAX7219 board as the pins came out sideways.  

This was easily fixed with a bit of modelling in Sketchup and if you need a case and have side exit pins feel free to download this from Thingiverse using the link above.