Saturday, July 25, 2020

Building a Test Track




When I set up my modeling shop in it's own room I gained more than real estate.  The shop is 8' down the hall from the train room and I now have some space for serious hobby time.  One of the first things I did was put in a corner desk/work bench and hung some 4' LED dual tube lamps for better lighting.  I decided I needed a test track for checking out new locomotives or ones that had been converted to RF/battery control with sound.  I also needed a programming track.  At first I was just going to have a straight length of track but I figured it'd be a good idea to include curves and turnouts that are the same as what would be used on the main layout.  Somewhere along the line I read about shunting puzzles and decided it would be fun to have a switching game.


My test track now runs on a 9" wide shelf above the workbench.  The "layout" is all one level, completely flat, and I used 1/2" Homasote over 1/2" plywood (same as the main layout) hung on the wall with adjustable shelf brackets.  Since it's in a corner of the room one side is 7' long and incorporates a shunting puzzle called an Inglenook with three sidings and three #5 turnouts.  I ran track from the first and third siding back around the corner which gives me 21" and 18" curves, same as what's used on the main layout.  Down the other wall is a 9" x 7.5' shelf with a close copy of John Allen's Time Saver puzzle.  This incorporates two #5 turnouts and three wye's, also used on the main layout.  On the outside curve of the test track, 21" radius in the corner, I insulated both ends where they meet turnouts and this gives me about 7' of track that can be isolated from everything else for programming.  I can also put power on this section for running locos that haven't been converted to RF/battery control yet.

A real advantage of my test track is that I can develop skills here first before trying something on the main layout.  I'm hand laying all my track and have never done this before so I can work out the bugs in my techniques on the test track.  If I have to tear out something because I did an awful job it won't really hurt anything.  All the track and turnouts used here and on the main layout are hand laid code 70 with wood ties from Mt Albert.  I'm using the test track to develop stain for the ties and a "rusty look" for the rails.  The stain is a mix of India Ink and earth tone colors of Acrylic paint mixed with water.  I soak the ties in the stain for 24 hours and dry them overnight to get a nice weathered grey look.  The ties are all hand sanded beforehand to knock down any sharp edges and give them a worn look.  I tried cutting in grain by dragging an Exacto saw blade across the surface but this is tedious work and in the end wasn't worth the effort.  At least to me.


The turnouts are all made using Fast Tracks assembly fixtures which are well worth the expense for this many turnouts.  All my locomotives will be radio controlled with battery power (RFBP) so there won't be any need for power on the track.  Wiring is greatly reduced and turnouts don't require powered switches for polarity changes.  Simple.  All my turnouts will be switched manually using un-powered two position slide switches ($1.50) which give a positive lock in each direction.  The switches (see photo below) are operated using control rods made for RC planes ($9.50/pair, averaging 10 turnouts each) to control wing flaps and landing gear.  The control rods will be operated with cheap wooden drawer pulls ($.95) mounted along the layout facia.  Total cost for each turnout control is less than $4.  I've seen powered switch machines that cost $10, $20 or more and then you have to add in the cost of control buttons, wiring, LEDs, etc.  It can get pretty pricey.


In the picture above you can see the slide switch on the left.  I removed the wire connections to get it to sit flat on the wood block.The switch knob is drilled out for an 0-80 screw and nut that hold the clevis.  Just below the clevis is another hole (0.032") for the piano wire that runs up through the fulcrum to the turnout's throwbar.  The fulcrum is embedded in the plywood behind the wood block.  The red and yellow tubing is the Golden Rod control rod used for controlling flaps and wheels on an RC airplane.  The red sleeve extends halfway into the wood block and is held in place with a #6 screw.The yellow rod is connected to the clevis and the wood knob with 2-56 threaded rod.

As I mentioned before, the un-powered electric switch gives a positive lock at each end of the throw and the turnout is held snugly in position.  Once everything was assembled it took only a minor adjustment of the turnout points to get perfect switching with just a push/pull of the knob.  Cool!


The picture above shows the control knobs in position waiting for the facia panel to be installed.  Should have a pretty clean look when it's all done.  Best of all, this set-up represents simplicity to the max.  The knobs are directly in line with the turnouts so there's no question about what goes where and no diagram is needed.  No power required.  Nuff said there.  Some day I might come back and tie in the ground throws so the flags move when the turnout is thrown.  I started working on it bit it got too complicated and I'm kinda anxious to get some trains running.  Good project for later.  Much later.


Tuesday, July 21, 2020

New Digs for the Shop Part 2

In my previous post I mentioned how poor the lighting in this room was.  I added several strings of LEDs behind the track facia but this didn't really give me what I needed.  For a while I used a stand with five 75w lamps but this created severe shadows and really heated up the room.  I finally bit the bullet and hung two 4' dual tube LED fixtures.  These are similar to fluorescent lights but they'll last almost forever and they run soooooo much cooler than the incandescent lights I had been using.  I went with 3200 K color temperature to give a more natural light.  This is what I'll be using for the layout too.  With the same lighting in both rooms I won't have any surprises when I build and paint a model and then move it into the other room.


Another improvement was the addition of a 3D printing station.  I now have two printers, an Ender3 filament type and a Photon Anycubic resin printer.  The printing station is a roll-around serving cart which gives me storage for tools and supplies.  It has a stainless steel counter top which should hold up to the caustic resin of the Photon printer.  It also has room for a small ultra-sonic cleaner for cleaning the parts made on the Photon.  For curing those parts I built a 12" x 12" x 12" box with an infra-red lamp and a small turntable with a solar panel to give it power when the lamp is on. 
 

This room is only 11' x 12' but it has a walk-in closet.  It's still comfortable but at this point has a lot of tools and supplies in it, most of what I need for my hobby.  I still have a wood shop out in the garage but that's for big stuff and it gets pretty toasty.  I spend most of my time in here now.



Wednesday, May 6, 2020

Building a Diesel Shay Pt 2


In Pt 1 I said something about looking for an HO Bachmann Shay on eBay.  I did look but in the end decided on an On30 Bachmann Shay.  The more I looked at the HO version the more I thought the wheels looked too small.  Nuff said.  I found a really great deal for a dismantled On30 Shay that had metal gears from Northwest Short Line.  It also had bags of spares and a wood cab kit.  Most importantly.....it ran.  As soon as I got it I dismantled the cylinders and boxed in the driveshaft to resemble a transfer case.  It looked pretty good and ran great.  I showed it to some friends and one of them said "cool idea but I really like the look of all that stuff moving around".  Hmm.  He was right.

 

I was almost ready for paint when I decided to dismantle the whole thing and make it chain drive.  That'll give it some moving parts.  I spent hours on TinkerCAD designing a chain drive.  It got complicated really quickly.  On the On30 Shay the DC motor is mounted vertically with half of it and the gear box hanging below the chassis.  This didn't leave any room for the chain drive so I had to change the motor position.  With the motor laying horizontally I had more room underneath but I lost a lot of room inside the hoods where all the other components go.  I had to completely reorganize everything and this is where a CAD program comes in really handy.  I drew up the chassis with the chain drive hanging underneath and positioned the motor above it.  I made boxes with dimensions matching speakers, the sound board, the RF receiver and the batteries.  I used transparent boxes to show me the internal dimensions of the hoods and cab.  I was able to choose the best speaker based on size and specs.  In fact, in the end I had enough room for two speakers which should give more appropriate sound for the two Caterpillar engines.  I also found batteries that would work better size-wise than my original choice.


So, once again, my project has snowballed.  I think the chain drive will work well and if not I can always go back to the cheesy little transfer case idea.  Learning to use TinkerCAD for finding room for everything was a big deal and if I ever go down this rabbit hole again I'll be sure to use it to help make my choices for components.  As for now I'm  waiting for parts to be delivered.  More later.


Turntable Pt 5 - Arduino Sketch

This is an article I wrote for a book, "Arduino Intermediate Model Railroad Projects" by Paul and David Bradt.  The book is available at Amazon (click here) or from the link on this blogs main page.  The article provides a line-by-line copy of the sketch for operating a turntable using Arduino plus a complete description of how it works with suggestions of changes you could make to personalize it.  In order to copy the sketch you'll have to remove the line numbers before copying over to Arduino.  Hopefully before too long I'll figure out how to include the original file here.

7.3 Turn Table Project
By: Tom Ward




Description:

The Arduino sketch for this turntable project is a perfect example of how anyone can come up with an idea and get the help they need to build the code to make it happen.  This is what is so cool about Arduino.  It's fairly simple to understand and if the developer has trouble with a new concept there are always generous people available on the internet to guide you towards a solution.  The authors and contributors of this book have tried to capture some of the challenges and ways to work around them too.

This project started with a concept and an idea of how the turntable should operate.  The creator had never used any of the components (keypad, display, stepper motor, thumbstick) but realized there had to be a way to get everything working together.  Searching the internet for sketches that used some of the key components found one sketch that used the keypad, LCD display and a stepper motor to operate a miter box for making precision cuts.

There was enough information on this website (https://www.brainy-bits.com) to learn how to program these different components.  There was some difficulty making the change from linear to circular motion for this project.  The Yahoo group called "Arduino for Model Railroad" provided the help needed for that conversion.  The website is:  (https://groups.yahoo.com/neo/groups/Arduini/info).

Two people, Dave Instone and David Harris, were instrumental in making the sketch come together but the whole group chimed in with thoughts and ideas.  The online discussion continued for about two months developing this sketch and it's something that can be used by anyone looking for an easy and complete way to automate their own turntable.  The following paragraphs cover the hardware and then the operation of the sketch.


For more information on this project please visit this website:


https://slimgauge.blogspot.com/p/for-actual-operation-of-turntable-i.html


Materials:

The material needed for this turntable control system is:

Arduino Mega 2560
SparkFun EasyDriver
Nokia 5110 LCD
4x4 matrix keypad
400 step NEMA 17 stepper motor
"thumbstick" style joystick
IR Break Beam detector
2 switches
Some LEDs.

The developer may be able to use an Arduino Uno but there are a large number of connections for this sketch.

Other components could be changed out but would require modifying the sketch.

A 200 step stepper motor can be substituted but the sketch would need to be modified and, more importantly, the operation wouldn't be as silky smooth.

Total cost of this control system, including the stepper motor, came to about $85.

Power Requirements:

The Mega and the EasyDriver both run on 5VDC and the stepper motor runs on 12VDC through the EasyDriver.  The Mega provides power for the Keypad and the LCD display.  "Wall-wart" style power supplies rated at 5VDC/1 amp and 12VDC/3 amp were used for this porject.  There are quite a few connections to make but most of them are straightforward and all of them are listed in the beginning of the sketch (lines 9 - 37).  "Comments" included in the sketch should provide enough information for most applications.

Challenges:

There are a couple of important things to note about the SparkFun EasyDriver.  First, it can be programmed to run in different step modes, including full step, 1/2 step, 1/4 step and 1/8 step.  This means that every full step gets broken down into multiple steps for smoother operation.  In this project 1/8 step mode is used in the sketch but there are instances when that changes.  Another benefit of using the EasyDriver is that it uses "AccelStepper" which is a software library for stepper motors.  More on that later.

The 4x4 matrix keypad connections (lines 61 - 69) were a big challenge but understanding the pin out arrangement makes it easier to decipher.  Making the physical connections and watching the LCD display made it easier too.  The keypad has eight pins; four columns across the bottom and four rows down the side.  Each button is assigned a column and row by its location on the keypad.  Not all the keypads are pinned out the same because of differences in the way the traces are run on the board.  Making a drawing of the keypad and the ribbon cable connector and then drawing lines to each column and row helps to understand how the pins are numbered and connected.  The developer found out that it was just the opposite of what he thought it should be .  The pin numbering was upside down and backwards and he corrected the problem by changing the connections at the Mega while watching the display.  Some really inexpensive ($1.50) keypads have a removable paper covering which when removed allows the actual traces to be seen.

The Nokia LCD display is interesting.  It was originally used in an older style cell phone.  The display is 84 x 48 which gives enough room to show multiple lines of information.  There is a lot of information about these on the internet. This site proved to be the most useful:  (https://www.youtube.com/watch?v=FqJYb7wYAi8).

The "Brainy Bits" website (https://www.brainy-bits.com) is full of useful information with excellent explanations for the parts used in this controller.  If a different display is used then a unique one can be designed by using Photoshop and then transfer it to an app called "LCD Assistant" that will do all the work to convert the image to the new LCD display.  On this project things were kept simple and an existing display was modified and is shown in the code in lines 348 - 366.

Calculations:

1)  The stepper motor uses 400 steps to make a full rotation.  It has a 20 tooth M2 pulley mounted to the motor shaft.  This is for a metric belt that has one tooth every 2mm.  The belt connects to a 60 tooth M2 pulley mounted on the turntable shaft.  This provides a gear reduction of 3:1.  One full turn of the turntable requires 1200 steps.  In 1/8 step mode it requires 9600 steps.  This gives very smooth operation.

2)  Knowing that there are 1200 full steps in one rotation, the distance between each step can be calculated which helps when setting up the tracks around the turntable pit.  The developer’s turntable pit is 14.5" in diameter.  Multiply that times pi (3.14) to get the circumference, 45.53".  Now divide that by 1200 to get 0.038" and this is the distance between each full step at the wall of the pit. Then calculate the minimum distance between tracks and how many full steps are needed to go from one track to the next.  This is very important data to know.  The developer’s layout is in On30 scale so he needed a minimum of 1.1" between track centers to clear the ends of the ties.  This allowed for up to 41 tracks around the pit although he only needed 16 tracks for his layout.

Operation:

When power is first applied to the turntable controls, the sketch is initiated and the stepper begins homing CCW in full step mode.  An Infra-Red Beam Break detector was installed under the turntable platform.  As the turntable bridge rotates it also rotates a small metal flag attached to the shaft beneath the layout.  When the flag interrupts the IR beam it sends a signal to the Mega board which stops the stepper, sets that point as zero and turns on an LED to show it's been set.  Everything the stepper does from that point on is referenced to that location.  In this example there are 16 tracks around the turntable pit and each track is a certain number of steps from the zero point.  They're listed in full steps in the program and that's how the stepper knows where to find a specific track.  The operator can punch in a "2" on the keypad, hit the # key to enter it and the bridge/stepper knows to turn 90 steps to get to that track.  If the operator enters 15 it'll go 975 steps.  That's full steps though.  The program knows that after the zero point is established it needs to multiply everything by 8 so that 975 steps now becomes 7800.  That's how it operates so smoothly.  The EasyDriver also uses code that automatically starts and ends every motion by slowly ramping up speed at the beginning and then ramping down to a stop.  This creates a very realistic motion for the bridge whether it's based on an "Armstrong" (manual) or motor driven turntable.

Prototype turntables were used to position locomotives, to turn them so they'd be headed in the right direction for whatever job they had next.  Sometimes an engine would come onto the turntable so it could be swung around 180 degrees and head right back out.  To simulate this the operator enters the track number on the keypad and then enters "A" and the program knows to add 600 full steps or 4800 1/8 steps to the track value.  If an engine comes onto the turntable bridge at track #15 the operator enters 15A on the keypad and the engine will be turned 180 degrees.  It can then go back out track #15 headed in the opposite direction.

One key lesson learned is that it’s important to know one end of the bridge from the other.  Prototype motorized bridges might have an operators shack at one end.  The armstrong bridge has a wooden pushbar at each end and the developer painted the tip of one of these white for easy identification.  A cool provision in the program is for automatically deciding which direction to turn. If the engine enters the bridge at track #2 and it is desired to exit at track #15 the program automatically decides if it should turn CW or CCW for the shortest distance to get there.  If it has to turn CCW past the Zero location it will keep track in negative steps of how far past it went.

The LCD screen is set up to display current track #, next track # and it also displays "mvng" (moving) when the bridge is in motion.  There is also a part of the program set up for an emergency stop which would be initiated by hitting a switch on the control panel.  There's an LED for display of the emergency stop condition.

By entering "C" on the keypad it enters thumbstick mode.  The display changes to give a constant step readout and depending on how far the thumbstick is pushed the speed will ramp up through four different speeds.  Operation is in full step mode.  The developer set it up this way because the thumbstick would only be used to help add a new track location. Step the bridge to where the new track is located and the display will give the full step number needed to be added to the program.  This thumbstick may not be used often but it is available if needed. Enter "D" to return to normal sketch operation.

In the sketch the operator can enter the location of the tracks by modifying the full step numbers in the "long steps[NUMTRACKS] =" command on line 86.  Note that they start with 0 so there are 16 locations for this example, 0 - 15.  This can be changed on line 85 by modifying the number of tracks needed.  Other easy changes are speed and acceleration of the stepper motor on lines 125 and 126 as well as several other areas of the sketch.  Adjust the backlight brightness of the LCD on line 95.

This sketch is fairly complex with over 500 lines of code but it is "commented" throughout and fairly easy to understand.  It's laid out in "void" control sections.  Void Loop accesses these when needed to perform different functions:

"void start TT" (lines 270 - 286) is all about moving the turntable and updating the display.

"void setMicrosteps" (lines 291 - 343) is for selecting step mode and calculating position.

"void drawnokiascreen" (lines 348 - 366) is for updating the display.  The second one, "void drawnokiascreen2" is for the display while in "thumbstick" mode.

"void Joystick" (lines 428 - 507) is the control of the thumbstick.  Changes here are for sensitivity of the speed control in the "switch" function by adjusting the length of the "case" numbers.  The full range is 0 to 512 and it is currently set up for four speeds.  This section of the sketch was eliminated for the printed version of this book.  The full sketch can be downloaded here ().

There is a section (lines 392 - 425) titled "shortest path".  This is the code that decides what direction to drive the bridge to get to it's next location in the shortest number of steps.

"char checkKB()" (lines 218 - 266) assigns the keys for the keypad.  Note that the "*" (star) key is used to erase an entry, basically a backspace key.  The "#" (pound) key is the enter button.  The "A" key is used to enter a 180 degree bridge turn.  The "B" key is not currently programmed.  The "C" key selects "thumbstick" mode and the "D" key is used to return from "thumbstick" mode to  normal operation.

"void setup" (lines 92 - 165) is used to initialize the LCD screen, assign pins on the Mega and set the speed and acceleration of the stepper motor.  This is where the bridge is initially run to set the Zero point.

Below is an incomplete listing of the turntable sketch:

1       // Model railroad turntable indexing control
2       // Created by Dave Instone and Tom Ward

4        #include <AccelStepper.h>     // AccelStepper Library
5        #include <Keypad.h>           // Keypad Library
6        #include "U8glib.h"           // U8glib for Nokia LCD
7        #include <Wire.h>

9       //===============Pin Asignments===================
10     #define StepperEnable 2       // Arduino pin 2 to EasyDriver Enable
11     #define home_switch 9         // Arduino pin 9 to Home Switch (IR Beam Break)
12     #define EmergStop 10          // Arduino pin 10 to Emergency stop switch
13     #define  EmergStop_led  12    // When lit indicates Emergency Stop activated, program stopped
14 
15     //================EasyDriver Pins=================
16     #define sleep_pin 39          // Arduino pin 39 to EasyDriver Sleep pin
17     #define MS1 41                // Arduino pin 41 to EasyDriver MS1
18     #define MS2 43                // Arduino pin 43 to EasyDriver MS2
19     #define step_pin A0           // Arduino pin A0 to EasyDriver Steps pin
20     #define dir_pin A1            // Arduino pin A1 to EasyDriver Direction pin
21 
22     //==================Joystick======================
23     #define Joy_switch 45         // Pin 45 connected to joystick switch - not used
24     #define x_pin A2              // Arduino pin A2 to joystick x axis pin
25     #define manual_mode_led 45    // When lit indicates thumb stick control
26 
27     #define home_led 8            // When lit indicates stepper is home
28 
29     //==================Nokia Pins====================
30     #define backlight_pin 11
31     #define UG_CLK  3
32     #define UG_DIN  4
33     #define UG_CE  6
34     #define UG_DC 5
35     #define UG_RST 7
36 
37     // Note: Keypad pins assigned in keypad init.
38 
39     //===============Keypad Variables=================
40     int enteredTrack = 0;         // used for track entry
41     int targetTrack;              // goal of a move
42     bool reversed = false;        // selects end of TT to align with exit
43 
44     //=================Display Strings================
45     String sCurrentPosition;   
46     String sTargetTrack;       
47     String sEnteredTrack;
48     String sStepCount;
49 
50     //==========Miscellaneous Variables===============
51     int microStepsPerFullStep;
52     byte enable = LOW;            // the stepper is enabled when StepperEnable is low or 0
53     long initial_homing;          // Used to Home Stepper at startup
54     int step_speed = 30;          // Speed of Stepper motor (higher = slower) in JS mode
55 
56     //=================Constants=====================
57     const long basicStepsPerRev = 1200;   // set by the mechanics of the TT drive
58 
59     //===========Library Initialisations=============
60     //===Keypad===
61     const byte ROWS = 4;                   // Four Rows
62     const byte COLS = 4;                   // Four Columns
63     byte rowPins[ROWS] = {22, 24, 26, 28}; // Arduino pins connected to the row pins of the keypad
64     byte colPins[COLS] = {31, 33, 35, 37}; // Arduino pins connected to the column pins of the keypad
65     char keys[ROWS][COLS] = {
66       {'1', '2', '3', 'A'},
67       {'4', '5', '6', 'B'},
68       {'7', '8', '9', 'C'},
69       {'*', '0', '#', 'D'}
70     };
71     Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );  // Keypad Library definition
72 
73   //===U8glib Setup for Nokia LCD===
74     U8GLIB_PCD8544 u8g(UG_CLK,UG_DIN,UG_CE,UG_DC,UG_RST);
75     // CLK=3, DIN=4, CE=6, DC=5, RST=7
76 
77     //===AccelStepper Setup===
78     AccelStepper stepper(1, step_pin, dir_pin);   // 1  selects Easy Driver interface
79 
80     //===Stepper Step Settings for Each Exit===
81     /*
82     0 is furthest CCW exit and is always 0, for 1, 2, 3, etc substitute the actual
83     //  number of full steps to that exit from the furthest CCW exit
84     */
85     #define NUMTRACKS 16
86     long steps[NUMTRACKS] = {0, 60, 90, 120, 180, 240, 270, 300, 330, 375, 405, 435, 465, 600, 765, 975};
87     // For info only: 1/8 = {0, 480, 720, 960, 1440, 1920, 2160, 2400, 2640, 3000, 3240, 3440, 3720, 4800, 6120, 7800}
88 
89   
90     //=======================================================
91 
92     void setup(void) {
93 
94     // Light up the LCD backlight LEDS
95     analogWrite(backlight_pin, 255);  // Set the Backlight intensity (0=Bright, 255=Dim)
96   
97     // Draw initialise variables for Nokia LCD and draw initial screen
98      sCurrentPosition = "";
99      sStepCount = "";
100    sTargetTrack = "";   
101    sEnteredTrack = "";
102   drawnokiascreen1();  // Display update for Keypad mode
103   drawnokiascreen2();  // Display update for Joystick mode
104 
105   // Set pin directions
106   pinMode(StepperEnable, OUTPUT);
107   pinMode(MS1, OUTPUT);
108   pinMode(MS2, OUTPUT);
109   pinMode(home_switch, INPUT_PULLUP);
110   pinMode(x_pin, INPUT_PULLUP);
111   pinMode(dir_pin, OUTPUT);
112   pinMode(step_pin, OUTPUT);
113   pinMode(home_led, OUTPUT);
114   pinMode(EmergStop, INPUT_PULLUP);
115   pinMode(sleep_pin, OUTPUT);
116   pinMode(EmergStop_led, OUTPUT);
117   pinMode(manual_mode_led, OUTPUT);
118   pinMode(Joy_switch, INPUT_PULLUP);
119 
120   // Start Homing procedure of Stepper Motor at startup
121   delay(5);                           // Wait for EasyDriver wake up
122   digitalWrite(sleep_pin, HIGH);
123
124   // AccelStepper speed and acceleration setup for homing
125   stepper.setMaxSpeed(25);            // Not too fast or you will have missed steps
126   stepper.setAcceleration(10);        // Too fast here can also cause missed steps
127   // Set EasyDriver MS1 & 2 for homing and preset microstepsperfullstep
128   microStepsPerFullStep = 1; // need to initialise with 1 so that setMicrosteps() is OK
129   setMicrosteps(1);                    // Set MS1 & 2 for full steps, only for homing
130   initial_homing = -1;
131  digitalWrite(StepperEnable, enable); //enable stepper drive outputs
132    while (digitalRead(home_switch)) {  // Make the Stepper move CCW until the switch is activated
133    stepper.moveTo(initial_homing);   // Set the position to move to
134    initial_homing--;                 // Decrease by 1 for next move if needed
135   stepper.run();                    // Start moving the stepper
136    delay(5);
137  }
138
139   initial_homing = 1;
140
141   while (!digitalRead(home_switch)) { // Make the Stepper move CW until the switch is deactivated
142    stepper.moveTo(initial_homing);
143    stepper.run();
144   initial_homing++;
145   delay(5);
146   }
147  // Zero AccelStepper
148  stepper.setCurrentPosition(steps[0]);
149
150  digitalWrite(home_led, HIGH);            //Turn on the LED
151  targetTrack = 0;
152  enteredTrack = 0;
153  sCurrentPosition = sTargetTrack;         // Change to string for display
154  sStepCount = String(stepper.currentPosition());
155  sEnteredTrack = "";
156  drawnokiascreen1();                      // Update display
157
158  digitalWrite(sleep_pin, HIGH);
159
160  // Set operational speeds and microsteps
161  setMicrosteps(8);                        // Set 1/8 steps
162  stepper.setMaxSpeed(100.0);              // Set Max Speed of Stepper (Faster for regular movements)
163  stepper.setAcceleration(25.0);           // Set Acceleration of Stepper
164
165  }
166
167  //====================================================
168
169  void loop() {
170    long newStepCount;
171    static long lastStepCount = 0;
172    static boolean once = false;
173    static bool estop = false;
174   // The above only get executed once however many times the loop runs
175
176  if (checkKB() == '#') {
177    digitalWrite(StepperEnable, enable);
178    startTT();
179    once = true;                                    // Update the screen only once at end of movement
180    estop = false;                                  // Reset estop flag
181  }
182  if (stepper.distanceToGo() != 0) {                // The motor still needs to run
183   stepper.run();                                  // Not at exit yet
184    newStepCount = stepper.currentPosition();
185    if (newStepCount!=lastStepCount){               // Only print if it's changed
186      lastStepCount = newStepCount;
187      if (newStepCount % 48 == 0){                  // Only every 48 steps, more often interferes with operation
188      sStepCount = String(newStepCount);
189      lastStepCount = newStepCount;
190      drawnokiascreen1();                           // Update display
191      }
192    }
193    // Check for emergency stop pressed
194    if ( !digitalRead(EmergStop) && !estop ) {
195
196    // Now tell software to stop motor, but only once so set estop flag
197      stepper.stop();                               // Tell software to stop motor
198      estop = true;
199      digitalWrite(EmergStop_led, HIGH);            // Turn on emergency stop LED
200    }
201  }
202  if (stepper.distanceToGo() == 0) {                // The motor is stopped but has it just stopped?
203    if (once) {                                     // Just stopped so update the display and reset reversed once and estop
204      sCurrentPosition = sTargetTrack;              // Change to string for display
205      sStepCount = String(stepper.currentPosition()); // Adds steps to display at end of move
206      sEnteredTrack = "";
207      drawnokiascreen1();                           // Update display
208      reversed = false;                             // Reset reversed etc
209      once = false;
210      estop = false;
211     }
212   }
213
214 }
215
216  //====================================================
217
218 char checkKB() {
219  char keypressed;
220  keypressed = keypad.getKey();
221  switch (keypressed) {
222    case NO_KEY :
223      break;                                   // Nothing to do
224    case '#':                                  // Start TT moving
225      return keypressed;
226      break;
227    case 'A' :
228      reversed = !reversed;
229      sTargetTrack = String(enteredTrack);     // Change to string for display
230      if ( reversed ) {
231        sTargetTrack = String(-enteredTrack);  // Indicate reversed for display
232      }
233      sEnteredTrack = sTargetTrack;
234      drawnokiascreen1();                      // Update display
235      break;
236    case '*' :
237      enteredTrack = 0;
238      sEnteredTrack = "";
239      drawnokiascreen1();                      // Update display
240      break;
241    case '0' ... '9' :
242      enteredTrack = (enteredTrack * 10) + (keypressed - '0');
243      // Converts keypressed to integer and builds multidigit number
244      if (enteredTrack > NUMTRACKS) {
245        enteredTrack = NUMTRACKS;             // Not past the last track
246      }
247      sTargetTrack = String(enteredTrack);
248      if ( reversed )
249        sTargetTrack = String(-targetTrack);  // Indicate reversed
250      sEnteredTrack = sTargetTrack;
251      drawnokiascreen1();                      // Update display
252      break;
253    case 'B':
254      // Do code here but better to return 'B';
255      // And call a function or call the function here
256      break;
257    case 'C':
258      JoyStick(1);
259      break;
260    case 'D':
261      //
262      break;
263
264   }                                           // End of switch
265   return ' ';
266  }
267
268  //====================================================
269
270  void startTT() {
271
272  stepper.moveTo(calcSteps(enteredTrack, basicStepsPerRev , microStepsPerFullStep, reversed));
273                                            // Go to new position
274                                       
275  sCurrentPosition = String("mvng");      // Indicate a move is in progress
276
277  targetTrack = enteredTrack;             // Remember targetTrack
278  sTargetTrack = String(targetTrack);     // Change to string for display
279  if ( reversed ) {
280    sTargetTrack = String(-targetTrack);  // Indicate reversed for display
281  }
282  enteredTrack = 0;                       // Prepare for next track input
283  sStepCount = String(stepper.currentPosition());
284  sEnteredTrack = sTargetTrack;
285  drawnokiascreen1();                     // Update display
286 }
287
288
289  //====================================================
290
291 void setMicrosteps(int stepsPer) {
292  /*
293     Configure MS1 & 2 of easydriver and also set
294     value of microStepsPerFullStep to the corresponding value
295     and update Accelstepper current position in terms of
296     new step setting.
297     When reducing number of micro steps rounding errors can
298     cause step alignment errors.
299     If decreasing microsteps check if
300     stepper.currentPosition() MOD current microsteps is zero
301     If not move the stepper in steps until it is
302  */
303  switch (stepsPer) {
304    case 1 :
305      digitalWrite(MS1, 0);   // (1) Full Step
306      digitalWrite(MS2, 0);
307      break;
308    case 2:
309      digitalWrite(MS1, 1);   // (2) Half Step
310      digitalWrite(MS2, 0);
311      break;
312    case 4 :
313      digitalWrite(MS1, 0);   // (4) Quarter Step
314      digitalWrite(MS2, 1);
315      break;
316    case 8:
317      digitalWrite(MS1, 1);   // (8) Eighth Step
318      digitalWrite(MS2, 1);
319      break;
320    default:                  // Default is 8 microsteps
321      digitalWrite(MS1, 1);
322      digitalWrite(MS2, 1);
323      stepsPer = 8;
324  }
325    if (stepsPer == microStepsPerFullStep) {
326      microStepsPerFullStep = stepsPer;
327      return;
328    } // Handles initial setup the very first time called
329 
330  // Check for non MOD = 0 current position
331  int oddsteps = stepper.currentPosition() % microStepsPerFullStep;
332  if ((stepsPer < microStepsPerFullStep) && (oddsteps != 0)) {
333  // Need to move until oddsteps is zero
334    stepper.move(microStepsPerFullStep - oddsteps);  // Relative move
335    stepper.runToPosition();                         // Does the move
336  }
337  // Now adjust for new step setting
338  long currentSteps = stepper.currentPosition();     // Read current position
339  currentSteps = currentSteps * stepsPer;            // Multiply by new setting
340  currentSteps = (currentSteps / microStepsPerFullStep);  // And divide by the old
341  stepper.setCurrentPosition(currentSteps);          // And write it back
342  microStepsPerFullStep = stepsPer;                  // Save new setting
343 }
344
345
346  //===================================================
347
348 void drawnokiascreen1() {                // Screen display #1
349  u8g.firstPage();
350  do {
351    u8g.drawHLine(0, 15, 84);            // Draw top horizontal line
352    u8g.drawVLine(50, 0, 47);            // Draw vertical line
353    u8g.drawHLine(0, 35, 84);            // Draw bottom horizontal line
354    u8g.setFont(u8g_font_profont11);     // Set font
355    u8g.drawStr(4, 10, "cur-pos");
356    u8g.setPrintPos(57, 14);
357    u8g.print(sCurrentPosition);         // Display current position
358    u8g.drawStr(4, 29, "step #");
359    u8g.setPrintPos(57, 29);
360    u8g.print(sStepCount);               //  Display current step count of stepper
361    u8g.drawStr(4, 46, "new-pos");
362    u8g.setPrintPos(57, 47);
363    u8g.print(sEnteredTrack);            //  Display new track #
364  }
365  while ( u8g.nextPage() );
366 }
367
368  //====================================================
369
370 void drawnokiascreen2() {                  // Screen display #2
371  u8g.firstPage();
372  do {
373    u8g.drawHLine(0, 15, 84);
374    u8g.drawVLine(50, 15, 47);
375    u8g.drawHLine(0, 35, 84);
376    u8g.setFont(u8g_font_profont11);
377    u8g.drawStr(4, 10, "joystick mode");  // Display "Joystick Mode"
378    u8g.setPrintPos(57, 14);
379    u8g.print(sCurrentPosition);          // No display here in Joystick mode     
380    u8g.drawStr(4, 29, "step #");
381    u8g.setPrintPos(57, 29);
382    u8g.print(sStepCount);                // Display step count of stepper
383    u8g.drawStr(4, 46, "stp-spd");
384    u8g.setPrintPos(57, 47);
385    u8g.print(sEnteredTrack);             // Display step speed of stepper
386  }
387  while ( u8g.nextPage() );
388 }
389
390 //====================================================
391
392 // Shortest path to new track
393
394 long calcSteps(int destination, long FullstepsPerRev, long microSteps, boolean alignReversedEnd) {
395  long microStepsPerRev = FullstepsPerRev * microSteps;
396  long stepsFor180 = microStepsPerRev / 2;
397
398  // Read current position and transfor into the range 0 to microStepsPerRev
399  long currentSteps = stepper.currentPosition();
400
401  currentSteps = currentSteps % microStepsPerRev;                       // Reduce below steps /rev
402  if (currentSteps < 0) currentSteps = currentSteps + microStepsPerRev; // Make -ve's +ve
403
404  // Update AccelStepper with the 0 to  microStepsPerRev range position
405  stepper.setCurrentPosition(currentSteps);
406
407  // Now get the steps for the new destination and add 1/2 rev if reversed
408  long newSteps = steps[destination]* microSteps;
409  if (alignReversedEnd) {
410    newSteps += stepsFor180;
411    newSteps = newSteps % microStepsPerRev;                              // No point in doing more than 1 rev!!
412  }
413  // If less than or equal to a half rev we are done
414  if (abs(newSteps - currentSteps) <= stepsFor180) return newSteps;      // EXIT all done
415
416  // If we are here the number of steps is more than stepsFor180 so we need to reverse
417  //direction from the 'norm'
418  if (newSteps < currentSteps) {
419  // Convert CCW to CW
420    return newSteps += microStepsPerRev;                                 //EXIT
421  } else {
422  //  Convert CW to CCW
423    return newSteps -= microStepsPerRev;                                 //EXIT
424  }
425 }
426  //====================================================
427
428 void JoyStick(int Microsteps) {


Summary:

Note:  The full version of this sketch can be downloaded through the MRH-rrworks-collab.io website and requires membership which is not complicated.  Follow this link (click here).   Please note that this sketch is copyrighted and not intended for sale or distribution.  Intended only for individual use.


The turntable can be the center of attention and operation for your engine facility.  Manually controlling the bridge with a hand-wheel and gear connection is a quick and easy way to get things in operation but there's a better way and it doesn't cost an arm and a leg.  In fact, the cost is comparable to setting up a hand crank with gear reduction and u-joints.  Maybe the only real disadvantage to manual control is that you have to be able to clearly see the bridge location to get the tracks lined up.  This sketch and associated parts were developed because the turntable is located over 2' from where the operator stands and his vision isn't what it used to be.  This is the perfect application for a stepper motor.  It's accurate and stops are repeatable.  Motion can be programmed to suit your eye.  The motion is really the star here because it's realistically smooth and slow and that ramp-up and ramp-down of speed is the cat's meow.  Another advantage to remote Arduino operation is that you can quickly punch in your command and then just observe as the turntable goes through it's operation just like there were two 1.5" tall guys in dirty blue overalls leaning into those push-bars.

This sketch was designed for easy operation.  Most of it is intuitive and the explanation of code throughout makes for easy-to-understand commands. It doesn't take long before you're going through the sketch and modifying things for your own application.  And then once you have all of your track locations added in it's just a matter of deciding where you want to go, entering a number and enjoying the show.


Sunday, March 22, 2020

Building a Diesel Shay Pt 1


 Two years ago, April 2018, I started to build a diesel Shay based on several photos of the prototype built by Canadian Forest Products in the 1950's.  They apparently took a two truck Shay steam engine and removed the boiler, replacing it with diesel power and a homemade cab.  I thought I could replicate this using an HO scale Roundhouse Shay locomotive and a diesel body kit from Mount Blue.  It looked good on paper.  When I got the body built it looked more S scale than 1:48 and my Roundhouse Shay had serious operation issues.  The project got shelved.



Now two years later I'm finally getting around to laying track for my layout and have a new purpose for that Shay.  I also have better tools in the way of a 3D printer.  To develop my track laying skills I practiced on my test track in the shop.  My test track had expanded into a shunting puzzle (click here) and I decided I wanted dedicated boxcars and a switching loco for the game.  The old diesel Shay would be perfect for this and with no "turn-around" the Shay's "good side" would always be showing. I got out the Mount Blue body and thought I could improve it by simply replacing the cab.  I went on-line and found a 1:32 scale EMD SW1500 diesel on Thingiverse (click here).  I downloaded the STL file and resized it in TinkerCAD to 1:48 scale.  When I added the cab to the Mount Blue body I was less than thrilled.


I then decided to use parts of the SW1500 to make the rest of my custom built Shay body, ditching the Mount Blue body completely.  I quickly realized that simply shrinking down the 1:32 parts wouldn't give me the detail and quality I wanted and ended up designing most of the parts from scratch based on parts and details from the SW1500.  This redesign process taught me a lot about my printer and I finally have settings that give highly detailed parts (at least for a filament printer).   Part of this was accomplished by exaggerating details (gaps between doors, hinges, latches) so they would print better.  I also changed the orientation of some parts on the printer tray (the hoods standing on end for example) so they would print up cleaner.  Another thing was using "raft style build plate adhesion" and adjusting the "raft air gap" to 0.08mm so the raft would break away cleanly and easily from the part.  The pictures below are screen shots of my diesel Shay body design done using TinkerCAD.




To help with the printing I broke up the design into 25 parts and printed them out separately.  In the photo below you can see the headlight buckets and brackets are still attached to the "printing raft".  It uses a lot of filament and the printing time goes through the roof but the end results are worth it.  It took about three days to print up these parts but part of that was spent reprinting the same parts several times to get better quality through refines in detail or re-positioning.


While doing this I got power to my test track and tried running the Roundhouse Shay.  The gears bind and it walks like a drunk donkey.  I have a NWSL gear kit for this thing (no longer in production) so I installed that but in the end I decided the loco just has too many basic design issues and will never run as nicely as I would want.  The gear installation is pictured below.  I have a Bachmann On30 Shay that runs smoothly at all speeds and considered using that but it's one of my favorite locos.  I mean.... the wheels are too big.  Yeah, that's it.  I also have a Bachmann HO three truck Shay that I converted to two trucks for a Gilpin Shay kit from Boulder Valley Models (also no longer in production).  This would be perfect except I also don't want to give up my Gilpin Shay so I'll spend some time on eBay bidding on another Bachmann HO Shay.


More updates as progress is made on this project.

Wednesday, February 12, 2020

Animation and Sound With an Arduino



I plan to have several areas around the layout that have sound and animation.  There will be a 20 stamp ore mill with a detailed interior.  While I don't have plans to animate it I do have a sound track of the mill in operation.  In town there will be a saloon with a dedicated sound track and at the roundhouse there will also be sounds of work being done.  The main focus of animation with sound will be at the engine service facility.  I've been using this as a learning module to develop scratch building  modeling techniques, learn about Arduino programming and create sound files from scratch.

The engine service facility consists of a water tank, coaling tower, sand house and ash pit.  I'm using an Arduino Mega 2560 with a motor control board and a WAV Player from Sparkfun for sound and one single sketch to control everything in seven different scenes.  Both sound and animation are initiated by a pushbutton mounted on the fascia of the layout.  I'll use the animation for the water tank as an example of what was involved.

The water tank scene was first designed by making a timeline of what I wanted to happen.

T0 - Depress fascia mounted button - initiates sequence

T0 to T+4 - Open tenders water hatch (sound only) - On the WAV Player track #1 is initiated and enters a 4 second sound of the water hatch being opened on the tender.

T+4 to T+14 - Lower Spout (sound and animation) - trigger is sent to the motor control board to begin spout being lowered.  Sound track enters 10 seconds of sound of cables running through pulleys while spout is lowered.

T+14 to T+126 - Pause - sound track enters 5 seconds of silence.  Motor drive stops spout motion and begins 112 second delay while sound track plays water flowing through spout into tender’s water box.

T+126 to T+136 - Raise Spout (sound and animation) - Sound track 1 enters sound of spout being raised.  MS sequence completes 112 second count and triggers spout being raised (10 second animation).

T+136 to T+144 - Pause - Sound track 1 enters 3 second silence then enters 5 second sound of tender's water hatch being closed.  Motor drive completes sequence.  End of Wave Player sound track 1.  End of Water Tank scene.

The sketch I built combines 7 different operations: sand house, ash pit, water tank, coaling tower spout, coaling tower bucket and coaling tower pit.  Separate buttons mounted on the fascia panel initiate different parts of the sketch.  In the sketch I used the “delay” command because it works with milliseconds and this allows tiny corrections with the Audacity program for perfect coordination with the animations.  The portion of the sketch for the water tank follows the timeline and goes like this:

void waterSpout() {

  // play sounds of water filling operation
  // run motor to animate water tank spout

  musicPlayer.startPlayingFile("Track006.wav"); // play sounds for water tank

  delay(4000);  // allow 4 seconds before motor operation

  waterSpoutMotor ->run(FORWARD);  // start motor forward

  delay(10000);  // allow 10 seconds to lower spout

  waterSpoutMotor ->run(RELEASE);  // stop motor

  delay(112000);  // allow 112 seconds for sound of water flowing

  waterSpoutMotor ->run(BACKWARD);  // start motor backward

  delay(10000);  // allow 10 seconds while spout raises to stored position

  waterSpoutMotor ->run(RELEASE);  // stop motor

  delay(8000);  // allow 8 seconds for sound track to complete

  musicPlayer.stopPlaying();  // stop playing sound file since animation is complete


  }


Sounds were developed using an ap called Streaming Audio Recorder that captures sounds from from the internet through your computer.  Using it you can make course changes to start and stop of the file and choose to make it a WAV file (my preferred ).  Once you have a usable sound you can modify it using Audacity, an ap used for developing sound files.  For the sound of water I combined 7 different WAV files to get the sound I wanted.   Then I took that small file and copied it and pasted end to end to make a seamless sound of water falling into the tender's tank for 112 seconds with it tapering in at the begining and out at the end.  The sounds of individual drops and echoes inside a metal chamber played an important part in all of this.

Each section of the sketch has it's own sound track and for me, making the sound tracks was the most fun.  There are a ton of sound files on the internet but you have to careful about sound quality and maybe most importantly, about background sounds.  You can use Audacity to clean up these files and even eliminate those background sounds but it's always easier to start with a clean sound file.

Audacity (https://www.audacityteam.org/) is an excellent program for editing sound tracks and it’s free.  It allows zooming into a graphic display of your track so you can work in milliseconds to clean up and modify files.  You can eliminate individual sound spikes that create “ticks” or other annoying anomalies.  You can stitch together multiple files to get the length of time you need and blend multiple files using separate tracks to layer sounds together.  It’s a very cool program and doesn’t take long to become familiar with.  Take the time to read the manual first.

Adding sound and animation to the layout adds a whole new level of “realism” and can add to your modeling skills too.  You can keep it simple and buy ready-made packages or take it to a whole new level and build your own.  Sound and animation made from scratch have the advantage of being higher quality (usually, you have total control) and exactly what you need for your specific scene.  I found the learning curve for building sound files to be fairly easy.

Learning the programming (modified C++) for the Arduino was more difficult for me.  It’s well worth investing the time though.  Arduino hardware is inexpensive and the software is encouraged to be “freeware”.  There are numerous forums available for learning and people seem anxious to help.  As an example, I wanted to write a sketch (program) to run my turntable.  I knew I wanted to use a keypad, LCD display, Arduino Mega and a Sparkfun stepper motor controller called Easydriver.  I had no idea how to make it all work.  I did find a sketch using these components that was written to control a feed table for a cutoff saw.  I copied that thinking I could make it work but had no idea what to do.  I found a forum for Arduino with model railroading and explained what I wanted to do.  A group of members participated but two very knowledgeable folks from opposite ends of the planet spent two months helping me write the sketch and explained in detail all their recommendations.  By the time the sketch was complete I had over 500 lines of code and what is probably the most complete turntable sketch in existence.  Plus I understood every bit of it.

For me, Arduino controlled animation and sound make the hobby way more fun and take it to a level never before possible and all at a reasonable cost.  The biggest expense is my time.  Just like developing every other skill needed for this hobby.







Coaling Tower



I eventually wanted to build a layout with a full engine service facility.  A coaling tower was an essential part of that but since my railroad is going to be a narrow gauge short line size was important.  There are some O scale kits out there but they are either too big for what I'm doing or too expensive.  The Durango tower from Raggs to Riches is really nice but the price of the kit is out of my league.  I don't think it's even available anymore.  I did some hunting around on the net and found a coaling tower that was used by the DSS&A RR up in Marquette, Michigan.  It was rated at about 25 tons which is plenty big enough for my short line.  Best of all, Wayne Wesolowski wrote an extensive four part article starting in the May 1988 issue of Model Railroad Craftsman about modeling this coaling tower.  My wife got me all four issues for my birthday and even contacted Wayne about the tower.  I had everything I needed to get started.  I read through the articles and decided I needed a full size drawing.  Just as I got started on that I found some photos of a coaling tower at the Henry Ford Museum that looked very similar.  This one was recently built in 2014 and designed by an architect using Wayne's article for inspiration.  What he designed uses the same basic design but is much beefier looking.  I contacted the architect and asked if he would share his drawings.  Not the design drawings but he said I could use the line drawings showing all four sides and I could get dimensions from there.



I compared the line drawings of the Ford tower to the drawings of the DSS&A tower and was able to work out dimensions.  I made a full set of drawings of my own, mostly based on the Ford design but modified for narrow gauge.


Actual construction was tedious but fairly straightforward.  I started with the front and rear frames, added the side framing to tie them together and then boxed in the coal bin board by board.  That was the tedious part.  For the steel cage around the ladder I used scale sizes of styrene.  I also used styrene for the fully operational coal chute.  The coal bucket in the back of the tower started out as a kit from Grandt Line for the Durango tower.  I cut it down to the proper size, eliminated the wheels and made a hoisting frame based on the DSS&A tower.  The coal pit behind the tower is based on the ones used in Durango and Chama with a raised service track.  The grating for the pit is another Grandt Line product.



 


The styrene parts were painted with a rattle can and then weathered with Bragdon powders (click here).  The coal chute and bucket were animated with stepper motors mounted beneath the layout and controlled by an Arduino.  The Arduino provides three separate sound tracks for the coaling tower.

The coal chute track starts with the sound of the chute being lowered and the gate opening.  The sound of coal falling down the chute lasts for 45 seconds, then the gate closes and the chute is raised.

The coal bucket track starts with the sound of a hit and miss engine starting up in the shack beside the tower.  The coal pit gate is opened and coal falls into the bucket for 10 seconds.  The gate closes and the bucket raises to the top of the tower, dumps and then lowers back to the pit.  This animation repeats 4 more times.

The third sound track has no animation.  It was made to provide the sound of a hopper dumping coal into the coal pit behind the tower.

Making sound tracks is another form of scratch building that takes the model to a whole new level of realism.


Building the Roundhouse and Shops, Part 3



With the roundhouse space closed in I moved on to detailing the interior.  I found a drawing of standard roundhouse designs for the Central Pacific RR and another of the roundhouse for the East Broad Top RR.  These showed dimensions for inspection pits and a drop pit for removing the driver wheels from a locomotive.  Cool!  That would be a nice feature to add.  The drop table uses a hydraulic lift placed under the locomotive.  After the drive wheels are unbolted the table is lowered and rolled to the side on a pair of tracks where the wheels can be removed from the pit and taken to the shop for machining.  The drop pit is just wide enough to take one or two pairs of drivers and the locomotive is still supported at each end by the other driver and maybe a pair of jacks under the cab.




I belong to a forum called FreeRails (Click here) and it was there that I was introduced to an inexpensive 3D printer (Ender 3, $200), the perfect thing for making my own parts.  You design the parts on a CAD program (I use TinkerCAD) then transfer your design to a slicer program (Cura) that creates the commands for the 3D printer to make your part.  It’s a lot easier than it sounds.  The cool thing is that you can make parts that aren’t available commercially like the drop table.  That was my first 3D project.  I designed the drop table itself from photos and the hydraulic system for it from an old drawing I came across.


I made the inspection pits from MDF and added sugar cube speakers at the far end of the floor for pits #1 and #2.  I disguised the speakers to look like floor drains using HO scale grating from Grandt Line.  The speakers will add sound effects for the roundhouse interior that will be activated from a button mounted on the layout facia.   The photos below show the inspection pits and parts used for the speakers and on the right is the CAD design for the sugar cube speaker baffle mounted below the pit floor.

 

It was about this time that my wife and I took a break and went to Savannah, Georgia for a long weekend.  The idea was to tour the old city section but it just turned out that there's a railroad museum about three blocks from where we stayed.  Hmmm.  The museum includes the roundhouse and shops of the Georgia Central RR and provided many details that I’ve tried to incorporate into my model.  These include ventilators in the skylights, wood block flooring, smoke jacks for the locomotive smoke stacks and interior lighting.


I made skylight ventilators from parts I got from Grandt Line before they went out of business.  The smoke jacks were also a kit from Grandt Line but I modified the hoods to resemble the smoke jacks I saw in Savannah and printed those out on the 3D printer.


The wood block floor took some investigation.  I found that industries used wood block flooring to prevent damage to machines parts that might be dropped.  This flooring was also used in greasy, oily environments.  The wood absorbs oil and prevents slippery conditions.  Individual brick shaped blocks can be replaced as needed.  I also found that it was common to seal the blocks with coal tar which makes the floor a dull black.  I think they did this to make the blocks waterproof.  I made my wood block flooring from HO scale brick plastic sheets that were intended for modeling roadways.  Painted grey/black the bricks closely resemble the coal tar sealed wood blocks.


For the interior lighting I used Grandt Line O scale lamp reflectors with soft white LEDs.  The LEDs came on a roll of 500 ($15) intended for lighting effects such as under cabinet lighting.  They were in series/parallel with groups of 3 matched with a resistor to supply the correct voltage.  I needed five rows of four and simply used a matching resistor for each row.  Worked out just fine and the extra LED in each row lowered the voltage enough to slightly dim the light.  Perfect.  The picture below right shows the lamps installed on the inverted roundhouse frame and the power busses running beneath each truss.

 


I also used the printer to make workbenches and storage cabinets and shelves as well as junk to put on the shelves and tool boxes for the workbenches.


In my roundhouse research I came across a photo showing a system used in the early 1900’s for blowing out the boiler tubes in locomotives.  Water running through the tubes is high in minerals and these collect on the inner surface and eventually clog the boiler tubes, creating a dangerous opportunity for explosion.  To prevent this a regular service routine involved cooling down the boiler water, blowing it out and then replacing it with fresh water.  Then the locomotive would be fired up and brought up to temperature.  This was usually an overnight process and reduced the amount of time the locomotives could be in operation, which of course meant loss of income.  This time was greatly reduced with the use of the Miller System, permanently installed in roundhouses and locomotive shops.  The system involved plumbing used to removed the old hot water, run it through a filter and then return it to the locomotive still hot.  I modeled it using brass rod for the piping and made the storage tanks, filters and pumps with the 3D printer.  Below can be seen the original drawing of the system, the pump room and equipment added to the back of the roundhouse, the plumbing mounted to the support post of the trusses and finally, how the overhead plumbing was routed.  In that last overhead shot you can also see the floor drain grating over the speaker in the closest inspection pit.







Painting Plaster Castings

 Today I painted the remaining walls of the roundhouse and thought I'd add a blurb here to share my technique for painting plaster stone...