How to connect JMRI to two DCC++ buses?

Erik84750 Dec 22, 2021

  1. Erik84750

    Erik84750 TrainBoard Member

    345
    136
    12
    When planning the electrical layout I was advised to keep track and accessory/turnout DCC buses separate.
    How can this be done in JMRI?

    EDIT: the purpose is to avoid shorts by locomotives to impact on ewitch control. If this can be done with separate current booster modules (ie this from David Bodnar ) then please advise?
    Pro and con's of both concepts, of other ways to conceive the electrical layout?
     
    Last edited: Dec 22, 2021
  2. Sumner

    Sumner TrainBoard Member

    2,836
    5,970
    63
    Not positive if this is the right answer but I believe they were saying to wire it something on the order of this Tam Valley diagram....

    [​IMG]

    The command station and JRMI would send DCC commands to the track bus and accessory bus but the accessory bus would be isolated from track shorts by the circuit breaker/breakers for the track buss.

    Sumner
     
  3. Erik84750

    Erik84750 TrainBoard Member

    345
    136
    12
    Interesting! If I am right something is missed in this block diagram: from command station one booster to track, and parallel one booster to accessories, so track and accessories/turnouts/.. are separated by a booster each?
     
  4. Sumner

    Sumner TrainBoard Member

    2,836
    5,970
    63
    In their diagram the Command Station is the Booster for the track and the booster they show is one they make for accessories....

    https://www.tamvalleydepot.com/products/dccbooster.html

    The main point is the track and accessories should be (best if they are) have the power to them go through separate circuit breakers (their accessories booster is also a circuit breaker).

    Right now with my test track the DCC++EX command station is also the booster and the track power. If I didn't overload it I could have a circuit breaker for the track power and another for accessories. What I will do with the main layout is use the DCC++EX command station only as a command station and it won't power anything. Downstream from it will be boosters and circuit breakers for different power blocks.

    Tam Valley does something similar...

    " You can also use the booster as a "powered circuit breaker". It fills all the functions of a circuit breaker but provides its own power. Each of your power districts puts no load on the command station as it is fully buffered. I use several of these with 16 V power supply which gives about 14.5 Volts on the track to power my own layout with just a single NCE PowerCab."

    NOTE: Great news to hear that Duncan (Tam Valley Depot) is in remission!!)

    Sumner
     
  5. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    If you do not have separate power districts, you can avoid the CBs on the track bus, but you would need to use a booster to run the track bus, and run the command station's DCC bus to the booster input and to the accessory decoders.

    This is cheaper and simpler for small layouts, and still provides an invulnerable DCC signal to the accessory decoders, so they may be able to clear the short by throwing a switch that a loco has run against.

    However, depending on the scale used, the Tam Valley booster's 5 amp output may be excessive, and require a lower-current circuit breaker for the track.
     
    Erik84750 likes this.
  6. Ash

    Ash TrainBoard Member

    106
    67
    8
    Last year, I chose CMRI to connect accessories. prior post on trainboard

    Now, I could do it without CMRI. DCC++EX 3.2+ has significant accessory controller functionality. In addition to DCC accessories, Arduino pin and I2C module-connected accessories are also supported. And the JMRI 4.26 menu has a screen, Configure DCC++ Base Station.

    Note that JMRI 4.26 supports multiple DCC++EX 3.2+ connections (and a menu item for each connection). The track connections would be to a USB connected CS. Additional connections (if needed) via WiFi.

    Join the DCC++EX discussion on the Discord server.
    Look for the channels: #Accessories and #JMRI.
     
    Erik84750 and BigJake like this.
  7. Erik84750

    Erik84750 TrainBoard Member

    345
    136
    12
    Interesting; but the bus to the accessory decoders would need / must be powered by a H-bridge booster?

    And what are the suggestions for circuit breaker hardware?
     
  8. Erik84750

    Erik84750 TrainBoard Member

    345
    136
    12
    That is interesting: no C/MRI? Can you provide more info please? I thought that this is a simple and effective means to control I/O? RS485 is a rugged and well documented bus system, well used by C/MRI.

    In the thread mentioned in your post you gave some absolutely wonderful information, I am still working on that (albeit after a 2 year absence due to lack of time). So I am surprised this is becoming superseded. Thanks for your update.
     
  9. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    Most (not all) command stations include/incorporate a booster that drives the DCC bus output for the track. Originally, "Command Stations" only put out a logic-level differential (e.g. RS-485 type) signal, and required external booster(s) to drive the track bus. As time went on, most customers wanted a less expensive, single-unit solution, so manufacturers started including boosters in their command stations.

    Most dedicated boosters can take either a logic-level or track-level DCC signal and boost it to track-level voltage (and potential current), while consuming very little current from the DCC signal driving the booster.

    Yes, most accessory decoders need to see track-level voltages (e.g. ~12V or more) to operate. Pure command stations (with no built-in booster) may put out only a ~5V or so signal for the booster, and that is not enough to power an accessory decoder (unless said decoder has it's own separate power supply).

    The choice of maximum current available on [a section of] the track for N scale is just that, a choice. For N scale I find 3A (more or less) to be a good, safe level of current that is not likely to damage much in the event of a short-circuit. Others say 5A.

    The higher the maximum current, the more damage can be done to whatever is creating a short-circuit. If I had a huge layout and ran multiple consists with 4+ locos each (as is common in 1:1 today), you might need 5A. But on a small layout, 3A is safer should a short occur. That's my 2 cents; your mileage may vary; closed course, professional driver; objects in mirror are closer than they appear; yada yada yada...

    A circuit breaker is not usually necessary for a DCC bus that only drives stationary decoders and accessories (and boosters for the track), because the likely-hood of a short circuit is minimal, as long as your wiring is capable of handling the maximum current deliverable by the DCC bus running them. By comparison, short circuits WILL happen on the track bus, because, well, "defacation occurs" there.

    DCC circuit breakers are manufactured by DCC Specialties, DigiTrax, NCE, Tam Valley Depot, and likely others (listed in no specific order as to preference.)
     
    FlightRisk and Erik84750 like this.
  10. Erik84750

    Erik84750 TrainBoard Member

    345
    136
    12
    Many thanks Andy for that very clarifying response! Especially with the numbers you provide I already can go a long way.

    I saw however I was digressing from the subject title, but for that too I got the answer: yes JMRI can connect to more than one different bus, ie DCC++ and C/MRI (over RS485 bus).

    About boosters: here from David Bodnar, this from Geoff Bunza, and same here on Locoduino (french translation). I thought sharing these people's knowledge about boosters might be useful too.

    What kind of wiring for power lines is recommended? Solid or stranded? 2,5mm² (by law required for housing electrical wiring, up to 16A)? Star or ring (circular)?
     
  11. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    Wiring depends on a lot of things. Here is a website with substantial (and very conservative, IMHO) information on wiring for DCC:

    Here is a website with substantial DCC wiring information:
    https://dccwiki.com/Wire_Sizes_and_Spacing

    Clearly it was written with moderate to large layouts in mind (all buss lengths <21' are lumped together), and it doesn't look like they have any experience with Unitrack and Unijoiners (there is NO need to feed power to every section of Unitrack), but at least they err on the [very] conservative side.

    I would use stranded wire. It is easier to work with (more flexible and more reliable in flexing applications), and handles DCC current marginally better.
     
    Erik84750 likes this.
  12. Ash

    Ash TrainBoard Member

    106
    67
    8
    JMRI 4.26 with DCC++EX 3.2 (if installed on Mega) has accessory controller functionality. It is the accessory controller functionality that could be used instead of CMRI for some layouts. See prior post, which shows how JMRI now has a configuration screen to configure the DCC++EX accessories.

    The RS485 bus is a consideration. DCC++EX accessories presently rely on I2C connected modules or Mega pins. So wire length can require more work/testing.

    Note that JMRI now supports multiple additional DCC++EX accessory controller WiFi connections. Although I could add a CMRI arduino to my RS485 bus, I have a WiFi connection planned for a fascia mounted turnout control panel. I will post an update once completed.

    I like CMRI. My sketch has not required updates. But today there is a no-programming-required alternative. And the I2C modules can connect to either one.
     
    Erik84750 likes this.
  13. Erik84750

    Erik84750 TrainBoard Member

    345
    136
    12
  14. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    Digital communications between boxes/chassis via ground-reference/return (i.e. single-ended), logic-level signals (e.g. I2C), is not a recipe for reliability, and can be a major source of EMI. (Most systems that are sources of EMI are also susceptible to it.) There are limited means of mitigating the issues somewhat, but it is better off avoided, in favor differential signaling standards (e.g. RS/EIA-485, BLVDS, etc.)
     
  15. Ash

    Ash TrainBoard Member

    106
    67
    8
  16. Erik84750

    Erik84750 TrainBoard Member

    345
    136
    12
    Hi Ash, I have been reading part of the discussion and from what I read I notice that DCC++ EX has built-in I2C support for actual sensor busses.

    This is completely ignoring the actual constraints of I2C design. Philips invented and designed the I2C synchronous communication protocol as a means for communication between devices on a PCB board. This means that the concept is for use with buslengths of maximum some 10's of centimetres.
    Now to design software that assumes the use of this communication protocol for actual use over lenghts of metres is just plain stupid and proves that who-ever designs this software has not a clue of hardware constraints of bus design.

    Any means to extend the bus length is just compromising on some or other hardware constraint. If a fast and reliable long-length bus is needed there are far better solutions. I2C uses signal wires referenced to ground. A much better option for long (> a few metres) buses is to use differential signalling, not referenced to ground. Hence: RS485 and its derivative ethernet. RS485 is asynchronous half duplex, etherent is full duplex, but their characteristics are rugged and robust in any environment provided the proper cable is used (twisted pair).
     
  17. BigJake

    BigJake TrainBoard Member

    3,299
    6,339
    70
    I whole-heartedly agree with the negative aspects of I2C deployed beyond the PCB (and certainly beyond a meter or so of cabling).

    However, some of the information you stated about RS-485 (itself derived from RS-422, and superseded/renamed by the EIA-485 standard) is incorrect.

    EIA-485 is a differential electrical signaling standard using two opposing voltages on two conductors in a controlled impedance. It is not a logical communications/data protocol, though async serial (UART) data is commonly transported via EIA-485 links. Asynchronous half-duplex is but one of many serial protocols that is commonly implemented over EIA-485 electrical interfaces. Just like Ethernet, which is also half duplex when using a single pair of wires or a coax cable (aka "Frozen Yellow Garden Hose" 10BASE5), multiple, coordinated EIA-485 links can implement full duplex communications, albeit at lower data rates than modern Ethernet standards. However multiple EIA-485 links can support asynchronous, synchronous, full- or half-duplex communications.

    However, Ethernet was not derived from RS/EIA-485.
     
  18. sandro schaer

    sandro schaer TrainBoard Member

    2,020
    87
    43
    erik...

    back to your original question. if you set up your layout the way shown in the tamvalley image it will work smooth.
    that's exactly the setup i use. one dcs240 command station, 4 digitrax db220 dual boosters for track, 2 db 220 dual boosters for the turnouts. this gives me 9 separate districts for track power and 4 separate districts for turnouts. i don't use circuit breakers. why 4 boosters for turnouts ? simple. i don't want all turnouts to shut down in case of an issue. then my layout features more than 100 turnouts. at power on they draw too much current for a single 8amp booster. so i run 4x8amps.

    however,you might consider the digitrax pm42 quad power manager.
     
    Sumner likes this.
  19. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    I understand from your post on Discord that you did not intend to insult our team. Within the design parameters for the majority of model railroad users who we targeted the I2C option towards, I2C is more than adequate. Nothing we use in model railroading was designed for our use, it was all modified, including H-Bridges, CAN Bus, RS-485 and the rest. If someone has a layout the size of New Jersey, they may or may not want another solution, which is why we have built-in LCN support and other options. A lot of users don't want JMRI or anything else and have been dissuaded from putting together a layout, especially DCC, due to complexity. They love the idea that they can run every aspect of their layout from just the command station and a phone/controller, including now, turnouts, sequences and animations. They never had this before.

    I'm not sure what your qualifications are, but I am an EE with a minor in CS with decades of experience in business, and I bow humbly before some in our team who are in my opinion in the top 5 percentile of Electrical Engineers and Programmers. They make me want to either hide under a rock or go back to college. All of our decisions are run by a team of at least 20 people and to our Discord subscribers in a process that takes months. I do not consider them "stupid" or "clueless". Anyone who actually wants to constructively contribute to design discussions is always welcome to join the team or add their suggestions. We welcome everyone's ideas and can always benefit from their experience. Please keep posting on Discord and helping us move forward.

    Sincerely,
     
    Last edited: Jan 3, 2022
    David Clemson likes this.

Share This Page