Boards in the mail

My order for the RSMC boards came in the mail today.

I love how this works — I upload the Gerber files which define the board layers (copper traces, plating, thru holes, mask, silkscreen, etc) and in a couple of weeks I get the boards in the mail.  In this case, I used the files created by Chuck Catania & Seth Neumann out in the Bay Area, but you can use circuit design tools of all sorts to generate the appropriate files.   I’ve used the Eagle CAD tool, which is free (as in beer) to use when the board is small enough (about 4″ x 3.2″, which is a pretty decent size).

RSMC boards

The order was for 50, but I guess that 52 fit the manufacturers process, since that’s what I ended up with.  Oh, darn, free stuff.

For the record, I use the Seeed Studio PCB process.  I’ve had my cpShield boards made by them as well, which are a CMRI interface shield for Arduino boards, and now these RSMC boards.

I’ve had all of the parts I need for a while now (Digi-key and Jameco ship much faster than parcel post from Shenzhen), so now that I have the Tortoises ready, I can start building the controller boards.

More of the sweet smell of solder….. (blech).


Switch Motors Ready For Use…

Switch motors ready for use...
Switch motors ready for use…

I’ve been cleaning up the boxful of used Tortoises that I got at the last State Fair flea market.   I’ve removed the wires from each one, cleaned up the contacts, and soldered on a header block.  It’s my green frog version of the Terra Cotta Army.

Header Block

These headers are .156″ spacing right angle headers, which are designed to work with Molex connectors.  They work well enough on the Tortoise — whoever designed the board at Circuitron made something that almost, but not quite, works correctly with standard connectors.


I used to use the EDAC connector plugs (available from Greenway), but these are $7 or so apiece, and they only mostly work.   They can be installed off by half a pin or so, which causes them to not work reliably.  They also can slip off due to vibration, since the board on the Tortoise isn’t the same thickness as the plug expects.

I’m going to use the RSMC (Remote Stall Motor Controller) board, which will take a logic hi/lo signal (such as from the Arduino, or a single pole single throw toggle/pushbutton) and swap the polarity on the 12V power to the tortoise.     These board have the matching connector to the headers I just soldered to all of these Tortii.

RSMC ImageI also can wire up the rail power to the RSMC, and I’ll get the correct frog power based on the switch position.  There are additional connectors that I can use for LED indicators on the fascia.

RSMC Installed

I have all the parts for the RSMC boards on my bench, except for the PC board.  I’ve ordered them from Seeed Studio in China, and they’re somewhere on the way between Shenzhen and here.   The total cost of the board, the components, and the connectors will be about $5 each, which certainly compares favorably to anything which uses the EDAC connector.

There’s a different edge connector available in the last few years:


This one fits a little better, but not so much that it really is much better.  It does have the advantage of being easier to use on a circuit board (the Hare, of which I have one for testing, uses this connector).  It’s also a little bit cheaper (about $3 each).

But nothing beats the solid connection you get from the Molex connectors.  Combined with screw terminals for the other connections, I like how the RSMC is fairly easy to replace if necessary, and I don’t think they’d slip off in a Richter 8 earthquake (something my friends in California might worry about, but I don’t here in Minnesota.  Thank goodness for that.)

Maybe I should get started on laying track, so I have someplace to use these sometime soon.


New Arduino code posted

One thing I do besides build & operate railroads is mess around with Arduinos.  These are small low-cost low-power computers that are really good for messing around with.

I’ve designed an add-on board called the cpShield, which is meant to make the Arduino into a general I/O board, mainly for use as a part of a CMRI network for model railroads.  The cpShield has 16 general I/O lines, and can control a single stall motor (such as a Tortoise) or two servos.

There’s also an I2C connection for adding additional boards.   There are 16 and 32 I/O line boards called the IOX16 & IOX32 that I have used.

a cpShield board with an attached Arduino Pro
a cpShield board with an attached Arduino Pro

The blue board is an Arduino Pro (seen from the bottom), while the green board below it is the cpShield itself.annotated2 copy

I’ve also written code for turning this into a node on a CMRI network.

There’s a library called IOLine, which generalizes the notion of an input or output line between the Arduino pins, the IOX extender boards (which do the same thing, but with a different code interface), or internal variables.

There’s another to provide a decent interface to the IOX extender boards, which use an MCP23017 I2C chip.  The library is quite unoriginally called MCP23017.

Lastly, there’s code to implement the node side of a CMRI network.  You still need driver software on a central computer to run the network.

I’ve spent the last few evenings making lights blink with the Arduinos, and have recently updated the code out on Github.

Go, have fun with it


DCC on a Board

I didn’t have a good box for this, or else it would be DCC-in-a-box.

All of my interesting DCC bits are tied together in one place.


This board has three “upstream” connections: 2 x 120V AC (from the power supply brick and the terminal server) and one wired Ethernet (not shown).

Downstream (towards the layout) are connections for:

  • LocoNet (throttle bus)
  • Digitrax Simplex wireless throttle support
  • Rail A, B (DCC input to the circuit breakers that feed the power districts)
  • Programming A,B (with the Programming Track Booster in place)
  • Serial ports (via the terminal server) to the LocoBuffer and to the CMRI bus that will go throughout the layout.

The configuration shown here (except for the CMRI connection) has been built, tested and used for various locomotive projects while I was between layouts.   This makes the wiring of the layout a bit simpler and also makes it easier for me to trust that the basic DCC wiring configuration is good, and that any problems I encounter as I lay track and wire it up is due to the new work and not these components.

Electronics Shelf

I’ve put in a shelf to hold the DCC board.  I’ll have a separate switched circuit under the layout to be able to turn the layout on or off from a single point.   This switch will have a light easily visible from the main room entrance, making it hard to miss if I turn out the room lights and have left the layout on.

If you happen to care, download the DCC on a Board image as a PDF file: DCC on a Board