Model Railway Control

Skill LevelArea of FocusOperating System
BeginnerToys
Linux

This project shows you how to configure the DragonBoard 410c to allow it to control a model railway using DCC (Digital Command and Control) and open source JMRI software, via a USB/DCC interface. In this particular case, the focus is on controlling the track and signaling, but the codebase also includes the ability to program DCC locomotives.

As a hobbyist, it would be great to have a seamless, extensible, computerized way to manage a model using the DCC standard. The desired outcome was to enable track and signal control (with UK, US, German and many more signaling styles), and to have a system that will enable a move into digital locomotive control, and also remote control via a mobile phone. The system has the potential to support automatic signaling based on train detection, but this requires additional hardware.

Materials Required / Parts List / Tools

Source Code / Source Examples / Application Executable

Additional Resources

Build / Assembly

  1. Modify the box to fit the DragonBoard 410c. It can be fitted to the lid, with the first pair of holes 20mm from the edge to allow for the connectors, and then cut a slot on the main edge to clear the connectors, and a smaller one on the rear for the power connector.



    Mount the board using the M2.5 screws and pillars. (Note: alternatively it may be possible to get a suitable box 3D printed).
  2. Unpack the DragonBoard 410c and optionally check it with its initial Android software (all DIP switches off), and supplied power supply (via a mains adaptor as necessary). Use a modern HDMI TV or monitor for this step..
  3. Create a linux (Alip) boot micro SDHC chip as described here on a Windows or Linux PC, (with the micro SDHC mounted in an SDHC holder)
  4. Insert the microSDHC into the DragonBoard and power it up with DIP SW 2 On.
  5. Linux will now be loaded onto the DB in place of Android. Once the power up sequence has completed, you can shut down and turn off the board. Remove the SDHC and turn off SW2.
  6. At this point you can also swap the HDMI TV for your intended monitor.
  7. Power up the DB and configure the Wi-Fi to suit your network.
  8. Set up the hardware as shown:



  9. Use the browser to go to the JMRI site. Download the .tgz file, and place it in the home/linaro directory using the file manager.
  10. Click on the TGZ file and extract the contents (keeping the directory structure).
  11. Optionally configure a shortcut to the script files that you will need (in particular DecoderPro), or use the file manager to open a terminal window (in home/linaro/JMRI) from which you can start the script.



  12. Note (1): It should be possible to replace the keyboard and mouse with Bluetooth versions, in which case the hub will not be required.
  13. Note (2): For tidiness/compactness, it should also be possible to use a touch screen in place of the monitor, mouse and keyboard.

Usage Instructions

  1. To run the code open a terminal window and start the DecoderPro script. On the first time you run it, you will need to set your preference – set SPROG DCC for the system type and DCC Command Station for the device.



  2. The screen should enter the DecoderPro screen. Turn on the SPROG output, with the “power switch” on the top right of the screen. This will go green, and one of the LEDs on the SPROG will start to flash, showing that the output is “live”.
  3. From this point you can configure DCC locomotives, or open PanelPro to create a layout panel via a “drag and drop” editor. This will allow you to control signals and turnouts, by clicking on their respective symbols on the screen.



  4. Use the tables options to enter signal and point DCC assignments and include them on the panel (numerous different signaling system styles are supported, and also various DCC decoders).
  5. Once you have set up your panel plan, clicking on each device with the mouse will change it to the next aspect or switch the route.
  6. Be sure to save the panel .xml file using a name of your choice before shutting down at the end of your session. This file is kept in .JMRI, and will be needed if/when you update to the next release.