Adding a Turntable to the L&NC, Part 2

The Roundhouse / Turntable complex at the Red Bluffs Yard is the focal point of the lower level of the L&NC and one of the more complex projects planned for the layout. In the first installment  (which is also step 4 of the build out of Module 1, lower level) I wrote about how I built the pit and bridge base, and showed the mechanism I developed for the turntable using Actobotics robotics gear.  In this installment, step 5 ( Links to step 1, steps 2 & 3) of this module build out, we’ll take a look at the buildup around the turntable, adding track and integrating it into the scene.  I’ll also talk about how I completed and wired the bridge. Along the way I took the time to install basic scenery elements while I have free access to this section of the layout.

Step 5

Finishing the Pit

The first task after installing and leveling the turntable pit was to create a rim and cover the rough opening for the  pit. After looking at a lot of pictures of prototype turntables I concluded that the rim needed to be around 4 or 5 scale feet wide. Rather than try to cut a circle out of styrene, or something like that, I elected to use a strip of cork roadbed. With the beveled edge against pit wall, and the square edge forming the outer edge of the rim, the look seemed about right.

The flexibility of n scale cork roadbed made it the perfect material for rimming the turntable pit.

The flexibility of n scale cork roadbed made it the perfect material for rimming the turntable pit.

One thing I found out in my research was that track rails are typically attached directly to the rim material (usually concrete) without ties. I decided not to model it that way because I just don’t want to get bogged down with gauging problems. So I elected to mount the ties to the rim so that they will keep the track in gauge.

Its not prototypical, but that’s OK with me because this is one of those places were functional reliability has to win out over prototypical niceties.  As you can see in the picture below, I weaved the ties of the adjoining tracks between each other to achieve the correct track placement along the rim where it meets the bridge. Preliminary testing established that I’m getting good alignment and smooth wheel transits across the gap.

Track from the Roundhouse meets the turntable.

Track from the Roundhouse meets the turntable. Ballasting is in progress so there are bits ballast everywhere at the moment!

I painted the rim concrete to match the rest of the pit.  The texture of the roadbed material is a little rougher than I anticipated. A second coat of paint smoothed it out more and left me with a surface that is a little worn from the effects of time and weather.  I’m pleased with the effect; a perfectly smooth surface just wouldn’t be right.

Finishing the Bridge

In addition to the powered track that also serves as a reversing section, the turntable bridge has an operators hut containing a warming stove with a red LED for creating a hot coals effect. The central arch–which prototypically was often a rotating connection point for the incoming power line to run the turntable–is outfitted with a simulated rotating beacon that will run whenever the turntable is in operation. Not even remotely prototypical, this little enhancement is just a way to animate and make the turntable even more interesting.  I did say at the outset of this project that I was going to throw in animations at every opportunity!

I started the deck by creating a base frame to fit over the bridge and hold a piece of flextrack (I’m doing this layout in Peco code 80 gear).

Bridge deck base frame.

Bridge deck base frame. The track has not been trimmed to its final length yet.

Starting with the base frame, I continued adding cross-members until there was one in each space between ties. Then I decked it with .030 x .080 styrene “planks” cut to various lengths from scale 8′ to scale 32′, creating a plausible planking effect..

The bridge deck before painting.

The bridge deck before painting.

The central arch is fabricated from .080 square tubing. I added etched brass X-bracing in a scale 18″ size so that it would resemble beams fabricated from plates and X-braces. I thought about trying to fabricate brace & plate beams, but felt it would be a little too difficult to pull off and make strong enough for practical use.

The rotating beacon at the top of the arch is fabricated from three red micro SMD LEDS arranged in a triangle. The magnet wires (1 common anode and 3 cathodes) are connected to an incredibly small rotating beacon simulator board that I purchased from Ngineering.com. The have a nice collection of simulator boards geared to model railroading, with everything sized for N scale (these boards will work in any scale, so don’t be deterred if you don’t do N).

The Ngineering rotating beacon simulator board with leads attached.

The Ngineering rotating beacon simulator board with leads attached.

Actually I bought 2 because I ended up screwing up one of the outputs on the first one. These boards are smaller than a dime and soldering wires to them is tricky. On my second attempt I soldered short 30 gauge solid wire leads to the board (easier than soldering magnet wire), then soldered the 40 gauge magnet wire to the leads.

To answer the obvious quesiton, I could very well have done the rotating beacon effect with an Arduino.  However, this little board is particularly good at that job, and I don’t have to use 3 PWM pins (plus the timing sensitive programming) to do the job.  I can run this effect from a single connection on a Duino Node, simply turning it on when the bridge moves and off when it stops at its intended destination.  This is good example of how one has to balance all the trade-offs when designing a system based on Arduino technology. Sometimes an external utility board gets you to the right place more efficiently than doing it from scatch.

Base and walls of the hut, and the stove.

Base and walls of the hut, and the stove.

The operator hut is made from a white metal “trackside shanty” kit by Stewart Products. I decided that the hut needed a little stove for heating, to go with the smoke jack provided by the kit. So I fabricated one from a piece of brass tubing and a styrene circle for a top. I cut an opening in the brass to serve as the front opening.  A red led mounted in the bottom of the tube (not shown) will be used to create a fire effect that you will just barely see through the open door of the hut. I’ll produce the effect with PWM on an Arduino board instead of a dedicated simulator. So the turntable bridge will have two different light animations.

With all the pieces assembled, the wiring in and everything painted, it was time to connect all the wires to the leads from the spinner and attach the deck assembly to the bridge base. If you look carefully you’ll see a black object to the right of the center — that is the beacon simulator in protective heat shrink tubing.

Attaching the deck assembly to the bridge base.

Attaching the deck assembly to the bridge base.

Are those fishing weights attached to the underside of the deck? You guessed it! The white metal hut is rather heavy (relative to the weight of the styrene); the weights are needed to balance the bridge. The white object between the girders on the left is a nylon screw with a rare earth magnet (Neodymium, available from K & J Magnetics) glued to its head, screwed into a nylon nut attached to the bridge. That is for the position sensor reed switches I’ve previously described.

The turntable fully assembled.

The turntable fully assembled.

Scenery

In addition to finishing the turntable I am doing as much scenicking as possible while I have this module on its own on a work table. As I am doing this I am reaping a bonus from my modular design: the ability to take a module and place it on a work table for 360 degree access at chair height.

I'm using CadRail's layers to record information. Here I've recorded feeder positions (in red) and turnout servo positioning data.

Module 1, Lower Level

 

Referring to the drawing of this part of the layout above, I decided to add a small mountain in the space between the yard at the top and the  two legs of the reversing loop at the bottom.  This creates a view block that isolates the yard into its own little world.

I also decided to create a couple of roads using Woodland Scenic’s Road System paving tape and Smooth-It pavement material. The system works pretty well. I do recommend viewing their video tutorials for instruction in using the system, which you will find on the product pages.

Creating an access road at the Red Bluffs Yard.

Creating an access road at the Red Bluffs Yard.

After removing the forming tape, you are left with this:

The road at Red Bluffs with forming tape removed.

The road at Red Bluffs with forming tape removed.

You’ll see that the road includes a driveway and parking lot at the top of the picture, and another driveway at the bottom that will lead to a gravel parking lot. These are provisions for future structures I have planned –a multi-unit rooming house for railroad workers at the top and a yard office at the bottom. I also created a road on the opposite side of the module, running between the legs of he reversing loop as an access road to the roundhouse / turntable complex.  I figure the employees need some way to get to and from work!

The mountain was made from several layers of foam insulation glued together then carved to a rough shape. I glued the foam shape to the layout, then covered the whole thing in plaster cloth. Then I selected some rock molds and cast a few rocks. After gluing the rocks to the mountain  (Attach rocks with wet plaster? Forgetaboutit! Liquid Nails for Projects makes attaching hydrocal rocks to another surface a snap, with its strong tack and immediate hold), I filled holes and blended the rocks into the terrain with Sculptamold. I painted everything except the rocks the medium tan I’m using as a base color, then painted the rocks themselves with a combination of iron oxide and earth tones. I glued down some earth blend and other ground foams — and, voilà, the red bluffs were born.

The Red Bluffs

The Red Bluffs

What’s Next?

More scenicking, of course.  But it is getting to be time to go underneath the module again and install more of the electronics, including controller hardware for the 9 turnout servos and the controller package for the turntable / roundhouse.

Until then, happy railroading!

Wiring the L&NC — Adding Servos

This it the second installment in a series (Part 1) about the build out of Module 1, lower level of the L&NC. This series covers all the basic steps I’m following to install all wiring, electronics and mechanical objects throughout the layout, so in subsequent phases of this project I can focus on the unique aspects of other modules. Step 1 was to install the basic wiring trunks and connection points, create track power distribution nodes then connect track feeders to the nodes.

Step 2

I tested the track with one of my most challenging locomotives—a Broadway Limited EMD E8A DCC with Sound. I say “challenging” because it has two 3-axle trucks, a long wheelbase and no big capacitors to buffer track power, making it susceptible to derailment or operational problems with faulty track.  If this loco can run a stretch of track problem-free, it’s good track!  Naturally I found and fixed a few (cough …. ) places where there were problems.

Correcting track problems for flawless running.

Correcting track problems for flawless running.

After tinkering with the problem zones, I realized that the “course of least resistance” was to rip out and re-lay a few short strips of track. The caulk adhesive track laying method makes this a piece of cake: after cutting the rails, run a long bladed knife under the track section you want to remove and its free in seconds. The ease of fixes really adds incentive to be fussy at this stage and get it right. I had everything in good order in a couple of hours including drying time for fresh caulk adhesive.

Step 3

The next step is to mount the servos running the 9 turnouts on this level. Installing them now is the best way to ensure they have the space they need for normal operation and maintenance.

test loop servo 1 in place

Servo mount on the Test Loop.

I’ve previously done a basic demo of the mounting method I used on the Test Loop. I chose that particular mounting method because it simplified the connection between the servo and the rod connected to the turnout; the rod fits easily but snugly through the hole in the horn. In this mounting method the base plate of the mount provides the fulcrum or pivot point for the rod.

Turnout operation on the Test Loop continues to be 100% reliable. The only issue with that mounting method is that noise is transmitted to the layout through the mount, so servo operation is noisier than it should be.

A New Low Noise, Low Profile Servo Mount

In addition to noise control, the equipment space beneath the layout level is about 1 3/4 deep, the width of a 1″ x 2″ frame member. For both protection and aesthetics, I need all equipment to fit inside that space. The old servo mounting method requires more space than that, and would stick out below the edge of the frame.

The solution is to mount the servo on its side, allowing the horn to rock a rod back and forth setting the turnout points. Several obvious ways to do that came to mind.  But I also wanted to make sure that alignment of the servo is easy and foolproof.

Layout Prep

I drilled holes for the turnout rods when I laid the track. To make installation and alignment of the servo easy, I  drilled the holes so that the rod would be in the 90 degree position (perpendicular to the plywood base) with the points aligned one direction or the other. I tried to keep the holes through the plywood small to serve as fulcrums  (mostly succeeded), then widened the holes in the foam and roadbed beneath the track so the rod can swing between the two positions of the points.

I inserted a 3″ rod cut from 1/16″ music wire (you need a hard wire cutter for this stuff) and made sure the positioning of the rod was correct. The advantage of the music wire is that it can flex without deforming, allowing you to apply pressure to the points.

Fulcrum pad for turnout 5

Fulcrum pad for turnout 5

That said, 1/16″ music wire I’m using is fairly stiff in the short lengths needed here. It is stiffer than the wire typically use with stall motor turnouts, stiff enough that it easily overcomes resistance from the built in springs in the Peco turnouts I’m using on this layout. Many people recommend removing the positioning springs in Peco and similar turnouts, since they can cause turnout movement to pause while overcoming resistance of the spring. Using 1/16″ music wire the servo is able to move a sprung turnout smoothly. I took a few springs out before I realized it was completely unnecessary.

 

At this point I made sure the rods could move the points properly.  In a few cases, the fulcrum hole was a little too large because of sloppy drilling; the easy solution is to fit a plywood plate with a fulcrum hole in the right diameter over the old one.

Servo Prep

Preparing the servo requires testing and setting it to the 90 degree position. Then with the case on its side, orient the output shaft to either the right or left (which ever you need for a given situation) and install a standard single arm horn pointing up, perpendicular to the case.

The offset shaft allows you to select the right orientation. In either case, 0 degrees is 1/4 turn to the right of center, 180 degrees is 1/4 turn left of center.

The offset shaft allows you to select the right orientation. In either case, 0 degrees is 1/4 turn to the right of center, 180 degrees is 1/4 turn left of center.

Here’s a sketch to test the servo by running it from 0 to 180 degrees (the travel of a typical micro servo), then to the required mid-point position:

#include <Servo.h> 
 
Servo myservo;  // global servo object
int midpoint = 90;  // in degrees
int pin = 6; // control pin

void setup() 
{ 
  int i;
  myservo.attach(pin);
  myservo.write(0);
  delay(1000);
  for(i = 1; i <= 180; i++){
    myservo.write(i);
    delay(50);
    }
  delay(1000);
  for(i = 180; i > midpoint; i--){
    myservo.write(i);
    delay(50);
    }
  delay(1000);
  myservo.write(midpoint);
} 
 
void loop() 
{ 
  
}

Mr. Hot Glue Strikes Again

If only micro servos came with side mounting tabs instead of just the ones on top. They do not. To do a side mount like I’m doing you need only fabricate two parts: 1) a strip of .080″ styrene, cut to about 2″ x .5″ and predrilled with holes at each end to accommodate mounting screws; and 2) a piece of 1/32″ brass wire with a loop (a little over 1/16″ inside diameter), a short straight section (about equal to the thickness of a servo horn) leading to a 90 degree bend and a longer straight section.

These two parts allow you to side mount a micro servo, and connect its horn to a rod.

These two parts allow you to side mount a micro servo, and connect its horn to a rod.

First I remove any labels on the side of the servo that attaches to the mount, then I put a dab of hot glue on the servo and press the styrene strip against it, centering and aligning the strip with the built in fins. Then I put a bead of hot glue down each side of the servo where it joins the mounting strip. Its probably overkill, but I want the servos mounted solidly and resistant to torsional stress.

Micro servo glued to a side mounting strip.

Micro servo glued to a side mounting strip.

The brass wire is threaded through the top hole of the horn, with the long leg aligned along the length of the back side of the horn and the loop parallel to the base. Apply dabs of hot glue to adhere the wire to the horn.

Here you can see how the brass wire is glued to the horn, and the turnout rod is threaded through the loop.

Here you can see how the brass wire is threaded through the top hole glued to the horn, and the turnout rod is threaded through the loop. Note the clearance between the rod and the horn.

Installation

Here a servo has been aligned to the motion of the rod, marked on the plywood.

Here a servo has been aligned to the motion of the rod, marked on the plywood.

First it is necessary to determine the plane along which each rod moves; that will depend on the angle of the turnout relative to the rest of the layout.

With the plane of motion marked and the rod set to its 90 degree position, I slip the rod through the loop glued to the horn and place the servo next to the rod, parallel to the plane of the rod. Placing just a little tension on the rod and maintaining even clearance between the horn and rod, I mark and drill mounting holes for the servo. Sometimes its easiest to do one mounting hole, attach the servo at that hole then—after adjusting positioning—drilling the second hole and completing the mount.

After a test fitting, I remove the servo and apply a strip of 3/4″ Rubber Splicing Electrical Tape (Scotch #2242) to the bottom of the mount to inhibit noise transmission. I remount the servo in its final position.

Servos 1, 2 and 9 mount in their final positions.

Servos 1, 2 and 9 in their final positions.

Problems at Turnout 4

The location for turnout 4's servo.

The location for turnout 4’s servo.

Turnout 4’s rod comes down at an awkward spot, close to a frame cross member, the edge of the layout, the main wiring bundle and three feeder sets. The feeders are the main problem; I should have located them further from the turnout. While moving the feeders is an option, I also realized that the fulcrum hole was too large so I was going to have to put in a new fulcrum plate anyway.

The solution I came up with was to fabricate a mounting plate from a couple of pieces of scrap plywood, that would provide a new fulcrum and cantilever over the feeders. Everything screws down so that it is removable and repairable.

Mounting solution for Turnout 4.

Mounting solution for Turnout 4.

 

Turnout 4 Servo Mounted. The horn swings UP in this photo, so the wire bundle below the servo does not interfere.

Turnout 4 Servo Mounted. The horn swings UP to change the position of the points (as oriented in this photo), so the wire bundle below the servo does not interfere. Its snug but effective.

Gathering Servo Positioning Data

At this point it makes sense to test each servo and determine the positions for each point setting.  Each servo installation is different so each one will have unique settings for turnout positions. The size or “looseness” of the fulcrum hole and the length of the rod are the main factors affect servo positioning

On this module and level it takes approximately 20 – 30 degrees movement of the servo to change the points. Once I determined that, it was easy to calculate initial positions that could then be fine tuned for individual installations.

I'm using CadRail's layers to record information. Here I've recorded feeder positions (in red) and turnout servo positioning data.

I’m using CadRail’s layers to record information. Here I’ve recorded feeder positions (in red; turntable area not yet built) and turnout servo positioning data (green). The two positions are “S”, straight or Mainline; and “D”, divergent.

The goal is to have the points firmly pressed against the rails at each end of their travel, without making the servo work so hard it gets noisy. A light hum while the servo is holding a position is OK; but it should not become a loud buzz and the servo should not feel “buzzy” to the touch. Try moving the turnout manually – you should get resistance to moving the points against the servo, but the flex of the music wire should still be evident. Tinker with this for a while and you’ll start to get a feel for it.

Next step is a big one: install the turntable mechanism, install the Roundhouse base, lay track, and so on. Until then, happy railroading!

 

 

 

Update

Happy Independence Day weekend to my US readers. Well its been several months where time for railroading has been limited. Top of the list, our nine-year-old beagle developed serious back/neck problems a few months ago that ultimately required surgery.

Lewis the beagle; 2 weeks after back surgery.

Lewis the beagle; 2 weeks after back surgery.

Little fellow is recovering and doing well with his rehabilitation program–exercises given to us by the specialty vet. Things like stairs are going to be a problem for him for a while, so he won’t be joining me in the layout room, as he usually does, in the near future.

Even so, I have some L&NC construction news along with updates on on-going projects.

 

ACS712 – How Low is Low Current

ACS712 Board

ACS712 Board

I’ve been exploring the limits of low current sensing with ACS712 sensors. Sparkfun markets a sensor board combining an ACS712 with an OP Amp that they characterize as a low current sensor. I had no luck calibrating and using that sensor; if someone reading this has used it successfully, please leave a comment explaining how you calibrate and use it.  Additional experiments with Op Amps, including creating a fairly stable instrumentation amplifier, have not been encouraging though I haven’t entirely given up and have a few possible circuit designs yet to try.

The fundamental constraint with ACS712 sensors is that their output noise inhibits current sensing below 20 mA (officially, Allegro says that you can’t detect below 20 mA without a specially designed version of the chip; which they will happily work on for a paying customer). At higher currents, the sensor works pretty much as advertised and can be used with or without filtering. At and below 20 mA it is difficult to tell the signal from the noise without some sort of mathematical filter; the RMS method I use can detect down to around 15 mA with an UNO’s 10 bit ADC.  With a Mayhew Labs 14 bit ADC, I seem to get a little more sensitivity, around 12 mA, using the RMS algorithm.

Below 12 mA noise takes over, at least so far as short term measurements go. So I’ve been looking at data collected over longer time periods and have a preliminary method that can discern a low current signal down to around 8 mA.  In essence, a low current change causes the long term output noise range to shift up or down depending on whether the current is increasing or decreasing. Capturing this range shift should improve practical detection sensitivity considerably. Its promising, but I still have kinks to work out of the system.

Is 1 mA sensitivity—the holy grail for detecting a single 10k resistor wheelset—possible with an off-the-shelf ACS712 sensor?  Probably not, and that may matter to people who want to use off-the-shelf 10k resistor wheelsets.

That does not make these inexpensive sensors useless. If you don’t mind making your own resistor wheelsets, then a single 1.5k resistor (assuming one resistor wheelset per car; two wheelsets at 3k—in parallel producing a net 1.5k resistance—one at each end of the car, would be a better idea for a bunch of reasons) will be detectable while still drawing under 1/10 watt (at 11.5 volts DCC n-scale standard; higher voltages allow for more resistance). 100 wheelsets would draw less than one Amp total current. More on that when I get the system operational.

Nevertheless, I’m curious whether a 16 bit ADC will help further resolve the low current signal. I’ll be giving that a try this summer so we will see.

Construction Progress

Laying Track-Bed at the Red Bluff Yard.

Laying Track-Bed at the Red Bluff Yard.

I finished drawing in the track plan, including some additional yard space, on the lower level modules and started in on laying roadbed and track.

Roughed In Turntable

Roughed In Turntable

Roughing in the turntable was fairly straight forward. After preliminary rough siting, I installed the roundhouse base and drew in the track center-lines. That located the turntable center (the intersection of the track center lines), enabling me to cut out an appropriately sized circle to accommodate a pit I’ve already created using a plywood base and styrene strips.

Building the Turntable Pit with Styrene Strips glued to a plywood base.

Building the Turntable Pit with Styrene Strips glued to a plywood base.

The turntable project is a major layout item in its own right and will be the subject of multiple future posts.

Laying Track for the Yard

Laying Track for the Yard

It took a few sessions, but I laid all the lower level track except for the turntable/roundhouse area (which I will do when I install the turntable) and joined it with the helix.

Tracklaying on Lower Level Done.

Track-laying on Lower Level Done.

Track Laid and Ready for Painting and Ballast.

Track Laid and Ready for Painting and Ballast.

For those interested in the nitty-gritty of track laying techniques, I used adhesives rather than mechanical fasteners for all roadbed and track. I use Liquid Nails for projects (water based) to adhere foam to wood, and anything else to foam. For the track I used DAP ALEX clear latex silicone caulk, deploying T-pins to hold the track in position while the caulk cures (just a few hours). What I like most about this method is that once cured the adhesive is completely invisible creating a nice base upon which to detail the track. Now that I’ve used clear caulk for track laying, I can’t imagine using a grey (and definitely not white) product unless the color closely matches the intended ballast color.

I don’t know if you can tell from the photograph of the whole lower level above, but the lighting system using Addressable LEDS that I’ve devised is working rather well (granted the wiring needs  tidying up; I’ll get to that eventually).