DCC++ Update Project 2020

FlightRisk Feb 16, 2020

  1. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    @Dex I tried the installer and it wouldn't work for me. Is there a log generated. A couple of points:

    1. I think the window should be smaller. I know we have graphics on there when it loads, but it still seems a bit big. I think we need a different graphic, perhaps a shaded blurred background for depth and then a smaller logo. Maybe the original one we were using, but it could be this one. We should standardize so we aren't confusing people. The original is done in InkScape for vector graphics. I really should fix it in that I couldn't get holes filled so just added shapes. If I put another layer, trace it, fill it and delete the old layer, it will be better. I can find a free background.

    2. The progress bar could be larger. Especially because the window is so big, it is off my screen at the bottom, so I didn't even see the bar there.

    3. Can the left menus be a little prettier and obvious that they are pulldowns? They don't look like what people are used to. Or many what I am used to ;) Just a thought for discussion. I'll look at it again.

    4. I already have a full install of PlatformIO. I scared me a little when it said installing that. Could it interfere with my development version? Or does it install a runtime in whatever folder I install the installer in?

    5. There could be more info as it is working or at least warn me what it is going to do before it does it. It installs Python and PlatformIO. How, where? Will it mess anything up? How much space will it take? Maybe I want to stop and forget that and just use another method to install at that point.

    6. No escape button. There should be an escape and undo. I tried to get out and just had to X out.

    7. The first run through I tried to watch the installer progress and really couldn't follow if it has started or not or where it was because it seemed to hang on PlatformIO. I did have PlatformIO running. Not sure it that had anything to do with it. It just "crashed" with no error or warning. The window just went away.

    8. I tried a second time after looking to see what it installed in the temp folder I put it all in. When it got to the installing PlatformIO again, it just sat there. I waited about 6 or 7 minutes and just X'd out.

    Hope you can help. Thanks!

    Fred
     
  2. Jack Regan

    Jack Regan TrainBoard Member

    22
    12
    2
    How can I help
     
  3. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    Hi Jack, the big thing we need help with now is organization. There is a ton of information spread all over the internet in terms of instruction, photos, diagrams, etc. It would be nice to distill that down into something manageable. Our idea has been to have "quick start" guides for simple setup for an Uno, for a Mega, for a Nano and then adding networking, a display, etc. Then have a more detailed software manual, and finally a technical reference guide that goes into a lot more detail about the software and hardware. It is almost a "where do we start?" kind of thing.

    Of course we also have development of the software and hardware. What features do we need? How do we implement them? What new things are coming? Do we need to add support for new products? Do we create a new, custom motor board? And of course we should point to other systems that may provide features beyond the scope of DCC++ EX. Here is where we are discussing documentation. @Keith Ledbetter has started to take a look at this as he has time:

    https://www.trainboard.com/highball/index.php?threads/dcc-2020-update-project-documentation.130401/
     
  4. Jack Regan

    Jack Regan TrainBoard Member

    22
    12
    2
    Over the last several months I have been combing the net gathering information to achieve what I'm looking to to. I'll attach a couple files I have found that have modified Gregg Berman's sketch to run on a Mega2560 with built in WiFi. Well, maybe not. I do not see a way to attach the files. I will see if I can embed a video of the direction we have been going. It shows 5 nodes being controlled by a master with pushbuttong but then seperate wireless push buttons.
     
    FlightRisk likes this.
  5. Jack Regan

    Jack Regan TrainBoard Member

    22
    12
    2
  6. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    Great Jack! We can look at that. You can also make a pull request to the website repo where we have started just filing images and things to sort through. https://github.com/DCC-EX/dcc-ex.github.io

    We already have esp8266 network support by programming one with a sketch in our main repo (thanks to @Atani) and then attaching it to the Arduino. It will be interesting to see how the code differs. https://github.com/DCC-EX/BaseStation-EX the DCpp_esp folder. You can see the code that hooks into it in the DCC++ EX Code. You select communication option 4.

    I saw that clone board with WiFi built in and it looked like a great thing to try, but I wondered that since it isn't a genuine Arduino project, what happens if that company stops making them? Still, we should look at it since it is simple. No wiring. I'll have to see how you program it, if it has its own connections or what since you are programming 2 separate controllers on one board.
     
    Last edited: May 7, 2020
  7. Jack Regan

    Jack Regan TrainBoard Member

    22
    12
    2
    Progrsmming to board is not tough. It has an 8 position dip switch and you position the switches to determine what the USP port is hooked to. Then it has a setting to connect the ESP8266 to the mega by com 3 on the mega
     
  8. Jack Regan

    Jack Regan TrainBoard Member

    22
    12
    2
    I have a couple images of the Mega2560 with WiFi. One shows the location of the various switches on the Mega and the other lists the correct dip switch settings to upload and use the board. I did not know how to upload to github so I'll place them here.
     

    Attached Files:

    KC Smith and FlightRisk like this.
  9. Gregory Gee

    Gregory Gee TrainBoard Member

    10
    2
    5
    Hello all, new to this group too. I just tried the BaseStationInstaller and wow was it amazing. Plugged in a UNO, ran the installer, chose the board and shield, and away it went and installed. I haven't tried it out yet, but thus far I am quite impressed. I have installed DCC++ on another UNO I had, but that was the more manual way with IDE, etc. about a year ago. So just want to say thanks for the great work. I have a few questions.

    1. Not that it is installed, if I ran the installer again, does it try and do an upgrade or should I delete the folder and unzip to install again?

    2. I installer the EX version. Is there a page that explains exactly what is new in this compared to classic? I've been to many pages with pieces of information about it but not a clear view.

    Thanks,
    Greg
     
    Atani and Dex like this.
  10. Dex

    Dex TrainBoard Member

    55
    30
    5
    1. I just used the images that we had provided from others i was also trying to make the window big enough that the wiring diagrams could be easily seen

    2. If you maximize the window the progress bar is a lot begger

    3. Are you kidding me right that that is Material Design lol its always pretty

    4. You are using the older version of the installer make sure you grab the latest one but also it never installs so you have nothing to worry about

    5. See number 4 the entire installer was supposed to be self contained into the same folder so as to not interact with anything else.

    6. To cancel i am assuming that is a good idea but also remember that this is being handled asynchronously so it doesnt interfere with the UI and made stateful to work that way as well

    7. Yes the first version PlatformIO was the bane of my existance which is why it required admin as i was trying to get it installed but again it didnt work. So the new version since it was reverted to using the arduino IDE it should compile properly using that

    8. Yes again see number 4 PlatformIO install was a major bust and never worked.


    I other words use this version as it fixes most of the bugs with PlatformIO and allow for easy fast install of DCC-Ex or DCC-Classic :D

    https://github.com/DCC-EX/BaseStation-Installer/releases/tag/alpha-1.2
     
  11. Dex

    Dex TrainBoard Member

    55
    30
    5

    1. The installer is self contained you will only need to download the new version when we release one. The installer should also grab the freshest code directly from the repo everytime you Compile and Upload which will make testing the new features very simple. I will be adding more functionality soon.

    2. For info on that we dont have a comprehensive changelog yet but you can always read commit messages here:
    https://github.com/DCC-EX/BaseStation-EX/commits/master
    That link contains the latest info about what code changes have been made and again like i said in 1 latest code in master is grabbed every time you hit Compile and Upload
     
    FlightRisk likes this.
  12. Jack Regan

    Jack Regan TrainBoard Member

    22
    12
    2
    If I may ask a couple questions, I have uploaded onto a Mega2560 with built in WiFi, the sketches needed for DCC++. The part that is on the Mega is of course based on Gregg Berman's sketch for the mega and uno. The part that is on the esp8266 is a modified ethernet version that is made to communicate via the serial port connection between the mega and esp8266. They up loaded successfully, I can connect to the network and on boot up the mega sows the pins connected properly. To use the program I need to connect a JMRI client to the esp8266. I tried Engine Driver downloaded from jmri.org and it connects but does not go past the connect screen. I have a feeling that it is because I am doing this on a router not connected to the internet. Does anyone know of a jmri client that does not need to be connected to the internet?
     
  13. Atani

    Atani TrainBoard Member

    1,466
    1,736
    37
    None of them require internet, they just require knowing where the DCC++ side is to connect to. EngineDriver may be relying on mDNS to find the DCC++ setup, something I've never managed to get working reliably. I would recommend using the "DCC++ over ethernet" or whatever they have renamed the network connection to and specify the host/ip of the ESP8266 and use port 2650 (default for JMRI and DCC++).
     
    esfeld likes this.
  14. Jack Regan

    Jack Regan TrainBoard Member

    22
    12
    2
    I'll give that a try Mike and Thanks. I did find it strange that Engine Driver asks for the IP and port and then connects.
     
    Atani likes this.
  15. Jack Regan

    Jack Regan TrainBoard Member

    22
    12
    2
    Over the Last several weeks I have been attempting to find a DCC++ system that I could use to not only control locomotives using the motor shoield but to control other aspects of the layout by interacting with existing protocols. What I have found is other then Mike Dunston's complete re-write, Gregg Berman's original work is the basis for most systems. That speaks to the quality of his original code. What has surprised me is the lack of interfacing sketches. I was looking for a way to use a Kindle Fire which supports Java. It connects but fails to parse information. Likewise, the other available systems have limitations. WiThrottle is for Iphone and Ipad only. Microsoft Train Throttle only works on phones, Xbox and windows 10 equiped tablets. DigiTrainspro and WebThrottle must use JMRI Web server which has to be loaded before the sketch. And that's all that's out there. I see this as a weak link for newcomers. The flexibility of upgrading into DCC++ from the existing environment. Just my random thoughts after a stormy night in Missouri!
     
  16. Ash

    Ash TrainBoard Member

    106
    67
    8
    I started reading this thread a while back. Sumner's pages were a significant help in getting started.
    http://1fatgmc.com/RailRoad/DCC/page-1.html

    Used the DEX installer (selected Classic) and then JMRI on RP3 model B. Seems to have worked on my clone boards (UNO/Motor Shield), but I am now looking for a few next steps:

    1. Initial testing. When I watched a video of a manual install of the UNO, I could see the lights turn on/off on the motor shield with commands <1> <0>. So I am looking for something similar to do from JMRI. (I don't yet have track installed or a DCC loco for testing.)

    --- found it ---
    From JMRI, PanelPro, DCC++, "Send DCC++ Command"


    2. Accessory controller decoder. I plan to use a Mega and some 16 channel PWM boards PCA9685 to control the servos for turnouts, along with some lights/sensors/fascia buttons. Looking for some ideas on where to begin.

    [This seems be an integral part of a DCC layout; perhaps Sumner might add a page for it.]
     
    Last edited: May 15, 2020
  17. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    @haba Can you explain this? What do you mean by an offset of 4? I noticed that if you use the formulas to compute a 2 part address, they are wrong. They are off by 4. Example:

    this formula...
    int sw_address=1275;
    sw1=(sw_address+3)/4;
    sw2=(sw_address-(sw1*4))+3;

    gives 319,2

    Use this formula to reverse check it:

    N = (sw1 - 1) * 4 + sw2 + 1;

    N=319

    That gives: 10111111 10111101

    2s complement bits 4-7 and we get 100. Stick that in front of the 6 bit address:

    100111111 then add the 10 for the 2nd byte port address from bits 1 and 2 and we get:

    10011111110 but this is 1278, not 1275
     
  18. Brian Innes

    Brian Innes New Member

    2
    0
    1
    Hello everyone, new here and new to the hobby, so trying to get my head around all the protocols, standards, commercial products and open source projects available, which is certainly turning out to be a challenge. Looking at the NMRA standards for DCC and LCC and how some of the commercial products deliver functionality I am trying to work out what the goal of the DCC++ 2020 update project is, how it relates to the DCC standard and the LCC standard. It looks like the LCC standard, which should provide the control and feedback for laylout technology (turnouts, signals, block detection, .....) isn't widely adopted in practice with virtually no support in commercial products, although OpenMRN libraries are available with active updates and there are some open hardware designs available. In theory it looks like a setup could be DCC++ on Arduino Uno/mega with motor shield, OpenMRN on ESP32 or STM32 based boards and then JMRI on something like a Raspberry Pi providing the config and control interface with Android/iOS apps providing throttle controls.
     
    Last edited: May 17, 2020
  19. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    Hi Brian and welcome. Your answer:https://dcc-ex.github.io/

    For most people with a home setup, you would never need anything beyond DCC++ EX, though you might want to expand. You can use a Raspberry Pi with JMRI for a front end and use one of the easy methods to connect a throttle, like using an App on your phone. LCC can be used instead of DCC for the accessories if you want to take that off the rails and just use DCC for loco control. A club running 50 locos and 200 lights, turnouts, signals, etc. might want to take the accessory control to a different bus because you can only send so many commands per second. So our recommended system is also on the link above (Mega, Arduino Motor Board, RPi for starters). What scale will you run? Power requirements will dictate what kind of motor controller you will need.
     
    KC Smith likes this.
  20. Brian Innes

    Brian Innes New Member

    2
    0
    1
    Thanks for the reply and the info. I am probably going N-Gauge, but that is still an open questions. I've set up a small N-Gauge test track to validate and test out the various technologies I am investigation. One of the key drivers for my layout is to allow automatic control of trains that I am not driving, to add more interest to sessions. I plan to implement block controls and 4 aspect signalling across the layout. I will run out of pins on an arduino and need a way for the control application to get notified of all the signal/turnout changes - so LCC seems like a good way to go or pick one of the commercial available systems - but prices of commercial systems soon mount up with high levels of automation on a layout and many of the systems result in lock-in to a specific vendor proprietary bus and protocol technology, which I'd like to avoid. I'm currently looking at DCC++ to be the controller, primarily to control rolling stock, but don't think it currently supports all the DCC standard? I would be interested in getting the DCC++ 2020 update project to look at section S-9.3.2 DCC Basic Decoder Transmission of the NMRA spec to allow decoders to respond to DCC messages and provide information, such as loco ID to the block detectors. This would help with the automation side of the project, but I think I have a lot more investigation work to do
     

Share This Page