DCC++EX Command Station -- Easy quick build with WiFi......

Sumner Mar 31, 2022

  1. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    The following will show you how easy and quick it is to build a DCC++EX Command Station, oh yes also very inexpensive. I show a Raspberry PI that is in the same case with the Arduino Mega Command Station. You don't need it. You can use any computer you have to put the software/sketch on the Arduino. It is easy to also use the same computer connected to the Mega for programming with JMRI'x DecoderPro. Also JMRI also gives you the option to run a phone throttle if it is connected to a WiFi network (I like the Pi as it also creates a WiFi network that can be used but you could also use your home's WiFi network. Enough talk let's build the Command Station.

    Step 1:

    [​IMG]

    You need an Arduino Mega or a clone like the Elegoo Mega that I'm using here. You need a motor shield on the top of the Mega. It will take power from an inexpensive power supply and supply that power to the Program and Main tracks. Then optional, but why not, you need a WiFi shield that goes on top of the motor shield. By adding WiFi you have the option to not have a computer connected at all. Once the Mega is turned on the Command Station supplies current to the two tracks and the included WiFi lets you connect EngineDriver to the Command Station via your Android phone. You can then control trains and turn the track power on off.

    This also lets you take a smaller layout to say a show and you can run trains and it will produce the WiFi connection for a phone throttle.
    You can find a parts list option for the parts you need on the DCC++EX website ( HERE).

    [​IMG]

    I realize that some get concerned when they see an image like what is shown above. Don't let is concern you. It is only a matter of plugging the Motor Shield into the Mega and the WiFi shield into the Motor Shield and adding the two jumpers that also plug into both boards. The only other thing you have to do is to bend one pin out on the Motor Board as shown here ….

    [​IMG]

    There are a couple other option vs. bending the pin out ( HERE ) but I think that is the easiest.

    [​IMG]

    You will wire the power into the Motor Shield and two sets of wires will come from the Motor Shield to the Program Track and the Main Tracks. Almost exactly what you would do with any other Command Station. Not show is also a wire into the Mega (under $10 9v power supply) and a USB Cable from the computer if you are using one also to the Mega (these are standard off-the-shelf cables).

    [​IMG]

    You can mount the Mega on about anything or you can find print files for cases ( HERE on my site ) or....

    [​IMG]

    ... you can find cases on the Internet if you want one.

    So step one above will probably take you less than ½ hour to complete.

    To be continued.

    A link also to this on my site ....

    http://1fatgmc.com/RailRoad/DCC/page-6.html

    Sumner
     
    Last edited: Mar 31, 2022
    drbnc likes this.
  2. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    continued....

    Step 2:

    In this step we will load the DCC++EX software/sketch on the Mega. This turns the Mega into a DCC Command Station. One really nice thing about DCC++EX is that as they come out with improvements and add-ons you can spend 15 minutes or less with this step to download DCC++EX again onto the Mega with the current version.Connect the Arduino Mega to your computer ….

    [​IMG]

    .... with a USB cable (these usually come with the Mega).Go to DCC++ EX ( HERE ) and download the 'Automated' installer program. It will appear in your 'Downloads' folder. Unzip it into a folder just under C:/ as follows:

    [​IMG]

    I use the free 7-Zip program to extract files but there are a number of options. Might even be one on your computer now.

    [​IMG]

    After the files are extract (just a couple seconds) …...

    [​IMG]

    .... open exInstaller (Automated Installer Program) and ….

    [​IMG]

    .... the screen above should show up and after a minute or so you are ready to fill in the boxes and click on 'Compile and Upload'.

    [​IMG]

    In another minute or so it will finish putting DCC++EX on the Mega and that was it. No software programming or anything else that is hard to do. One big plus is that you can come back an do this again any time the guys at DCC++EX have added new features to the software.

    Step 3:

    Lets get this connected to the layout and run trains. If you didn't put the WiFi board or even if you did you need to connect a computer to the Mega with a USB cable and also a 9v power supply to the Mega and an appropriate power supply to the Motor shield on the Mega (I use a 12v – 2 amp for my N scale layout go higher voltage for other scales). This is all straight forward and the two power supplies should cost your under $20-$30 together.

    At this point besides the connection from a power supply to the Motor Shield you should have the Program and Main tracks connected also to the Motor Shield (see the picture further up this page).

    Step 4:

    Options to run trains. You can use one or the other of these two options or both together.

    If you don't have the WiFi shield installed you need to connect to JMRI (free and load it onto the computer connected to the Mega). You run JMRI's WiThrottle through a WiFi hot-spot. Either your house's WiFi or in the case where you are running a Raspberry Pi you can use the WiFi hot-spot it creates. See JMRI's instructions for this.

    If you have a Pi you can download Steve Todd's image file onto a micro SD card and plug it into the Pi. Once the Pi is powered up it will start and automatically load JMRI along with WiThrottle and you are done and ready to connect your phone throttle.

    The second option if you have the WiFi shield on the Mega is the ability to connect without a computer attached to the Mega (although you can do both). Now when the Mega is powered up it will start and become a DCC Command Station and also a WiFi Hot-spot. With an Android phone and the EngineDriver app loaded onto it you can open EngineDriver and it should see any WiFi networks that are available.

    [​IMG]

    First though go to settings on your phone (see above) and connect to the network you are going to use. Either the one JMRI is using or if you have the WiFi shield you should see a network like in the image above (the one created by the WiFi shield). The first time you connect to it you will need the password. It will be PASS-xxxxxx wher the xxxxxx is the 6 letters/number to the right of 'DCCEX_'. You might see a different 6 characters for your network. Use whatever they are and not the ones I've shown. You shouldn't need the password on subsequent connections to the network.

    [​IMG]

    Open the EngineDriver App and you should see a screen like the one above. It sees that the phone is connected to DCCEX_b4ea0d which is the network that has been created by the WiFi board on top of the Mega.

    [​IMG]

    As soon as EngineDriver connects you should see a screen where you select the loco you want to control. EngineDriver has many screen options and you can see up to 4 throttles at a time if your screen is big enough or have the options to toggle through them.Instead of connecting to the WiFi shield on the Mega you could connect the phone to the JMRI network if you have one setup.So in about an hours time you have a DCC++EX Command Station up and running. Not much more difficult than connecting to a commercial one and you will have spent less than $100 doing it.

    A link to this build on my site....

    http://1fatgmc.com/RailRoad/DCC/page-6.html

    Sumner
     
    Last edited: Mar 31, 2022
  3. sidney

    sidney TrainBoard Member

    656
    655
    17
    nice write up. step by step pics are very nice too in helping Thank you
     
  4. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    I've added a parts list and the link to my site is now ( HERE )

    =======================================================================

    --- DCC++EX Command Station with WiFi for Phone Throttles for under $100.00 ---

    Parts List (as of 03-31-22 – Do some searching and you can find these items for $20-$30 less):

    Arduino Mega …..................................................................................................... $24.00 .. ( Amazon HERE )
    Arduino Motor Shield.............................................................................................. $25.00 .. ( Amazon HERE )
    Makerfabs WiFi Shield............................................................................................. $15.00 .. ( Makerfabs HERE includes shipping )
    Power Supply for Mega …........................................................................................ $10.00 .. ( Amazon HERE )
    Power Supply for Motor Shield (track Power)--( More options HERE ):
    12v 2 amp ( N Scale although some use a higher voltage) …..................................…... $10.00 .. ( Amazon HERE )
    14v 3 amp ( HO and other larger scales) .................................................................. $15.00 .. ( Amazon HERE )

    ….............................................................................................................Total ….. $84.00 (12 volt) ….... $89.00 (14 volt)

    Sumner
     
    Last edited: Mar 31, 2022
    sidney and BigJake like this.
  5. french_guy

    french_guy TrainBoard Member

    575
    237
    25
    Very cool and useful for whoever wanted to try DCC++ EX but never thought they could do it.....Now, no more excuses :(
     
  6. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    KC Smith likes this.
  7. Uncle peanut butter

    Uncle peanut butter TrainBoard Member

    155
    179
    7
    @Sumner Thanks for the simple and detailed instructions. I had been trying and failing to get the wifi working for a while now and just couldn't get it right. My mistake was using the entire mac address instead of the last 6 digits and also omitting the PASS_ when entering the password. I have a 7" Samsung Tab3 that runs engine driver just perfectly.
    Now when I wish to run trains I start the Tab3, plug in the command station and away we go. Thanks again for this write up as I was sitting on this wifi shield and just couldn't get it working properly.
     
    KC Smith, BigJake and Sumner like this.
  8. french_guy

    french_guy TrainBoard Member

    575
    237
    25
    I noticed that picture #4 shows "to 9V power supply"on one of the green connectors....Isn't 12V instead (to power the motor shield for N-scale) and the 9V is to power the Mega?
     
    Sumner likes this.
  9. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    Yes it should be 12 volt for the 2 amp power supply that I chose for my N scale layout's track voltage. It would be what ever the output is for the track power supply one chooses. I think I have it fixed....

    [​IMG]

    ... thanks for catching that,

    Sumner
     
  10. rray

    rray Staff Member

    7,706
    5,859
    128
    I have a few questions...Are you able to program a new decoder with the setup above but only using an Android phone? Because I am thinking of building a test loop DCC programmer and want to avoid any and all cables. It's just going to be a small plywood board with 2 loops of track, the whole DCC++EX Wifi/RPI and a battery slot for my power tool batteries. I plug in a battery, and 30 seconds later I use my phone to program then run trains.

    I have a 12V 5A Buck Boost converter connected to my Black & Decker 20VMAX power tool batteries that I want to use instead of wall warts for truly portable power. It gives 12.29V out for a few hours, with the output voltage stable till it just shuts off.:
    [​IMG]

    I can add another buck converter to create the 9V needed for the Mega, and there should be plenty of current left for the motor shield and RPI.

    So my thinking is, I would have the RPI running JMRI, and I would VNC into the PI from my phone to program the decoder, and once programmed, I could run it through Engine Driver.

    The other question is, instead of a phone, can you add a touchscreen/keyboard to the RPI and run that way?

    Thanks, Robert
     
  11. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    [​IMG]

    Robert, above the Raspberry Pi is at the top of the image and the Arduino Mega with a motor board on top of it and the WiFi board on top of that is at the bottom with the track power cord and the Program Track and Main Track outputs off of it. You don't need the Pi if you want to only run trains with a phone throttle and EngineDriver since the DCC++EX Command Station has the WiFi hot spot on the top. Nice if you want to take a module to say a train show and need a WiFi hotspot for your layout. Also at home you won't have to use the home hotspot.

    Keep checking but I don't see a way to use your phone to program a loco but maybe don't know of a phone app that will let you connect the phone to the Pi as a monitor and keyboard. You need the Pi to run JMRI's Decoder Pro for the programming (I'm sure you know this but putting it in here for those not familiar with JMRI)

    [​IMG]

    With your battery power source though you could run it all. The monitor I use above is a 12 volt monitor. I used it and the wireless keyboard and mouse shown above on my boat along with a GPS puck as a chart plotter. Now I use the monitor (with a wall wart -- 110v to 12v) and the wireless keyboard/mouse with the Raspberry Pi which is connected to the DCC++EX (Arduino based Command Station). With that combination I can program engines and run them with a phone throttle or JMRI'S throttle viewed on the monitor. No reason you couldn't also run all of that off your battery pack as you mentioned.

    I just looked at the Pi - Touch Screen options that are now available. Screens look small but if you can see JMRI and DecoderPro on the screen no reason you couldn't delete the small 12 volt monitor I'm using.

    Let me know if that answers the questions,

    Sumner
     
  12. rray

    rray Staff Member

    7,706
    5,859
    128
    OK, Thanks. I think I will build up a RPI running JMRI first, and see if I can use VNC into it with my phone before looking into a touchscreen.
     
  13. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    Are you going to use Steve's image file? That is what I've been using and was quite easy to do and a lot easier than when I use the Pi on the boat and started from scratch.

    Interesting Idea and looks better actually than the touch screen ....



    ... I might try this out with a tablet I have. It has a lot larger screen than my phone. Report back please with your results,

    Sumner
     
  14. sidney

    sidney TrainBoard Member

    656
    655
    17
    hummmmmmmmm
     
  15. FlightRisk

    FlightRisk TrainBoard Member

    522
    214
    12
    Just a note about how much you can do with just a phone. You can of course use any of the many throttles listed here:

    https://dcc-ex.com/throttles/index.html

    However not all of them support programming on the maintenance track. You have to look at their specs. That will allow you to use WiFi or Bluetooth, depending on the throttle. But you can always use a serial monitor (terminal program) to connect to the CS via your phone and an "On The Go" cable. This works just like the Arduino Serial Monitor. It doesn't allow page reads like you can with JMRI, you have to use discreet commands like <R> to read the loco id <W 2445> to write 2445 to the loco address, etc, but it is great if you don't want to use JMRI.

    https://dcc-ex.com/reference/tools/serial-monitor.html#otg-cable
     
    Sumner and sidney like this.
  16. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    Fred I really think that under the EngineDriver throttle documentation there should be a picture or two showing Jimmy's physical throttle option. Maybe along the lines of what I did ( HERE ) ....

    [​IMG]


    [​IMG]


    ... and what he did (maybe get a picture from him).

    Having a physical throttle knob is a big deal for a lot of us and knowing that EngineDriver has that option I think would really add to the documentation.

    Sumner
     
  17. sidney

    sidney TrainBoard Member

    656
    655
    17
    that really is a great throttle control setup. simple easy and best of all it simple works. Well i guess best of all would be that its cheap and works great:D
     
  18. Bruceg503

    Bruceg503 TrainBoard Member

    45
    13
    3
    Great write up Sumner, I followed and have JMRI on a Lenovo 93M tiny computer running Win10 pro, i have it connected to my arduino mega via USB cable, the Mega has an arduino motor shield mounted to it (Vin on back is cut) I supply 12v to it via a Meanwell PS. I have an already programmed Loco (Kato SD70ACe) with a TCS K1D4 decoder. I want to add it to the roster and ask for it to read the decoder and I get Error 308, how ever i can open a throttle on the computer and use 1111 long address and run it just fine. Do I need to have a power adapter connected to the arduino mega to supply more voltage to it?

    Any input would be helpful.

    thanks, Bruce
     
  19. Sumner

    Sumner TrainBoard Member

    1,759
    2,387
    44
    I'd get 308 errors using the old DCC++ but so far haven't with DCC++EX but sooner or later probably will. One nice thing about DCC++EX is they have options to overcome a number of things that can cause 308 errors. Read through the following link and see if it helps .....

    https://dcc-ex.com/reference/tools/diagnostic-d-ack-command.html

    .... I'm using a 12 volt supply and it has been working so you might not need to go to a higher voltage source. One thing I found, even with the old DCC, is that clean track and clean wheels and internal pickups have to be good. I might start there and do a simple clean of the track and wheels with a good contact cleaner and see if that helps.

    If you still have problems open a ticket on Discord ( HERE ). Someone is usually there 24/7 to help.

    Sumner
     
  20. Bruceg503

    Bruceg503 TrainBoard Member

    45
    13
    3
    I think my issue is that I do not have the connection connected for the program track. I was trying to read the decoder from the main track.
    Rookie mistake. will check when i get home from work.
     

Share This Page