DCC++EX & reverse loops

Clifford Aug 18, 2022

Tags:
  1. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    Other thoughts... If your thinking is to use DCC EX as the base and JMRI-PI as CS but concerned about which Pi and its present costs and/or extra hardware, I'd get started with the Mega, motor shield and wifi shield or ESP8266 module and adapter. Install Arduino IDE on your current PC and play around with EX. If you find sufficient a pc can be used for JMRI decoder pro. If not get a Pi or laptop and the most your out is the wifi card, about $10-15 USD as wi-server and wifi services will be handled by the JMRI-Pi(or PC).

    I own an iPhone 8 which, for my old eyes, screen is just plain too small. Spent $50 on a 8" F-Tablet where ED boots and automatically connects, freeing my phone for other things. Running ED on the larger tablet has pretty much dismissed the need for a physical throttle. Another plus is that with a Bluetooth connected mouse on the tablet, the screen is large enough to VNC or remote into the Pi and make simple changes in JMRI or write a basic decoder CV, if inconvenient to connect using other means.

    Agree totally with @BigJake as a good approach too! Especially if you have family members or other devices that are already connected to your network and you wish to control trains from. The SD card copier is a great feature for an image backup and if using Todd's Pi's image with the SMB shares, most of the user configurable files are located in one of the 2 shares, eg panel files, locos files, enabling fairly easy way to backup individual configuration from the Pi to another device or flash drive.

    My Pi 4b is mounted underneath layout and do not want to use a laptop or another large device to run the layout. My recent DCC EX exploration was also to see whether DCC EX and Arduino alone can eliminate the Pi or a pc JMRI for OPS running (Nothing beats JMRI for programming locos). Fewer parts, lower cost, higher reliability, lower power consumption, lighter are primary factors for my layouts so the elimination of the Pi if possible, will be done.

    As the saying... Its your railroad.. Decide on what's important within the budget. Think a case can be made to go pure DCC EX or JMRI-Pi.

    There is a lot of work going on at DCC EX and part with the upcoming EX Turntable (currently in Beta) so DCC EX with additional hardware, like other systems as mentioned earlier by @Sumner, can do auto-reversing.

    Other observations....Adding locos to roster and pushing out throttle labels, JMRI wins easily. Turnout setup, think is a toss up. DCC EX offers 3 ways to control turnouts-solenoid, servo and vPin. Scenery lighting & automation EX wins... Hardware customization-using Arduino DCC EX HAL is sweet. Support DCC EX the best! Personally think backing up DCC EX is easier.

    Highly suggest looking at DCC EX EX RAIL, the command set for automations, routes and sequences and also handling tasks such as turnout control & signaling. The biggest drawbacks to DCC EX is coding, making updates and pushing them out. Also, JMRI has been around a long time whereas believe DCC EX is early 2020.

    Just wanted to share some of the really cool things that DCC EX can do.
     
  2. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    Mark and Jake thanks for all the info.

    I would like to say to those that are looking at DCC++EX and don't feel electronics or computer literate most of what Mark has talked about you might never use or need to know. Don't let what DCC++EX is capable of as Mark has pointed out keep you away from trying it as you never need to use those options unless you want to. The nice thing is that they are there if you want to possibly automate your layout and/or control a turntable or other advance features in the future.

    If you don't want to pursue automation now or make a roster that DCC++EX has stored for use without JMRI running there is no coding. The same for the initial installation of the software on the Arduino and subsequent updates. Connect the Arduino to your computer with a USB cable and run the autoinstaller ( HERE ) and you have installed DCC++EX or the last update with the newest features. Can't get much simpler than that.

    If you want to go further as Mark and many others have DCC++EX has a lot of possibilities of what you can do and you might even be someone that adds to it. If you want to start mainly running trains you can be doing that about as quickly as buying a commercial product.

    Sumner
     
  3. BigJake

    BigJake TrainBoard Member

    3,259
    6,173
    70
    This is such a great time to be in Model Railroading with DCC! There are so many choices for DCC systems to suit most anyone's budget and fancy.

    The off-the shelf choices (available to US hobbyists) have expanded far beyond the NCE, MRC and Digitrax DCC systems that dominated our choices for years.

    Now we see increased adoption of new US and existing European DCC systems that are expanding their capabilities and NMRA compliance.

    List of DCC system manufacturers (in alphabetical order):
    • Digitrax
    • Electronic Solutions ULM (ESU)
    • Model Rectifier Corp (MRC)
    • North Coast Engineering (NCE)
    • SPROG DCC
    • Train Control Systems (TCS)
    • ZIMO DCC
    And to top it all off, we also have DCC systems you can assemble from Arduino processor boards and IO modules, using free software!
     
    Mark Ricci and Sumner like this.
  4. CSX Robert

    CSX Robert TrainBoard Member

    1,502
    638
    41
    There's also:
    • CVP Products (EasyDCC)
    • Digikeijs
    • Roco
    • Lenz
    • Zimo
    I may be missing some others also.
     
    BigJake and Mark Ricci like this.
  5. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    Gee, I’m sorry @Sumner that my responses appeared more advanced or complicated than what was asked. Was really trying to answer the question and not scare anyone away from DCC EX.

    Wanted to share some of those things. Unsure if just running trains and use of the “out of the box” via automated installer materially differentiates it from other systems. Also, and maybe mis-read but also thought some comparative between a standalone DCC EX and combo JMRI-PC CS and DCC EX base was requested. My error?

    While its true I have some basic electronics, computer and networking knowledge, knew nothing about DCC, decoders, JMRI, Arduino, IDE and DCC EX. You and some of the other people who have responded have far more knowledge and experience in DCC, JMRI and MRR in general than I. Moreover, I'm certainly no DCC EX expert either. Actually, almost went with the Pi-Sprog back in 2020 or Digikeijs 5000(though unaware of the product till recently). Generally speaking with all products, think its a good idea to start with the box experience before any changes to defaults to serve as a reference if for no other reason.

    I began with the automated installer for the first 2 setups in Nov 2020 and that would have been more than sufficient as a base under JMRI+P or to just run trains. It was not discovered at first, but BLI’s Paragon 3 decoder, during programming with Decoder Pro in Dec 20, resulted in many 308 errors. The fix, provided by the team, was the addition of a couple lines of code, but it had to be uploaded using the Arduino IDE. That was my first time using Arduino IDE. Unsure if current release addresses and incorporates fix in current version, since there are many mobile decoders with their own characteristics and because the 308 problem seems related to the Paragon 3 decoder according to the team.

    The ability to push out of throttle labels and throw turnouts didn’t occur until March of this year. To me, after setting up a DC or DCC system to run trains (with throttle labels if relatively easy), the following most common functions are turnout control (+signaling) and structure lighting. The Team provided a sample for throttle label creation, I did not figure it out on my own but it was the first time I realized that a JMRI-Pi combo can be replaced by DCC EX to satisfy the 3 most basic and common model railroad functions. Admittedly, my focus on power efficiency, weight, component reduction and cost-benefit effectiveness will play a major part in the approach to a solution.

    The recent DCC EX exploration for lighting control, turnout with signaling, automation and “Joining” or DC operation. The closest I came was how to get a button on the Engine Driver. The code for lighting, came totally from the team, as well as the automations, JOINing and DC OPS. The last programming for me was BASIC on an Apple IIe besides some scripting over the years.

    It was my mistake not to include the simplicity and likeness of the out of the box experience using the automated installer to a commercially produced DCC system for just running trains as the best first step into DCC EX if uncomfortable with electronics and/or computers. Moreover, as @BigJake and @CSX Robert have mentioned, not to exclude from consideration, the many fine commercially made products within one’s budget and abilities.

    I was so excited when progressing thru July and August and hope others try as well. Yeah, could of used other systems, but the low cost of DCC EX and Arduino hardware makes it affordable to experiment without fear to some degree. Sorry, sorta let all the excitement to show people overcome me.

    If anyone wants any additional info, code, would be most happy to provide additional examples but everything, relatively speaking including my knowledge, is truly on an elementary level.

    In the end, I really wanted to share some experiences, the features, possibilities-imaginations, issues, plusses and minuses encountered along the way, from a newbie's perspective, as well as the wish that others can enjoy the fun and possibly find a small part of the content posted useful.
     
    Sumner and sidney like this.
  6. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    Hey Mark I think your post was great and showed how versatile DCC++EX can be but wanted to point out also how easy it can be to get into it. I think there are many out there that could get into DCC using DCC++EX but feel that it is to much like putting together an electronics project, which it isn't. I've tried to convince the DCC++EX team to have a link right on the first page of the site that would take someone to the shortest path to putting together a DCC++EX system.

    I feel for a number of people out there that all of the different paths you can take with it turn them off if all they want to do is to put together a very basic DCC systems to start with. I've tried to do it ( HERE ) but that could also be improved on. There are some good YouTubes that also address getting started like this one.



    The 308 errors with some decoders that you experienced is now handled pretty well in the DCC++EX Documentation ( HERE ) but you do have to do a little more work. At least DCC++EX does give one a work around for hard to program decoders where with some of the more expensive commercial systems you don't have an option in that situation.

    Sumner
     
    Mark Ricci likes this.
  7. BigJake

    BigJake TrainBoard Member

    3,259
    6,173
    70
    Thanks for the additions, Robert (though I did include Zimo in my list).

    They reinforce my point: We have SO MANY CHOICES for excellent DCC systems and products, commercial or otherwise!

    One huge advantage for DCC++ EX is that suitably skilled users can add/refine features to suit their (and others') needs, even while just using it requires no software skills at all. And all users (skilled or not) benefit.

    For example, a feature that the Pi SPROG 3 Plus has, could perhaps be added to DCC++ EX: In lieu of the programming track output, a duplicate main output could be enabled for an additional power district, with optional auto-reverse capabilities. The programming track and additional power district are not fully exclusive, they could be selected by the user. Want to program a decoder today? Disable this option while you have it on your bench. Want to drive a reverse loop or additional power district on your layout? Enable that feature while you have it on your layout. The accessible developer community (and/or code base, if you have the skills) makes exactly these kinds of user-driven improvements possible.
     
  8. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    @Sumner Thank you for the 308 reference. There is so much more DCC EX info on website and Discord than 2020.

    Want to add one other thought before my welcome is worn out on this thread. The other reason for the exploration was to minimize the "loss" of the hobby since my layout was packed up right after Memorial day. Possibly other MRR hobbyists, whether due to a pending move, lack of space or spousal rejection of a permanent layout would like to have a reasonably priced temporary DCC trainset with turnouts and lights vrs an oval or so. Upon finding out about the JOIN command and the use of the power of the B channel for stationary decoders, it occurred that with a low cost DCC EX system, a DS74 or 64 (picked cause they are partially encased), and recycling Kato connectors, one can throw together a single supply, screwless DCC system trainset complete with turnout control + lighting.

    Single Power Supply.. All Connectors.. As far as I've gotten.


    upload_2022-8-21_12-42-37.png upload_2022-8-21_12-46-22.png



    Shared that because it has helped me get thru when wanting to do something in the hobby. Maybe others in the same situation who are following or stumble on this thread can benefit. Time to pack some....
     

    Attached Files:

    Sumner likes this.
  9. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    Yes, think you will find the following of interest. Excerpt from last months Q&A as I was proceeding, and their responses when playing with JOIN and DC options...Was able to JOIN OPS signal from A to B, or turn one or both just PWM DC. Tested and worked on 4.2.0 RC3 This applies to the release candidate with Track Manager and not in current ver.

    On the DCC++EX TrackManager traversing
    A DCC <--> B DCC i.e. dual MAIN is fine
    A DC <--> B DC mode is fine

    These are NOT Allowed or supported but depending on your insulated track layout connections it still may Accidentally happen and that's not Our Fault
    A DCC <--> B DC Do Not attempt to travel across
    A DC <--> B DCC Do Not attempt to travel across

    {unless your using a Undesirable Friends CS and Engine}

    We are planning on supporting DCC++EX 5.0 TrackManagerTM on both the Mega and Uno devices but the Uno will require a USB cable to JMRI WiThrottle Server Interface to operate WiFi Throttles. Our WebEXThrottle will operate on both

    As Development progresses in this thread further down the concept of DCdistrict is enhanced, expanded and renamed to"TrackManager {TM}" ver5.0

    DCC++EX TrackManager TM expands the number of Blocks or Power districts from one DCC main and one DC, to a initial maximum of 8 eight.

    They will be Id identified as Block or Track A, B, C, D, E, F, G, H

    And be Set as a mode of MAIN, PROG, DC, DCX & OFF

    DCX is a DC track just set in the Opposite Polarity for NMRA Standard Modular Layouts for Track B wired as Rails L+ & R-

    Allowing throttle Direction buttons to stay in sync with the the Forward & Reverse direction of the DC Engine.

    In a sense the New TrackManager is a software implementation of a DPDPT switch by allowing a Block or Power district to change waveform signals from DCC to DC to DCX opposite polarity to OFF, by a command or a touch of a GUI button.

    Further down this thread you'll see a sample serial monitor Send commands we ultimately settled on are;

    <=id, mode>

    <=A MAIN> sets A block to DCC Mainline

    <=B DCX 2> sets B block to DC address 2 with Opposite Polarity

    <=C DC 3> sets C block to address 3, or any number you assign 1 to 10239


    And later in the threads you'll see new EXRAIL commands are used to run Automation scripts to change track modes from DCC to DC and back.

    my.Automation.h file

    // SET_TRACK(id, mode)

    SET_TRACK(A MAIN)

    SET_TRACK(B DCX 2)

    SET_TRACK(C DC 3)

    In a EXRAIL Automation script we could assign a Engine switch a track mode to DC and run it's real Cab# on the layout.

    myAutomation.h file

    ROUTE(77,"Set track G to DC 1225")

    SETLOCO(1225)

    SET_TRACK(G,DC)

    DONE

    DCC++EX DCdistrict { Beta design}

    Now your Legacy Analog DC engines can run on a DCC++EX Command Station in a Separate power district or block along side of your normal DCC blocks.

    The new enhancement allows a DCC++EX Command Station to operate the PROG B track in JOIN mode as DCC, and the MAIN A track as DC PWM wave signal with a engine addressed as 2.
     
    Last edited: Aug 21, 2022
  10. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    Well first of all it is not time to be packing any bags;). If you would of I wouldn't of know about....

    I think I understand that and might be interested in it as I have lots of DC eBay bought locos that I need to convert to DCC. In the mean time it would be great to be able to run them on part of the layout as I get track down, when and if that happens. Tried to read some of the discussion ( HERE ) and most is above my head. Maybe you can help.

    1. Do I need to change my 12 volt power supply to say one that is 14 volts?

    2. Is the same Arduino command station (mega) going to produce a DCC voltage on say the main output and also at the same time be able to produce a DC output on what is normally the program track output?

    3. Then I would have to switch that DC power to the section of track where I have my DC loco? I do something similar now with a DPDT switch on my test track and have the DCC command station connected and a DC throttle connected but the whole layout is either DCC or DC.

    4. If I understand it right for all the districts I want both I need physical switches to change them back and forth between the 'main' output and the 'program track' output on the DCC++EX Command Station? But I could now run the DC loco with EngineDriver and not need my DC throttle? Seems to good to be true!!

    Sumner
     
    Mark Ricci likes this.
  11. BigJake

    BigJake TrainBoard Member

    3,259
    6,173
    70
    What I'd really like to see is for the B bus to have an option of DCC waveform, but wherein a fast response to an overcurrent would just reverse B's polarity, then shut off B later only if overcurrent still exists on B. This would implement an auto-reversed B bus (WRT A bus). You do not want to have auto-reversing on both A and B simultaneously; they will both reverse and maintain the short. The fast response is necessary on B to ensure the short is cleared by reversing polarity, before the slower OC on A bus trips and shuts down A.
     
    Mark Ricci likes this.
  12. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    [​IMG]

    I can't see the one plug (right one above) well but is it to plug into the USB port and the other going to be used for the motor shield? If so you might check and see if you can input 12 volts on the usb port. I'm thinking maybe not but I'm not an Arduino guy.

    Sumner
     
  13. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    That would be nice. Have you considered posting on their Discord site ( HERE )? If it doesn't work try the one on ( this page ). With your background I'll bet you find some interesting reading there. Most of it is over my head :(

    Sumner
     
  14. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    Packing for moving... :-( rather be working on trains...

    Yes, absolutely correct. I ran the DC VO as mentioned earlier. The upcoming DCC EX 5 track manager should have it or download the release candidate and have something now to experiment with. A route is built in myAutomation.h, placing a button on ED, and code executes the switch from DCC PROG to DC or PRG TRack to Main Track (JOINS) or any of DCC DC DCX OFF . I didn't get to push out this route but it would be maybe something like this to switch B to DC...

    ROUTE(xy,"Set Track B to DC 1064")
    SETLOCO(1064)
    SET_TRACK(B,DC)
    DONE


    Have many spare USB A B cables and a number of dual output 12V 2A and 5 V 2A power adapters, which is in picture. 12V for the motor shield and 5 V for Arduino logic. There was a 4 pin connector, cut off earlier, on the power adapter. As far as the Arduino is concerned and from a Voltage-Power perspective, it can't tell the difference whether plugged into a pc's USB port or not. Solderd a barrel pigtail for 1 pair and the cut USB to the other pair out of the power adapter for clean, light and portable as possible. If I'm just running trains on a table, I use the 12V & 5V ends, if programming, then the standard a-b cable is plugged into Arduino and PC USB and keep the barrel plugged for the 12V.

    upload_2022-8-21_18-32-20.png

    One can use a single 12V DC supply by NOT CUTTING Vin trace on the motor shield. This is highly discouraged because if accidently a higher voltage power supply used, the Arduino will most likely be damaged. Or, if a secondary power input is connected at the same time. Maximum Smoke Minimum Signal.. I'd most likely use a 9V buck on a permanent layout if eliminated JMRI-Pi to use DCC EX for everything.

    Oh, If I didn't have the extra dual power adapters, would probably re-bridge one of the shield's Vin cut(all mine are cut) and use a single 12V DC for play and temp setups...

    Well, a little more packing left..
     

    Attached Files:

  15. BigJake

    BigJake TrainBoard Member

    3,259
    6,173
    70
    I submitted an issue at dcc-ex.com for the auto-reverse suggestion, since my discord membership process was throwing errors. However, I finally got confirmation of my membership on discord after I had submitted the issue.

    There may be some detection issues depending on how the motor driver board in use detects excess current conditions. Most detect IO current at the bottom of the bridge (so the current sense resistor creates a ground-based voltage to measure). Unfortunately, this creates a problem if there is a short from a high-driven output directly to ground elsewhere, such that the current does not return via the bridge circuit. That was a lesson I learned long ago... To be safe, I suggested reversing bus B quickly anytime an A or B bus short is detected, and see if reversing B resolved it. However, there is a balance between reacting quickly, and responding to transient events that should be tolerated, and go away on their own.

    Anyway, I offered to help with technical issues if needed, but let them know I do not have a DCC++EX setup to test. That's where you may come in Sumner... Do you have a reverse loop you can run from your DCC++EX setup? If not, can you set one up to test relatively easily?
     
  16. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    Thanks for posting that on their Discord site. I think it would be a great addition to DCC++EX.

    My test track doesn't have a reversing section. My main layout will have at least three but they are a long way off from being operational. I could probably put one together on a spare piece of plywood fairly easily though. Let me know how it goes. I get on there about once a week but as I've said before most of it is above me.

    Maybe consider getting the parts to put one together. If you can deal with a month or so wait the mega and motorshield are about $20 total from AliExpress and you might have the rest of the needed parts. I've ordered from them before with no problems (Hate to say that as it might jinx things).

    You would have a backup to your Sprog and I'll bet you would enjoy being involved in development through Discord.

    Sumner
     
  17. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    I saw 12v on the case and didn't look further :(. I hadn't seen the dual 12v/5v 2 amp adapters before. That is a really good idea and looks like you can pick them up for as low as $10 or maybe free.

    I'd probably go that route if doing it again. 2 amps is probably fine for a small N scale layout and for a larger one you are probably going to use boosters anyway so the 2 amps is more than adequate.

    Thanks for the info on the DC option. I need to look into it and see how routing the DC or DCC to a section of track is actually handled. I see the command to set track B to DC. I'm assuming track B is whatever track you physically have B switched to though say different toggles going to different isolated sections of track. Looks like an Arduino controlling mini-relays might be a good option with the track sections showing on a control panel with pushbutton switches to select a track section and LEDs to show what has been selected.

    Don't envy you having to pack. I moved a lot of times and never want to again. Dottie has instructions that when I'm no longer able to live at home to not take me to Phoenix. Haul my a$$ up to the local, not great, nursing home and dump me off there.

    Sumner
     
    Mark Ricci likes this.
  18. BigJake

    BigJake TrainBoard Member

    3,259
    6,173
    70
    Sumner,

    I didn't really plan on testing (or being able to test) the DCC++EX auto-reverse implementation myself. I figured there would be others, including yourself, more than willing to do that because they wanted to use it.

    I submitted the proposal at your suggestion so that DCC++EX could continue to improve for its users. I have no plans to acquire the hardware and use the system, but I certainly see its immense value to others (and even more so with a built-in AR capability!)
     
  19. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    If they need it I would but I'd have to set up a track and I'm not sure I could give them good feedback other than it worked or didn't :(. Thanks for putting it out there with them. You probably did a better job of doing that than I would of,

    Sumner
     
  20. Mark Ricci

    Mark Ricci TrainBoard Member

    480
    649
    13
    The adapters came from 3.5 external USB hard drive enclosures used for client data migration and imaging recently disposed of. Outside my 2 8 TB WD Reds, have no reason for 3.5" drive support. The adapters seemed to be the only part worth taking. Plus, after moving some of this stuff too many times, gotta let go.

    Yes... The DC Test used the B channel (aka PROG Track) on the motor shield. So its handled as a separate block or track. The key is no crossover if one is DC and other DCC. Since was only testing 1 loco, left the A output DCC. That was the beginning of August running 4.2.0 rc3. Until the Official release of DCC EX 5, sure there will be some changes along the way. To be safe, if using both channels, I'd stick with configuring both for the same DC or DCC unless your using a bilateral (both track ends) isolation section with center off 4PDT. Thinking the OFF mode is the DCC EX equivalent of center off position of 4PDT. It appeared from the docs that TM essentially performs that function via a route setup which defines shield channel a or B, mode DC or DCC or MAIN or PROG or OFF that creates the button in Routes section of Engine Driver. Additionally thinking a couple extra lines of code could send the set command(s) to a free digital 5V DC pin(s) on Mega. An led, 2 Dig pins needed for bi-color or 3 for tricolor, and current limiting resistor connected can provide visual indication. There are quite a few free digital pins for signals, indicators, structure lighting.

    Your very lucky! This will be 14th lifetime move. Its crazy! Agreed. Hope its the last one before either an ambulance or Hurst takes me away. lol

    Have you played with EX Rail or any automation?
     

Share This Page