How does it all connect up?

A couple of questions have been asked about how i all hangs together, so this post lists out all the modules and what connects to what.

Central Command Software
This runs on a Windows 10 PC and is written in .NET.  It is responsible for making all decisions about trains and points, and in future will also cover signals.  The windows PC is connected to my home network, and does not physically connect to anything.  The program i call "Rail Relay" sits there waiting for connections from slaves.  Slaves are either point controllers or the DCC controller.  Sensors are dealt with by the points controllers.

DCC Controller
The DCC Controller is DCC++ powered by an Arduino UNO and a 43A H-Bridge.  This just looks like a circuit board and has no human interface at all.  Train commands must be sent to it over a 2 wire serial connection.  Most people use a bit of software like JMRI, but I talk to it directly from my software.  The Arduino UNO doesn't have WIFI or Network Connectivity so I buddy it up with a Serial-TCP Adapter and a TTL-RS232 adapter.  This is possibly overkill and I could have just used an ESPDUINO, which I may change to in future.

Points Controllers
These are ESPDUINO boards which are just like an arduino but have built-in WIFI.  Once powered up these connect to my home WIFI network, and then in turn connect to the central command software using a TCP Socket.  Once connected they listen for commands.  Points controllers also listen to their serial port for any commands coming from a slave sensor controller.  Note that I am not using DCC here at all - the command software talks directly to the points, and DCC is used for trains only.

Sensor Controllers
These are ARDUINO MEGA boards which come with 52 digital pins - perfect for running up to 50 sensors.  But they don't have WIFI so they can't talk to the network, so instead they buddy up with a points controller and send the sensor events through via those.

Here's a photo of a sensor controller buddied up with a points controller, screwed upside down to the bottom of the baseboard.


Comments