Build a DCC++ base station

Placed on

Installation base station software

Download the base station software from the GitHub repository (Go to "Clone or download" and click "Download ZIP"). This ZIP file contains a folder named BaseStation master containing DCCpp_Uno. You must place this folder in the libraries folder of your Arduino IDE installation. Usually this is in C:\Users\\Documents\ Arduino \libraries.

Now open the Arduino IDE (if you already had it open, you will have to restart it) and go to File -> Examples -> DCCpp_Uno. Clicking on this will open a new window with multiple files. Now open the file Config.h. There you must enter the correct settings for your hardware. Here there are two main options:

  • MOTOR_SHIELD_TYPE: Indicates which motor shield you are using. Enter "0" if you use the Arduino Motor Shield, or "1" if you use the Pololu motor shield.
  • COMM_TYPE: Indicates which mode of communication you are using. With the Arduino Uno you can only use "0", or Serial communication. However, if you are using an Arduino Mega and have an Arduino Ethernet/SD Card Shield mounted on it, you can also select "1" to use it for communication.

Once you have filled in these options correctly you can upload the software. Make sure that you have selected the correct board type and COM port under "Tools".

controller software

The easiest way to control the base station is via the DCC++ controller. To use this, you must processing have installed. Since installing Processing is not very complicated, I will not go into that. To use the controller, you must of course download it first. This can be done again on the repository page under Clone or Download -> Download ZIP. This ZIP file contains a folder called Controller-master containing DCCpp_Controller. In that folder you can open the DCCpp_Controller.pde file with Processing.

Once you open this, the rest of the files should automatically open in the same window. Navigate to controllerConfig.pde and go to line 298. Here you see how the "cabs" are defined. There are 7 cabs set by default, with numbers 2004, 622, 8601, 54, 1202 and 1506. The numbers your locomotives/decoders have are probably different. You can therefore change the number penultimate parameter. For example, if you want to change cab 2004 to cab 30, do the following:

You will see that you do not need to change the name of the variable, "cab2004". Only the penultimate parameter.

Below you will also see a few lines in which the functions of a locomotive are defined.

In my case, the "Taillight" is actually a flashing light on the top, so I replace it with "Warning light". Of course you have to try this yourself.

From line 375 the layout is defined. Because the way to change this differs very much from person to person, I will not go into further detail here. With a bit of programming experience this should work: you can also see how the Track objects work in the dTracks file.

Once you have opened the program (by clicking the "play" button at the top left) you can connect to your base station by pressing S, then Scan and then select the correct port with the arrows. You can find all shortcuts by pressing H. To start driving, you must first turn on the power by pressing the power button. You can then click on the button of a locomotive and determine the speed.

Does not it work? Check out the "Troubleshooting" page

Current Page 3. Software 1. Introduction 2. Hardware 3. Software 4. Resolving problems Posted by Website I am a software developer, but I am also very interested in electronics.


Webwinkelkeur Kiyoh Trustpilot Opencircuit