Modern model railroading involves all sorts of automation. A typical model railroad layout typical includes at least powered turnouts and signals, along with crossing gates and lights. And most also include occupancy detection, CTC dispatcher panels, and decoupling ramps. Some layouts include various trackside automation features like coal and ore loaders, dynamically lighted buildings, and other accessories, like rotatory coal unloaders and Intermodal cranes to load and unload containers and trailers. All of these things are amenable to computer control. Large and complex layouts and use multiple control devices connected together on some kind of network or bus and can thus send signals to each other to coordinate the automation.
Deepwoods Software provides software to interface the GPIO pins on a Raspberry Pi to event traffic on the OpenLCB/LCC bus and has designed several HAT boards that connect GPIO pins to circuits to interface with various sorts of model railroad devices, including stall motor switch machines, occupancy detectors, and LED signals. Deepwoods Software has built a small demo layout module using a Raspberry Pi 3 along with several of these HAT boards. The demo layout is just a simple main line with a turnout to a spur track. The Raspberry Pi implements a control tower to handle the turnout and the signaling around the turnout.
The Raspberry Pi has 4 HAT boards to interface to various parts of the layout. Each of the HAT boards is under the control of an OpenLCB deamon process (included as part of Deepwoods Software’s Model Railroad System) that maps LCC events to I/O pins:
One SMCSenseHAT. This is a dual Stall Motor with point sense board. It uses 4 GPIO pins to control two stall motors (such as a Circuitron Tortoise) and sense their point position (typically one pole of the DPDT contacts in a Tortoise switch motor). This HAT controls and senses the switch motor on the turnout.
One QuadSSSQuadIn. This is a quad 5V logic input and quad SSR output board, using a MCP23008 I2C I/O extender chip. The four inputs are connected to a quad occupancy detector and one of the SSRs is used to control the lighting of the Mad Hatter Pi shop building on the layout.
Two MCP23017Hats. These are boards with MCP23017 I2C I/O extenders. These boards are used to control the signals, using OctalLEDDriver boards.
Additional boards have been designed, and once built and tested, will become available. All boards will be available as bare boards and there will be projects on Mouser and all boards will have software support from the Model Railroad System from Deepwoods Software.