SPCoast
Railroading on the Southern Pacific Coast

Railroad Shield

From SPCoast

Jump to: navigation, search
RailroadShield 1.0
RailroadShield 1.0
RailroadShield 2.0 as built
RailroadShield 2.0 as built
 Status: Prototypes fab'd and assembled, runs simple OpenLCB sketches, more testing underway...

Below is a prototype Arduino shield for Loconet, CAN and openLCB experimentation. It is based on an earlier rev that only supported CAN and Loconet as part of a custom 'duino stack which was used to build a ControlPoint demo for the PCR Coast Division meet early in September, 2010.

I also spun solderless breadboard versions of the CANBusBreadboard and LoconetBreadboard; the Loconet board works fine, but I have not built and tested the CAN board.

The 1.0 prototype served its purpose - it helped prove out the design pattern of a local control point node that uses a local Loconet to monitor occupancy detectors, turnouts and other "vital" logic as well as control signals associated with the interlocking. I built a small handful of 8- and 16-bit I2C based I/O expander boards (think mini-C/MRI) to make interfacing with control panels and LEDs easier, but the power draw of 30 to 60 LEDs - even at 10mA ea - is almost too much for the simple heatsinked 7805 linear regulator I designed into the main board. Better to use a distributed power supply design, which means another design/fab cycle and more boards in my junk drawer :-)

As in the real world, the control point passed Controls and Indications back and forth along a code line; in the 1.0 demo, I used OPC_PEER_XFER Loconet packets to emulate a code line; the next step is to use CAN/openLCB instead.

The second version of the RailroadShield board is based on an expanded footprint Arduino Shield template so that Decimila, Uno and Duemilanove boards can easily be used with it.

Version 2.0 has hardware support[1] for


The following EAGLE CAD files can be downloaded

   UPDATE 
   I ordered 10x boards from SeeedStudio
   I also placed a Mouser order for all the parts except for 
       the LM317LD, which nobody has in stock and
       the 'duino headers, which I order from SAMTEK
   The board cost $4, the parts come to $30 + shipping.

RailroadShield 2.0 RailroadShield 2.0 schematic


   UPDATE
   The boards came in and I've built up one for testing - the LEDs and Loconet parts work, and I'm trying to understand the openLCB code...

RailroadShield 2.0 PCB RailroadShield 2.0 as built


[1] Let me know if you develop sketches or libraries for the above and I will update this page with links. Better yet, contribute the code back to the openLCB project.

The first batch is out in the hands of OpenLCB developers, and seems to be working well - except for the overloading of D10 by the CAN SPI code, one of the buttons and the ethernet SPI shield... Sigh.

 Update: I rev'd the board to 2.3, with SMT ICs, SOT23-3 diodes and a jumper block for all the I/O interconnects.  
There are a couple of DRC tight clearance problems that I missed:
1) RailroadShield 2.3 PCB DRC Error #1 the DCC connector (J8) pad1 is close to a trace on the top layer
2) RailroadShield 2.3 PCB DRC Error #2 there is a via situated between the jumper blocks SV1 & SV3 (by D6/LoconetRX) that is close to a trace on the bottom layer.

To see if there are problems, use an ohmmeter across the DCC jack - if there is continuity, use an exacto knife to trim the pad away from the trace; similarly, check between "yIO" and "A2" - if there is a connection, fix the bottom layer trace/via short.

RailroadShield 2.3 PCB RailroadShield 2.3 schematic

The following EAGLE CAD files can be downloaded

 Update:  I fixed the DRC problems in the (as yet) unfab'd version 2.4.

RailroadShield 2.4 PCB RailroadShield 2.4 schematic

The following UNPROVEN EAGLE CAD files can be downloaded