L&NC Update; Running Lots of Turnouts

Its been a long stretch where there has been too much going on in real life and little time to write about model railroading. But I’ve been working away on the first module of the L&NC and have made lots of progress, so there’s plenty to write about.

This module has nine turnouts, presenting resource management problems that would arise in any substantial yard or staging facility. If you are familiar with the servo library then you know that you are limited to about 10 servos per microcontroller. With that many servos, your microcontroller will have few resources left to do anything else. This post will focus on a solution that problem, expanding the number of servos and other PWM devices a single microcontroller can manage.

Progress Tour

But first, a quick overview of progress to date.

Here’s the module in its current state:

Progress on the 1st Module as of June 2017. Fascia and dressing up of the edges will be the very last step; its pointless to do that while I’m disturbing things with new features and gear. Wires hanging out the pipe at the bottom of the photo are Anderson Powerpole connectors (track and master power) to the upper level.

As you can see I’ve done quite a bit of detailing. I realized early on that I need to complete all the basic scenicking and detailing of the module before moving on to the next. The big reason is having the module alone on a work table gives the best possible access, especially for electronic or animated items that require access to the underside. That’s not to say detailing will not continue after I move on to the next module, but it will mostly be passive rather than active elements.

By the way, if I were to build a room-sized layout, I’d use a modular (some call it “sectional” because you build it in sections) approach to construction even though the layout would not be portable. After laying mainline and other track spanning sections and cutting gaps between sections, I’d pull each section and do most of the remaining work in a work area under optimal conditions. When ready its just a matter of returning the section to its place in the layout and (literally) plugging it in.

Lets take a quick tour of some details so far.

Roundhouse / Turntable

If you’ve read the previous posts about the Roundhouse and the Turntable, you know these have been long term projects.

The turntable rotating beacon comes on whenever the turntable is in motion.

Then stove fire simulation inside the hut is visible through the door. It’s managed by a little PWM code that will the subject of an upcoming post.

The parking lot side of the Roundhouse has been enhanced with Rix power poles and some EZLINE power cables (which comes in two thicknesses and several colors. I use fine, and chose green–old copper–for its visibility). I fabricated a simple power connection and breaker box for the roundhouse out of a piece of styrene and a brass rod, and an EZLINE cable.

A Woodland Scenics light pole casts a pleasant white-yellow light over the parking lot in night mode. Figures, such as the worker (a Woodland Scenics prepainted figure) at the turntable end of the parking lot breath life into a scene.

Having gone to all the trouble to light the Roundhouse, I’ve started populating the space with some appropriate gear and figures.

A view of the lit Roundhouse interior.

Red Bluffs Yard

The Red Bluffs Yard area has its first structure — a fully lit Yard Office — plus a pickup truck with lighting passing by on the adjacent road.

The Red Bluffs Yard Office is fully lit for night operations. The Woodland Scenics light pole works just fine with my Duino Nodes controlled by an Arduino; treat it like any other 20 mA LED. The truck tailights in the background are from LEDS placed in the rear wheel wells, with the light allowed through tiny holes in the fenders.

Its amazing what a couple of SMD LED headlights can do for a really basic pot metal pickup truck kit from Micro Engineering.

The first of three planned scratch built Signal Bridges has been erected to control one of the approaches to the yard interchange.

And, finally, here is the underside, which is rapidly filling with gear supporting the layout above. This module, with its yard, multiple main tracks and turntable is one of the most electronically “dense” parts of the layout plan, to be exceeded only by the city scene planned for the upper level — that is going to be quite a project and I can hardly wait to finish the lower level and get started on the top!.

The underside of this module is rapidly filling with gear. Obviously overhead soldering is not an issue since I can put the module on its side. That said, I rely primarily on screw terminals and crimped fittings for connections.

PWM Drivers for Turnouts and Other Uses

Pulse Width Modulation (PWM) is used to output a timed pulse, where the output is on only part of the time. The width of the pulses — the percentage of time the pulse in the on state — is used to control external devices like servos or to vary the brightness of an LED.

Some, but not all, Arduino digital outputs are hardware PWM capable. Some of the PWM pins are SPI pins and the two serial pins, leaving only 5 or 6 PWM pins available for unrestricted use depending on the board model. If you want to make extensive use of PWM, that just won’t cut it.

PWM can also be synthesized with timed interrupts on any pin, which is how the servo library works and why it does not require you to attach to PWM pins. Unlike hardware PWM pins, PWM synthesized with interrupts represents a hidden load on your board that can affect the performance of your sketch.

External PWM Boards or “Drivers”

External PWM drivers allow  you to greatly expand the number of PWM devices a single Arduino can manage. PWM is used extensively in robotics, so PWM drivers are fairly ubiquitous and inexpensive. Aside from expanding the number of PWM devices you can control, PWM drivers allow you to off-load all of the PWM overhead and timing routines to the external device, freeing your Arduino for other tasks.

I decided to try Adafruit 16-Channel 12-bit PWM/Servo Driver for servo control and a couple of lighting applications on this module. Adafruit also sells a similar device in shield form.

Adafruit 16-Channel 12-bit PWM/Servo Driver, assembled with original terminal block (blue) that did not hold up to use. I eventually soldered leads to the underside of the board.

I chose the independent board rather than the shield because it has a number of advantages, not least of which it is chain-able with up to 61 additional boards, for a total 992 PWM outputs. A single chain of these can handle the servo needs of most club and museum sized layouts! A more modest layout could use these for both turnout servos and all lights and lighting effects, effectively centralizing and simplifying control of all connected devices. It uses the shared I2C interface for fast communication without using any regular pins on your Arduino. For more details, and a tutorial, see the Adafruit product page.

Assembling the board was straight forward, though there are a lot of pins to solder. The terminal block in the center provides independent power for the servo outputs (V+ center pin on outputs) per standard servo wiring; independent power is required by servos because of their substantial current draw. LED’s and other devices that draw their power from the PWM signal itself will not use the independent power.  Be warned: the terminal block Adafruit supplies is poor quality—substitute a better quality part or solder power leads directly to the board. The headers on the sides are for input and output, transferring both data and power to subsequent boards in a chain.

Adafruit 12 bit 16 Channel PWM Driver installed and connected to servos and lighting.

Connecting servos is just a matter of having a male->female servo extension the right size, or combining multiple extensions for longer runs. Any robotics supply store should have an assortment of extensions; as does Amazon. I have three different sizes to work with, which has worked well so far.

On the board positions 0 through 8 (1st 2 banks of four, plus the first pin of bank 3) are attached to the 9 turnout servos. Positions 9 and 10 are for headlights and taillights on the pickup truck. Using PWM I can have the headlights go between low beam and high beam, or have the taillights brighten as if the brakes have been applied. I have some thoughts about an animated animal crossing in front of the truck from time to time….

Using Adafruit’s PWM Driver Software

Adafruit’s software library for this device is available from their GitHub site. Using the software you create an object that you then use to control the board outputs:

Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();

Creating the Adafruit_PWMServoDriver object without arguments uses the base SPI address to access the board; any different address has to be specified as an argument (and the appropriate jumpers on the board have to be closed). With multiple boards, you create a pwm object for each board using its unique SPI address.

From there, the PWM pulse is set on any output by calling the setPWM() member function:

pwm.setPWM(pin, on, off);

where pin is the board output (a number between 0 and 15), on sets the point in the cycle when the signal goes from low to high (usually 0, the beginning of the cycle, but it can be another value) and 0ff is a number between 0  and 4095 setting the point in the cycle when the signal transitions from high to low.

With the Adafruit driver board you do not use degrees to set a servo’s position. Instead we use timing “tick” values that control the signal transitions from low to high and back. There are 4096 “ticks” (12 bits of resolution) during each cycle. That turns out to be a good thing. For servos, the correct off tick values (assuming the on tick is 0) range from about 150 (the minimum or 0 degree position) to 600 (maximum position, 180 degrees).

Directly setting the cycle through ticks at 12 bits of resolution confers highly granular control and extra smooth servo motion.  Using degrees for position, as the standard servo library does, results in jerkier motion since a degree represents a lower resolution–between 8 and 9 bits–than the 12 bit resolution of the Adafruit board. For LEDS and other lighting, you can vary brightness from off to full on in 4096 steps, allowing fine control of lighting effects.

If you ask me, the smooth motion you can achieve with this board makes its $14.95 price more than worthwhile.

The only difference in your code between working with the standard servo library and the Adafruit driver, is in the object and member function you use to cause the servo to move. Every other aspect of your code and logic should remain the same.

What’s Next?

More coding, and I promise I won’t make you wait long. In the next installment I’m going to introduce you to simplified Object Oriented Programming (OOP) in C++ with the Arduino IDE. I’ll demonstrate a different way to code that, I think, improves several aspects of working with multiple turnouts, and makes the intent and flow of your code easier to understand and maintain. We’ve done it procedurally; we are going to take what we’ve learned and create some OOP code to do the work using either the Adafruit driver or the standard servo driver (Hint: we’ll use a compiler directive to select which driver gets implemented, making the object itself agnostic on the issue and universally usable around the layout).

Until then, happy railroading!

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!

Adding a Turntable to the L&NC

This is the third installment in a series about the build out of Module 1, lower level of the L&NC. Step 1 was to install the basic wiring trunks and connection points, create track power distribution nodes then connect track feeders to the nodes. In Steps 2 & 3 I tested and corrected the track installation and installed servos at each of nine turnouts. Step 4 on this module is to install a turntable.

In this installment I will be introducing my fellow model railroaders to Actobotics system of robotic parts and supplies. If you are interested in creating kinetic components for your layout or diorama, you want to know about Actobotics.

Where are the Kits?

The plan for the L&NC has included a turntable since the earliest iterations. After all, what good is a roundhouse without a turntable to go with it? Way back when I bought the roundhouse (in the 90’s), Walthers also offered a 120′ turntable kit in the Cornerstone series. I had one at one time, but it did not survive multiple moves.

Roughed In Turntable

Roughed In Turntable

When I went looking for available kits and materials, the old Walthers kit was nowhere to be found and that there were few other choices in N scale. A new motorized turntable kit in N scale from Walters is due this fall.  It looks like a good kit—with an additional module it is USB controllable —but at $349 list price it is unaffordable for my project. In any case, it was not on my radar when I started thinking about turntables. The cheaper Kato, Bachmann and Atlas motorized kits are a little too toy-like for my tastes. As to unmotorized turntable kits, there are few choices in N and nothing in the 120′ class that I need to fit the roundhouse.

So I was going to have to do this from scratch. Exactly how that would be accomplished was a mystery.

The Pit

I always figured I could fabricate a bridge; but the pit looked like a problem only an injection molded plastic kit could solve.

But then it occurred to me that I could make a pit with a plywood base (same 1/4″ material as used to deck the layout frame) and styrene strip material to form the sides.

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

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

Using circle cutting and plunge routing attachments for my Dremel, I cut a 9″ plywood circle out of the base material I had on hand. I cut some .020″ styrene sheet into strips about 3/4″ wide.

I started by adhering a course of styrene around the edge of the plywood circle with medium viscosity gap-filling CA. After the first course was complete and the CA set, I laminated two additional courses of styrene to the first one to build up the thickness and rigidity of the pit wall.

The circle cutter left a tiny brad hole at the exact center of the circle, making it easy to cut a centered 1/2″ hole with a Forstner bit.  Why 1/2″? Because that is the outside diameter of a standard Actobotics bearing for 1/4″ OD tubing. A Forstner bit is precise enough that the hole will snugly hold an Actobotics bearing without glue or mechanical fasteners.

The Bridge

The basic bridge structure was an easy bash from two Micro Engineering 80′ Deck Girder bridge kits.

Two 80' bridge kits provided all the material needed for the basic bridge structure.

Two 80′ bridge kits provided all the material needed for the basic bridge structure.

One kit provided the center section of the bridge girders; the other provided material for four tapered end pieces required to complete the girders. Both kits contributed cross pieces. I found a set of pdf drawings of a 60′ turntable and used that as a guide to creating my bridge. After the basic bridge was assembled, I added a support plate with a 1/4″ hole to receive the top of the 1/4″ OD brass tube I’m using for the main drive shaft.

bridge-with-prototype-plans

The assembled bridge, including the shaft support plate in the center. The prototype plans are for a much smaller turntable, but were helpful nonetheless.

 

Checking the fit of the bridge in the pit.

Checking the fit of the bridge in the pit.

The Mechanism

My original concept for moving the bridge was to directly attach a small stepper motor to a shaft extending through the base from the bridge. A small 400 step (per 360 degree rotation) motor looked promising but there was no way to run wires up the shaft. Same problem with using a servo—most hobby servos are limited to 180 degrees of rotation because of position sensing; servos without stops and position sensing gear can rotate 360 degrees. But servos without position sensing are not useful where accuracy matters. For precision, a stepper motor is the way to go.

To  feed wires down a hollow shaft center for bridge track power and other purposes I have to offset the motor from the drive shaft. That necessitates a geared drive; but also creates the opportunity to to increase the positioning precision. So I started looking at off-the-shelf robotics gear.

I quickly homed in on Actobotics products available from ServoCity.com and Sparkfun.com. Its a very versatile line of structural and mechanical parts with standardized sizing and mounting patterns.

Great Stuff, but you’re on your own….

Unlike a lot of electronics gear for Arduino, Actobotics products do not come with tutorials. One useful exception is Sparkfun’s video on stepper motor mounts which helped sort that out.  Otherwise, its a struggle for a newbie to know what parts you need to get started, much less how they work best together. It doesn’t help that model railroading is not on their list of standard applications!

In the end I simply had to buy a bunch of plausible parts and try putting things together. A few orders later I figured out a mounting and gearing arrangement that works, and can be easily replicated by anyone who cares to try.

The Parts

  1. Actobotics Channel

    Actobotics Channel

    Channel.  The physical core of the Actobotics system are the channels and extrusions from which structures can be created. Aluminum channel comes in a range of lengths—from 1.5″ to 48″—pre-punched with holes that match the standard mounting patterns used in the system. I chose a 12″ channel to serve as the “spine” of the turntable structure to hold the pit, the mechanism and providing the means to mount the assembly to the layout.

  2. Stainless steel 'D' shaft.

    Stainless steel ‘D’ shaft.

    Shafts. Shaft sizing is tricky because it determines what parts can be attached to the shafts.  1/4″ OD turned out to be optimal for what I need.  For the hollow drive shaft connected to the bridge I’m using ordinary 1/4″ brass tube.  Actobotics products are precision milled; ordinary 1/4 brass tubing is not—it  tends to be slightly oversized. To size the drive shaft I chucked it into a drill and, while running the drill at a low speed, used 800 grit emery paper to slim it down to 1/4″ OD. In addition to the bridge drive shaft, I needed two solid 1/4″ D shafts to form a drive train transmitting motion from the stepper motor to the main drive shaft. Sizing was tricky; it took some trial and error to get the desired results.

  3. Bevel gears.

    Bevel gears.

    Gears. I settled on an 80 tooth hub gear for the drive shaft. It is driven by a much smaller 16 tooth pinion gear, providing a 5:1 gear reduction, implying a minimum positioning resolution with a 200 step/revolution stepper motor of .36 degrees. The pinion gear attaches to an idler shaft mounted parallel to the main drive shaft.  Since the stepper is mounted perpendicular to the main and idler shafts, I need a pair of bevel gears to interface the idler with the stepper output shaft, forming a complete drive train.

    Hub gears, with mounting hubs attached.

    Hub gears, with mounting hubs (left clamping, right set-screw) attached.

    Pinion gear attached to a 'D' shaft.

    Pinion gear attached to a ‘D’ shaft.

  4. Flanged bearings.

    Flanged bearings.

    Bearings, Hubs, Collars and Other Minutiae. You will need a bunch of bearings (mine are 1/2″ OD, 1/4″ ID), and some bearing to spacers to go with them. Flanged bearings are generally the most useful.  The main gear needs a mounting hub to connect it to the drive shaft, and that hub has to be the clamping type (set screw type will distort the brass tube). Collars are needed to stabilize both the idler and main drive shafts. Don’t forget screws and a ball-end hex key.

  5. Stepper motor.

    Stepper motor.

    The Stepper Motor and its Mount. Stepper motors are tricky to select because they are all over the map in terms of voltage, amperage, steps per revolution, size (form factor), etc. I chose a 200 step motor from Sparkfun that runs at 12 volts, but a relatively low amperage (.33A), and for which a mount is available. The motor’s shaft is 5mm, so a 5mm to 1/4″ shaft coupler is needed.  Additional parts needed to mount the motor included standoffs, a single channel flat bracket and a couple of attachment brackets. Finally, I needed a bearing block to support the shaft attached to the stepper output.

  6. A Slip Ring. The shaft on the top rotates.

    A Slip Ring. The shaft on the top rotates.

    The Slip Ring. When you look at the strategies in past decades for supplying power to a turntable bridge, you typically see some kind of wiper system for supplying power to moving feeders. Thankfully it is no longer necessary to build such contraptions; instead what you need is a slip ring.  Slip rings have incoming leads on the stationary side, and outgoing leads on a rotating shaft on the moving side. Internally they have a high durability wiper system for transferring power from the stationary to the moving sides. The only downside of the Sparkfun slip ring collection is that it is not configured for the Actobotics system; the mount for the stationary part does not match an Actobotics mounting pattern.  So, as you’ll see, I had to compromise a little to make it work. I bought the 6 wire/ 2 Amp version.

  7. Position Sensors. Stepper motors are very precise. Theoretically, once a stepper driven mechanism is set up and calibrated, positioning should be accurate indefinitely.  But the mechanism could get knocked out of alignment; and there should be some tools to aid calibration initially and to make sure the bridge is in its calibrated position at the start of a session. So I needed a position sensor of some sort. What I decided to do was place a pair of magnetic reed switches at a spot on the pit (behind the wall, out of sight).  One end of the bridge has a hidden magnet that will trip the switches. When the magnet is between and tripping both switches, the bridge will be in position 0, and all other positions can be calibrated from there. It should work …. but we will see.

Step 4: Assemble and install the turntable.

It took several months, and a lot of trial and error, to come up with a working turntable mechanism. So, getting back to the project in hand, it is time to assemble and install the turntable into the layout.

But first, a little detailing ….

The pit after some painting and detailing.

The pit after some painting and detailing.

It occurred to me that once installed the pit would be difficult to detail. So, having disassembled the mechanism to prepare it for installation, I painted the interior of the pit, detailing the circular support/drive rail with cinders and spreading a little earth blend ground foam on the pit floor.  After placing a few weeds, I declared it ready to install.

Underside of the pit, showing the sensors, stand-offs for attaching to the Actobotics system, and a solid shaft I used for alignment during assembly.

Underside of the pit, showing the magnetic reed sensors (bottom), stand-offs epoxy’d to the pit for attaching it to the Actobotics system, and a solid shaft I used for alignment during assembly.

Here is “the big picture” of how all the parts go together:

The completed turntable mechanism, with mounting blocks attached.

The completed turntable mechanism, with mounting blocks attached.

The mounting method may seem complex, but it is necessary to minimize the space occupied by the mechanism. My early attempts, which required putting the main gear beneath the channel, were too tall for the available space. Putting the gears between the pit and the channel turned out to be the most space efficient arrangement; the only one that allowed enough space for the spinner. With this assembly installed, there remains 1/2″ clearance between the spinner and the table top the layout is resting on. Excellent.

Turntable drive detail.

Turntable drive detail.

You’ll notice that the output side of the spinner is slightly off-center relative to the main drive shaft.  The output shaft of the spinner it too large to fit inside the brass tube, so it has to be mounted independently. As I mentioned above, the mounting holes on the spinner do not match the Actobotics mounting system. However, I found that I could anchor the spinner using two of the three mounting holes; the trade-off is that it is not perfectly centered.

Is this a problem? Probably not.  The turntable moves slowly, so the wires should not be unduly flexed by the off-center mount; the output side spins freely, so little stress will be exerted on the wires.  As always, of course, we will see under actual use conditions.

The turntable from below after installation.

The turntable from below after installation.

The installed turntable, ready for the next stage of build-up.

The installed turntable, ready for the next stage of build-up.

What’s Next?

Next step is to lay the remaining track for the roundhouse/turntable area, build up the rim of the pit, then build the deck and central arch of the bridge and finish bridge wiring. From there its on to the electronic controls and the initial calibration of the system. Along the way I’ll also be doing the basic scenicking (a little sculptamold, paint and ground foam) of this zone while I have easy access without taking the layout apart.

Until then, happy railroading!