My planned implementation of DCC-EX

Travis Farmer Oct 10, 2021

  1. Travis Farmer

    Travis Farmer TrainBoard Member

    348
    315
    12
    as i am getting back to model railroad, and DCC-EX, i have never really be happy with either stacking shields, breadboarding, or soldering the circuits, for these reasons. stacking shields does have limits, and many of them. breadboarding is only for temporary use, and soldering a circuit makes it less future-proof. so in my implementation, i will be using a PC ISA (16-bit) backplane designed for industrial use (BP-14S), and ISA slot prototyping boards. the plan is to connect all pins from an Arduino MEGA2560 to the ISA data pins. that will give me parallel connections to all pins from any slot. so one slot card will have an Arduino MEGA2560 with connection for the LCD display. i will have another card for the motor driver connections, allowing me to more easily swap out motor drivers for testing, or design my own. as i am using an Ethernet connection to connect JMRI, i will use another card for the Ethernet module, allowing me to update as needed, without having to work in the confines of the enclosure (IOW, pull the ethernet module card, make the changes, and plug it back in).

    i will also make up a few breadboard cards so i can test various circuits, plug them in, and if i am satisfied, hard-solder the circuits to a blank ISA prototyping board.

    what this will allow me to do, is test various options, see if they work, and if not, i can reconfigure the cards and restore the arduino firmware as needed to get back to a running configuration again, quickly. so as i build my layout, i can keep it in run-able condition, except when testing circuits.

    on the backplane i ordered (not arrived yet), i may have to remove some passives if there are any on the arduino pins to remove any possible interference from things like a pull down/up resistor network if on-board.
    this idea will likely create a large system to tuck under the layout, but i plan on building it into a drawer, so i can pull it out to make changes, or if i need to work under the layout in that area.
    there are power bus lines on the backplane for +12v, -12v, +5v, and -5v. i think the only issue with using these for different voltages is just the power indicator LEDs on each power bus. so i can turn the -12v and -5v LEDs around to change polarity of the bus (no other blocking diodes installed, i don't think). so i can make the -5v bus into a +3.3v bus, and make the -12v into a future positive power bus.

    this may seem like the most complicated method in existence, and it likely is, but i think it will make experimenting a lot easier, as well as adding custom non-shield components. besides, i like complicated methods. ;)

    the best news is, i have finally settled on a basic layout design for testing everything, and experimenting with scenery ideas. and i have found good space to build it in, once i de-clutter it that is. in my basement electronics hobby workshop, it is very cluttered with "spare" electronic components that are just crying out for organization. and if i can get rid of my old network server rack, and find someplace else for my drum kit, then i have layout space. :)
    the problem with buying electronic components in bulk from China, is storing the extra ones... just have to find time to organize them on my new peg-board.

    anyway, i look forward to updating as i make progress on my implementation. :)
    currently, i am using a MEGA2560 CORE MCU and dev board, with DCC-EX support circuits hard-soldered to the dev board, but it is very not future-proof. hard to update, even though it works currently, it doesn't allow for much experimentation.

    my thinking is, i want to control track DCC and local sensors/lights/turnouts with the DCC-EX implementation. but beyond a certain point on the layout, it is more convenient to use OpenMRN/OpenLCB/LCC for control of those, as well as control of various scenery automation (street lights, ect)

    so providing i can get my act together and clean my clutter, i can finally start my layout! :)
    I love the possibilities of DCC-EX's present and future, and really enjoy being able to work with the team, if even in a very small part (i could list my contributions, but that would detract from the team spirit ;) )

    i will be posting more detailed notes on my own forum (https://www.tjfhome.net/community/index.php?threads/my-dcc-ex-prototype-and-ho-layout.15/) , but as it is so sparse of users, i will post some here too. ;)
     
    SteamDonkey74 likes this.
  2. Travis Farmer

    Travis Farmer TrainBoard Member

    348
    315
    12
    7d9a7066b0270511a45dea0f63d1ba9762371f75.jpeg
    this is the Arduino Mega2560 Pro Mini to ISA board i will be getting made up. i am really looking forward to experimenting with different add-on cards that i make for DCC-EX. if anybody has access to a 16-bit ISA backplane (not the same as a motherboard, just a FYI), and would like to buy a card (to be assembled yourself, my soldering is sub-standard...), i will inform when they are ready.
    I would like to truly thank RWP for the work on the board design. the process is expensive, but the results are worth it! i personally can't design boards worth a darn, yet. i am working on it...

    ~Travis
     
    SteamDonkey74 likes this.
  3. SteamDonkey74

    SteamDonkey74 TrainBoard Supporter

    7,161
    140
    88
    I am (long since) heavily invested in mostly Digitrax, but I'd love to learn more about this, particularly any sort of boards I can use with my existing system.
     
  4. Travis Farmer

    Travis Farmer TrainBoard Member

    348
    315
    12
    learn more about what? DCC-EX in particular, or the method i am using to experiment with it?
    more info about DCC-EX can be found on our page, https://dcc-ex.com/ and i think there is a link there somewhere for the Discord chat for more help.

    my method for implementing it is rather overly complex, in order for it to be more simple to experiment and add future add-on cards. i am using a 16-bit ISA backplane, as my "motherboard" of sorts. it is basically a series of parallel connected 16-bit ISA slot connectors, and provides the power through the backplane. i am using a BP-14S backplane, available from some suppliers on eBay.
    the card i posted about above, is basically an Arduino MEGA2560, with the pins broken out to the 16-bit ISA card-edge pads. the future add-on cards will plug into the other slots on the backplane to connect to the MEGA2560. i have bought some prototyping cards from here: https://www.circuitspecialists.com/pc218906.html that will allow me to develop and prototype add-on cards that i can in the future develop into a printed circuit board

    I am not sure how this would apply to your setup. my point of the card being available for others when ready, is that i can order a minimum of 5 cards, yet i only need one for my current needs. so if anybody wanted to use the card for a similar prototype experimenting system, i could sell them a card. just a blank PCB, and the end-user would need to solder the connections between the PCB and the Arduino MEGA2560 Pro Mini.

    ~Travis
     
    SteamDonkey74 likes this.
  5. Travis Farmer

    Travis Farmer TrainBoard Member

    348
    315
    12
    redirecting my plans just a bit, i have been playing with JMRI and MQTT (turnouts, sensors, lights), and while i like the ease of configuration, i have found it to be a bit clunky in practice... at least with my implementation of it. so my turnouts and sensors and lights will be all controlled with OpenLCB, once i figure out how to program in servos... (not really up on the ESP32 file structure yet, in reference to Atani's ESP32 boards). it seems far more elegant of a setup, with just the CAT5e wire between nodes, rather than MQTT with ethernet + power (plus Atani's boards look better... ;) ).

    so, my plans for the massive DCC-EX contraption will be simpler, but i plan to do it a little more different, than the standard (as i always do ;) ).
    the main DCC-EX controller will be on one card, with the main track motor driver, and also one for program track. the difference will be power districts on each additional card. this will be easy, as the signal for DCC comes from the main controller. each card will have the barebones equivalent of an Arduino UNO on it to monitor track current from the district, and turn power on and off for it, based on that, and on the signal from the main controller's track power signal. this really makes more sense to me, for a card system, and best use of it. i can use smaller motor drivers, rather than the IBT_2 for the main track, and limit each district that way.
    and i can do it with no change in my previous card design. the first card will be the main and prog track, with the ethernet connection and 40x02 LCD display for status. and the first district card can contain motor drivers for up to 6 districts. but that depends on how many motor shields i can fit on a card proto board...
    now, how do i sense current to display in JMRI? my plan is, use a sum mixer setup on the sense pin. so all the current sense pins are tied together through a series resistor. now, to be a sum mixer, all resistors are the same value, like 10K. but i need the total amps to scale to a 5V analog input, and i think the motor boards i have are scaled for 2A full-scale (will confirm at some point). but regardless, i need to use a voltage divider for every motor driver current sense pin output, and they all have to be exactly the same values (or close enough, as long as the value and tolerances are the same). then i just need to take the scale and max (full-scale) amp readings into consideration to correctly configure DCC-EX. and they will all connect in parallel to one sense pin. :D

    ~Travis
     
  6. FlightRisk

    FlightRisk TrainBoard Member

    503
    196
    10
    I can't keep up. There are so many interesting directions we are going. I haven't played much with the MQTT solution but was working with GRBBA (Gregor) on what he was doing. Right now having fun with EX-RAIL. Thanks for sharing your future layout here @Travis Farmer . Looks great!

    Fred
    DCC-EX
     
    BigJake and Travis Farmer like this.
  7. Travis Farmer

    Travis Farmer TrainBoard Member

    348
    315
    12
    change of direction again... bear with me, i do this when i learn new information... ;)

    so, through the use of various DCC-EX compatible modules, for my first layout, i will use DCC-EX for most of the track and train operations. this will be my first layout, and will be primarily experimental design. IOW, so i can figure out how exactly i want to control everything. so it will be small enough that i can use just DCC-EX to control most everything.
    Now, i am also learning how to use some OpenLCB hardware built by Atani. i will use these for layout animations, like triggering road traffic lights, crossing signals, and other animations. why such a back-seat role you ask? because i am still trying to wrap my head around how to modify the code to do what i want, as i am so very unfamiliar with the differences between Arduino and ESP-IDF code. quite frankly, i look through the code, and i get lost... so the plan, while i learn how to use it, is to use it non-critical systems, so my slow learning-curve doesn't hold me back, but allows me to use the inputs and outputs for something useful.
    currently stuck between several power districts, and one with current limiting per each district. one district is easier, but setting up for multi-districts makes expansion easier... i looked into the light-bulb trick for getting short protection, and i am just not crazy about it. i like solid state better, for reliability (what happens when a bulb blows, for example). planning on going with a PTC option, like the 0ZRE0012FF2C at Digikey. so i am going with the simple option, of one massive district, with PTC protected zones. i have heard that they tend to be reliable.

    Overall plans? start small and modular, and keep adding as i need to. as i said, the first layout will be for experimenting, and when i can afford to go bigger, i can worry about adding detailed scenery. but to start, painted 1/2 inch plywood will do just fine, with benchwork framing of course.

    still going with the card microcontroller format. i just like the idea of being able to upgrade and alter by just pulling a card.
     
  8. BigJake

    BigJake TrainBoard Member

    1,026
    930
    27
    The lightbulb method of over-current protection relies on a lightbulb (a non-linear resistor, in effect) to increase it's resistance as it heats (lights) up, thus quickly lowering current through it to safe levels (and giving you a visual indication of a short circuit.) Therefore the light bulb is wired in series with the track, and if it burns out, that opens the circuit and shuts off the track. The lightbulb must be chosen with voltage and max current in mind, and may require experimentation to select an appropriate bulb. 12V automotive bulbs (brake/signal, marker, or even dashboard illumination lights) are usually good candidates to try.

    If you intend to use current monitoring for block occupancy detection, applying the PTCs in series with the same blocks makes a lot of sense. Otherwise, fewer (perhaps even one) blocks with higher current threshold PTCs would be simpler to implement, while still being sufficient to protect your layout and what rides on it.
     
    Travis Farmer likes this.
  9. BigJake

    BigJake TrainBoard Member

    1,026
    930
    27
    Yeah, so many shiny objects!

    This reminds me of strategies for survival in the wild. Herding animals don't survive just on the premise that there are so many of them and relatively few predators, but also by presenting so many choices to the predators that they cannot choose efficiently, and kill fewer herd members because of it.

    Like a dog on a bone... Predators succeed in these environments by choosing reasonably (maybe not the best target, but very likely not the worst), and then not getting distracted by alternative choices. Herds then capitalize on this by recognizing when the predator(s) have "locked in" chasing an individual member, then other members slow down and conserve energy, recognizing that the predator(s) are unlikely to change their choice.

    Commercial markets succeed and fail similarly. Too many competitors (and/or competing items, especially w/o selection aids: filters/sorting) can simply cause buyers to give up on selecting a product/service.

    But none of this applies to personal railcar collections. One cannot have too many railcars! ;)
     
    FlightRisk likes this.
  10. Travis Farmer

    Travis Farmer TrainBoard Member

    348
    315
    12
    plans canceled, i am done, bye...
     

Share This Page