My DCC-EX setup, and layout plans...


Staff member
Jul 9, 2023
my build is based off of a 16-bit ISA backplane, with a Arduino Mega2560 clone for the MCU.
in the third image, you can see my UP3593 on the "test track".
also note, these images are from a while back, and my workbench has become quite a bit more cluttered as of late.

the plan with the ISA back-plane, is to connect the I2C and SPI bus pins to it, and allow easier expansion. so far, i have just the one card, so it looks rather "over engineered". while the main-board and back-plane are 16-bit, i have only found 8-bit ISA prototyping boards available, so i will have to limit it to just those bus rails. my original plan was to have a separate card for the Ethernet adapter, motor-shields, and GPIO expansion. then i built that hodge-podge mess above... though once the SPI and I2C are routed to the ISA bus, it would be simple to move the Ethernet to a card. i would just need to also add the support pins, like chip-select and interrupts. i think i should also route the reset pin to the ISA as well.

the EX_FastClock project could also be moved to it's own project, with the serial connection in place. as the EX_FastClock uses just one-way serial, i think, it could just be connected via a RS485 connection for distance.

the initial plan for GPIO was for on-board, or on-card, MCP23017 chips to expand the GPIO. this will be fine. and as for turnout control, i was going to use servos, controlled locally, but now i am thinking of making remote modules that take a digital signal, and change it to either slipper-motor (tortoise) control, or servo control. but it can be done easily with a smaller MCU. but the smaller MCU ca be positioned local to the action to e performed.

as far as power supplies, i think i currently use an ATX power-supply, but i am leaning more toward a single big power supply, set for 15V, with fuse blocks to distribute power, and DC-to-DC converters to drop the voltage from the main PSU down to needed levels. in theory this should work... i have no idea if the big PSU is double-shielded, or not. but i hope to figure out some circuit protection to shutdown the power if it surges at all. maybe a crowbar circuit of sorts. after-all, the big PSU is rated for some fair amps. ...or i could just wing it, as i usualy do, and throw caution to the wind... :rolleyes:

the big PSU can supply 100A at up to 15Vdc. it is a RV power converter. it will be using a grounded outlet, so the frame will be grounded. i can't get high enough current to supply everything by using 400 different power blocks. i don't have that kind of funds.
now, the PSU will likely not have very clean power, but i can filter it a bit, and then filter it more in my circuits. even though last time i checked the PSU, it really wasn't that bad, noise-wise. but a little extra filtering can't hurt. that way i know my track signals are good and clean. even just tossing in some filter caps may be enough, compaired to what i used before, that worked just fine...
i could easily connect my oscilliscope to the PSU and see how noisy it is...

Now, the question remains on how to mount the whole contraption... i have a small AV rack i built that i could make use of. just have to make sure it has ventalation for PSU cooling. the front door is currently hollow so i could put a Lexan window in it, but i may just install a 1/4in or 3/8in panel to mount the LCD, some status LEDs, power switch, and so forth. the back panel will be removable for access. i think i even still have the original back panel. the back will contain the track wiring connectors, and maybe some other connections, as needed. don't know yet.
Today, i unearthed my DCC-EX build, and it worked fine, even after i updated the firmware to latest (devel branch). and having heard my UP3593 idling on the test track, i am starting to get the itch again...
so some updates are planed. i want to get an UNO screw-shield, so i can connect any UNO compatible motor shield, more easily. just plug in the shield, connect the wires to the terminals (i plan on adding labels for the wires), and go with it. also, i want to add a IBT2 as a third track option, and parallel it with the main. should be fairly easy, i think. the major idea being to allow either low or high current operation. or i may just have the UNO motor shield for programming, and the IBT2 for main. i would need a better option for current sensing the main.
a lot, and not much has been happening with my DCC-EX setup... what was, is no more, but what will be, is rising up.
Screenshot 2023-11-07 at 15-10-30 arduino giga image - Google Search.png

i am working to port DCC-EX to an Arduino Giga, and so far, i have it controlling a train on one track, programming on the other, and using the onboard WiFi (for up to 3 clients, MAX), and some other features are working too, though i have to test them further. may seem like basic stuff, but the Giga is not the same MCU as a UNO or Mega2560. this is still not an official port yet, as it has much development ahead of it, but it is a very promising start. :cool:
i have been trying to think of an enclosure to use to display my DCC-EX build... and i may have thought of something. i have a computer case that is ridiculous for a case, but with some mods, could be a DCC-EX case. it is a ThermalTake Tower 900.
Screenshot 2023-11-11 at 04-30-36 CA-1H1-00F1WN-00_267c57be27744283a25af04c934cd1ae.jpg (WEBP ...png
it has a glass front for display. at the moment, it is empty, taking up space. but i think i could make it work. it could sit on a shelf over the future layout, or on the floor, under the layout, with a flood riser, just in case.
on the motherboard carrier, i could mount a piece of birch plywood for mounting stuff to. then mount the Giga to it, along with any other boards for it. the power supplies could be hidden in back. and i could use the power and reset buttons to control the board reset, and master power. i could use the power LED for master power indication, and the HD LED could be wired to the track power signal for the main track.
despite the system having the ability for multiple Main tracks, i will run the one main, at 15v, and use the Prog for Programming, and the Main will send a signal to drive boosters, but can drive the Main directly, too. depends on how big my layout gets.

I still plan on using a combination of I2C (extended), and CMRI, so i will have provisions for both. i will also add a CAN option, for future use.

i picked up some more PCB mounting feet, the "L" style.

the case fans i will likely fine some way to use. i mean, the power supplies in back and the motor driver in front will both appreciate moving air. i could design a Arduino Mega 2560 system to control the fan speeds in accordance with temperature, or a speed-set knob.

the 20 X 04 LCD screen will likely be mounted next to the glass so it can be seen. i will need to change it's operation to 5v so it is brighter. the Giga MCU is 3.3v, so i will need to use a I2C level-shifter.

I will also mount some LED lighting inside the case to help display the DCC-EX build. it will also help when working inside the case, for work lighting. could be on a PWM dimmer...

the external WiFi antenna will be mounted in the top of the case, under the plastic top, to allow for better signal, while hiding and protecting the antenna.

i am unsure if i will use the ISA back-plane, or not. about all it would serve to do is supply add-on cards with power, and possibly I2C. i would still need a master bus-interface card to link the Giga to the ISA back-plane.
i could have a CMRI card, for instance. and some MCP23017 cards for GPIO. maybe a FastClock card would be neat, though maybe not... (no room for config buttons)
the master bus-interface card would have the SparkFun EEPROM on it, for consistency, so it is always there.
the back-plane would only need 12v and 5v power, as each card could have it's own 3.3v regulator (LD1117V33), to make it easier.
picked up one of these to power my CS and the back-plane:
so with that and an ATX breakout board, i should be good to go. i will be testing the supplied power adapter to see of it would supply shoot-through current, or not. if so, i have another 12V 10A adapter in mind. as it is coming from China, it will be a spell before the ATX mini PSU arrives... like end of November, start of December :cry:

i will see if i can clear space in my workshop for the large Tower 900 case at some point today. then i can see if the back-plane will mount on the motherboard carrier, or if i need to make a custom mount. i suspect it may fit just fine.

i think on the back-plane, i can make a 3.3v bus from the -5v, by de-soldering the power indicator LED, and turning it around. i can test, but i don't think there are any protection diodes...

so far, other than the power distribution, and I2C distribution, i don't know what to do with the other pins in the ISA bus. perhaps just an as-needed assignment. i don't want any cards to have wires going back to the Giga, other than the one master interface card. just wires going out to the layout, via most likely cable breakouts. for instance, DB-25 cable breakouts. each one will give me 25 pins to signal in and out to the layout. though, most of the layout GPIO will be remote, in EX-IOExpander, or remote I2C. the real primary function of the cards will be future add-ons. i will be making a CMRI card, and a EX-FastClock serial (RS485) interface card. that way the fast clock can be remote.
i was going to have a EEPROM card, but i recently learned that the EEPROM feature of DCC-EX will be phased out (???), so that would be a waste. much like my time getting it working on the Giga...
perhaps the future will bring in track boosters. i can supply a track signal on a pin, or more pins... (really, all PWM pins could be supplied), and enough pins to allow those to be made DCC, or DC drivers. main boosters could share a track signal pin, and power pin, along with returning a fault pin. analog pins would be best as some sort of cable connection between the Giga and the motor driver cards, directly.
1), Input: 12V(11.4~13V)

2). Input: current: MAX.16A

3).Output ATX:180W

4).Output current +12V: 8.5A Max Load(15A Peak Load)

5). Output current +5V: 9A Max Load(10A Peak Load)

6).Output current +3.3V: 10A Max Load(12A Peak Load)

7).Output Current +5VSB: (and 5V some line)

8).Output current -12V: 0.07A Max Load(0.1A Peak Load)

9).Efficiency: above 93-97%

10). Operating Temperature: -20degrees celsius - 85degrees celsius

11).Power connectors : 1x Floppy, 3x SATA, 1x 3.5" HDD
those are the claimed specs of the above ATX PSU thing.

ISA master interface card will have a 8-channel level shifter for the serial channels. that way, the serial cards (CMRI, FastClock interface, etc...) will not have to do it themselves, as they all will likely run on 5v. no level-shifting for CAN, but that will be a direct connect to the Giga.

almost thinking of 3D printing a new control/display pod for the top of the case, but i may not. it would be nice to have the LCD up there, with some other status LEDs. mainly, the current panel only provides, of use, a power button, reset button, and 2 LEDs. i could also hollow the current panel out and attach an aluminum face, perhaps 3d printed, to provide what i need, though the LCD would not fit. that could just go behind the glass, or i could 3d print a small display that "plugs" into the 5.25in bay. still thinking of replacing the tempered glass with Lexan, for safety and weight.

the cases center drive "console" is, as is, useless. i may try to remove it, or find a way to mount the LCD into it. actualy, there is a lot of useless structure that needs removing... like the rear drive bays.

i want to make a plate that mounts in the ATX PSU location, and mount the track power and DC power inputs into it, also, perhaps the track power connector could be mounted there as well. with a possible 8 tracks, i would need 2 8-pin connectors.
i got my WifiNINA board from Adafruit soldered up, and it works better than i had hoped! rather than the 3 clients that the onboard giga WiFi can provide, the WifiNINA board can serve 9 CLIENTS!!! that is very cool, indeed! :cool:

EDIT (2023-11-15): WiFiNINA board or libraries are currently a failure point. looking into it... :cry:
EDIT (2023-11-20): WiFiNINA issue is sorta solved...
Last edited:
had an outrageous thought... powering the DCC-EX system and train layout: Solar Power!
i have the solar charge controller from a failed camper project, with a 100W panel. i would need a battery... or more... but it would be safe, as no mains power would be connected, unless my battery died and i needed a boost... 🤣
but also, i can use a few laptop chargers in series/parallel to provide a night-time boost for constant charge power. or just have enough panels and batteries that they last a while...
because here is the thing, if i finish my workshop, i could setup a half-assed layout up out there, around the edges or something. if i do very little scenery, than dust is not really a big issue... or i can cover the layout in a hood with dust doors, with windows in them. could be neat... but it would give me a layout location.

so, i am working on a Nextion screen to show the status of the DCC-EX controller, but through a second micro-controller. likely a Mega2560 Pro Mini. i can connect it through diodes to various pins from the Giga CS (diodes because the Giga is 3.3v, and the Mega2560 Pro Mini is 5V. or i could use a 3.3v source for the Mega2560... i think they will run on that... but either way, should have diodes. so far, i have it so it can read the LCD data and display it on lines on the Nextion. (or will have, gotta finish debugging)
planning on changing my production build from a Giga, that i can afford one of, to a STM32 Nucleo-F439ZI, that i can afford more of down the road. planing on using the Ethernet connection, so i can eliminate the WiFi issues.
still going with the DC ATX PSU, if i can get it working. the Chinese one failed to work, but i have a M4-ATX PSU on the way from Canada, so we will see how that works out.
so, when i get my F439ZI, and a replacement DCC-EX driver board, i can start testing and building.

the Solar system will be just a test-base for my camper project... but i can still get a small Camper DC converter, or something, to power the PSU. it can take up to 30v, so i may try it on a 24V power supply, providing i can find one with double-shielding... like i said before, in the other thread, i may use the ATX PSU for my camper HA build anyway. i can therefore just use a 24v power adapter, and voltage regulators for 12v, 5v, and 3.3v. i will figure something out, i am sure.

on the DCC-EX build, i may even swap out the glass sides for 1/16in aluminum, to make it easier to make displays and such. or i can put the displays behind the glass. either way. but i need to make a plywood platform for the bottom floor. also, one for under the ISA back-plane too. the motor drivers will mount best down on the floor of the enclosure, and under the ISA cards, i can have a piece of plywood down to the floor. the back of the enclosure will be power supplies, and fan controllers, though the monitor MCU could control the fans, it is just as easy to use a separate MCU, so the development will be easier.

i want to be able to monitor case temps, with temp sensors for motor drivers, if possible, though i really doubt they will generate heat. i am more concerned about heat with the power conversion, in back. i could toss a few thermal sensors back there. likely DS18B20 sensors, as i have so many. i can display readings from all sensors, and regulate fan speed by the highest temp, just to make sure things stay safe and cool.
likely way overkill though, may leave out the temp monitor, and just run the fans full.

the connections to the F439ZI will be through pin-headers soldered to the outer two rows of holes. i will make up a wire harness that routes to the ISA back-plane and motor drivers.

i still want to experiment with CMRI, so i still need the RS485 UART interface, along with I2C for various add-ons. the F439ZI is a 3.3V core, so it will be the same plan there for level shifting.

i have created a Arduino project that parses the CS output, so my CS monitor can monitor through just a serial connection. i may need to make a change to the Nucleo Ethernet branch code to allow for the LCD "@" messages, though. shouldn't be too hard, but keeping the changes safe will be an issue. i may just ignore those messages for now, and just use the I2C LCD. would be far easier, and more room on the display for other functions. yeah, i talked myself into it, that is exactly what i will do.
I hope to get a Nucleo-144 main-board from Ash, as it would greatly improve my build. i could have the main-board down on the bottom, or i could even do away with the back-plane, as the CMRI would be on-board. i could just move the main-board up on the board panel, perhaps with a wood backer for easier mounting. then the monitoring MCU could mount down bottom. thinking of re-doing the Nextion layout anyway. change to the bare-screen model i have, and make it horizontal.
in the enclosure, PSUs would still go in back. and with Ash's board i only need a 5V source, and possibly a 3.3v source.

and actually, i could still use the back-plane. i could mount the back-plane down low on the vertical wall, for expansion boards, and have the main-board up high. will know more if and when i can get a main-board.
i may just go with the main-board and off-board PCBs. it is just the back-plane provides a nice buss and power rails. really, i don't need the +12v rail on the back-plane, so i could connect that to +5v and use the +5v rail for +3.3v. the status LEDs may be dim, but who cares. it would give me the useful power i need. and as far as data busses on the back-plane, just I2C, i would imagine. maybe serial UART, but for what? CMRI is on the main-board.

my FastClock build will likely be independent, or not at all, where i use JMRI. because JMRI can send FastClock info to the CS, i think...

what i need is a clean method of bringing wires in and out of the enclosure. like track power, and such. i don't like the idea of mounting into the back panel, as i want it removable. perhaps the rear side panels. well... if i am not using the DC ATX psu, i only need a power input for creating the 5V and 3.3V. could be the 12V power pack, could be a 16V, or even a 24V power pack. but i can use the barrel jack from the non-working little ATX PSU thing, and either the power pack, or just it's wire for supplying power.
an alternative power input would be the flat terminal bolt connections i have, like inverters have for DC input. then i am not limited on volts or current. but i could make a panel that fits in the ATX PSU location, and have the wire connections in that panel. track power, CMRI, CAN (?), Ethernet, and i hope room enough for another RJ45 for the I2C extension bus. maybe i could get smaller, keystone style RJ45 pass-through connectors.
yeah, 5V and 3.3V should be plenty of power, and i can use the 12V power adapter, so i will also have 12V to use, for whatever. i "think" i have a 5V DC-DC converter, if i can find it. then i have only to buy a 3.3v DC-DC converter. i will check the value of the relay on the switch module, but i think it will do 10A. but it needs 5V... so i need 3 relays, to switch on the 3.3v, 5v, and 12v busses.... or i can use a small regulator circuit, with a LM7805 to power the switch module, and that will turn on the 12v to the DC-DC converters, perhaps through a secondary relay (i have several).

so i need a power button. i have one... and i need a reset button, i also have one of those. i could just put the OEM controls back on the enclosure, as they will work just fine for my needs. power LED for Power, and HDD LED for ... something.
the back mounting panel will need to be installed permanent. no need for access to the back of the panel, though removing the front panel will gain access.
the bottom mounting panel should fit as big as i can get into the enclosure. not sure yet how to attach it to the bottom. there will need to be access near the bottom around the PSU hole, so wires can be run to the panel there. that will, i hope, be big enough for connectors for CAN, RS485 (CMRI), 8 track connections (two 8-pin connectors), power input (12V). the Ethernet and I2C extender connections can just run into the top of the enclosure. through a rounded-edge hole. then the top can be attached.
the 12v fans will be connected to switched 12v power, and just run full speed. no desire to PWM them at this time. ...unless they turn out to be really loud. but i doubt they are.
i thought the fans were 4-wire fans, but they are not. so they need to be power-PWM controlled.
Last edited:
current line of thought: abandon the ISA back-plane idea, but use the DC ATX PSU for power. use a plain SPST switch to turn on the PSU, or a bi-stable switching circuit of some sort to activate the PSU. maybe i can just take the relay off the module i have and run the PSU directly to it...
for a case, i am still kinda thinking between the big enclosure, and the smaller rack-mount enclosure that can be mounted to the layout fascia. the fascia mounted enclosure would be more compact... but it is made of hard steel sheet, that is hard to drill. i could however cut out large holes and use the aluminum sheet i have that is easier to work with. i could just mill it with my CNC, in theory.
the back of the smaller enclosure could be cut for two aluminum panels. one for the PSU, and one for track, CAN, CMRI, and I2C extender. the front could be sectioned as well. needs a switch for power, LED for power,LCD screen, LEDs for 8 track power, maybe track current if i can sort out the controls for it.
as far as aluminum to steel contact, i can cut paste-board as a sort of gasket, or just cover the back of the aluminum panels in packing tape, or similar.
i am kinda thinking the smaller enclosure may not be big enough to fit everything. may be just as easy to continue with the big enclosure. the DC ATX PSU can go in the PSU location, as one would expect. as for the track outputs and such, the best option may be to either cut the enclosure, or make a new top for it, perhaps... though on the connectors, it is not absolutely necessary to use the "handle" part. i can use just the terminals, and that would allow the wires to end more.
at some point, i will have to either cut the enclosure beyond repair, or find a way to make it repairable. i have no more use for a desktop computer... and it is too big to be a server... so i may as well cut it to suit my needs.
if i cut the card-slot strips out, it will make room for an aluminum panel for most all my terminal needs. over by the IO shield hole, i can make a panel to have two RJ45 connections (Ethernet, and I2C), and maybe RS485 (CMRI), and CAN (future add-on?). on the larger (card slot) panel, i want a terminal connection for external track power, so i can supply it from a dedicated source. so none of the motor shields will have the Vin connected to the STM32. the STM32 will be powered through Ash's quad driver board. and that takes just 5Vdc from the ATX PSU.
for CAN, if ever used, i see CAN1 is available in the default location PA11/PA12 on CN12. with the lib from GitHub - pazi88/STM32_CAN: CAN bus Library for Arduino STM32 (
Basic Usage:
#include "STM32_CAN.h"
STM32_CAN Can1( CAN1, DEF );
static CAN_message_t CAN_msg;
// or...
Can1.begin(true); // auto-retransmission;

a thought just occurred to me, i am not required to use Ethernet, as Ash's quad driver board has ESP8266 WiFi included. and if i use glass or Lexan panels on the enclosure, then the WiFi should work. that would be one less Ethernet connection to worry about, though i would still provide the option. and WiFi also opens up the use of tracks 9 and 10... though i am not sure i need that many tracks.
i have a replacement DCC-EX motor driver on the way, as well as 2 Arduino motor drivers, for multi-track testing. i would like to have all DCC-EX drivers, but for now, it will do.

My Arduino Giga DCC-EX build will be for development still, in case somebody uses the port. but i don't need it as a production build... not after getting the Nucleo F439ZI, and Ash's board. that may change, but i don't see it as likely. the Nucleo is cheaper, and has more pins available, to my knowledge, for PWM.

Moving forward, i should get a second F439ZI, as a backup.

as far as powering the ATX PSU, i can still use the 12V 10A adapter, as it so far seems to work. i will put the PSU in normal PSU mode, so 5Vsb is always on, and so i can turn on the PSU with just a simple switch, or a button (future?). a switch is more positive action. i will need to either replace the enclosure control panel, or re-purpose it. perhaps the power button could be connected to the reset line. the power switch could go in the lower 5.25" bay panel. i could make a replacement panel, or cut the one that is there for the power switch. the power LED could be used for power, and the HDD LED could be for... something. maybe connected to the monitor thing i have yet to perfect. the smaller reset button could reset the monitor thing.

on the monitor thing, i need to adapt the code so it doesn't wait for the CS to become active. or rather, it should also timeout after X number of seconds (15?, 30?) and just start. that way if i have to reset the monitor but not the CS, it will still work. i need to test with my FTDI cable and see what is transmitted regular, and what must be prompted. i just checked and it is already 3.3v logic (TX and RX only).
it has been quite some time since i last posted. with the threat of basement flooding , my basement shop is in disarray due to getting things off the floor. and then i got hit with a severe case of chronic dehydration. so i was highly fatigued, and with migraines, and thus wanted to do very little. still recovering, but doing much better.

planing on abandoning the monitor idea, as it isn't needed, and it ads a lot of complexity. just the F439ZI on Ash's board, with WiFi, and 1 to 4 driver boards is all i need. as i don't even have my layout started yet... one EX driver board and the two Arduino driver boards for testing will do just fine.
now, for less complexity, how to do the enclosure??? to be honest, i could just build a box, or even, use the AV cabinet my Dad and i built. though it is a bit large... maybe once i get something of a layout built, i will worry about a cabinet. but a wooden one seems easiest. and if i need aluminum panels, i have them.

if i made a cabinet, i like vertical slide out panels. but not sure how to make them work. actually, just a panel down below the fascia would be fine. maybe a lexan cover for dust.

my layout... i would like to start, when i have the money, and space, with a large rectangular loop, and add in features as i go. i will need to massively reduce the size of my basement shop usage, by maybe de-cluttering one table, and disposing of some junk. as long as i still have space for my servers, one work bench for soldering, and the rest for the layout. no idea where to put some of the stuff though...
I still like the idea of using the large ATX case for a display enclosure. i could enlarge the rear panel access by cutting the hole bigger, and folding back the metal to clean up the edge, and use a aluminum plate for a panel. it would make for more I/O room.

for my layout... if i can do some serious junk removal, i can move the servers and bench to the outside walls, and have room for a 4 X 8 layout in the middle, maybe. could even possibly do a 4 X 10 if i squeeze it in just right... depends on how much space i can clear. maybe a 4 X 8 with T wings at one end... or something...

using the large ATX case, i could use the same panel for the computer controls. power button to control power, reset controls reset, and power LED for master power, and standby power.
the ATX PSU really doesn't supply for the STM32 board. that is powered by a separate track power supply, through a SSR powered by the ATX PSU turning on. the ATX PSU does supply auxiliary power busses to the layout.
for the sake of power hungry aux items, i will need a stout PSU powering the ATX PSU... i may even take the camper converter from my CNC, get a new one for that, and use the old one for my layout PSU... i think it is 40A, so more than enough for my DC ATX PSU. would be easier to just use a regular ATX PSU, but Haba says NO ;).
as for a case for my CS, in the interest of space and cost, i can just mount a drawer under the layout and mount the CS board right to the bottom. i mean, i like the big ATX case, but it is not necessary, when i can just mount a display outside, to the front of the drawer, and hide the rest away from dust.

for my layout, i am thinking as simple a start as possible... but i need to find a space to relocate my servers, where they are not in the way. the layout could just be a big L with bulbous ends for the loop around, with a limited number of sidings. perhaps at the industry sections and stations. i do not need a big train yard at the moment. i just want to run trains. the long part of the L will be a grade slope, with a very gradual slope. perhaps even just a hump to simulate terrain. or the back could be a terrain hump, with flat industry stations in front. figuring for a 2 foot wide section, or door wide. that way i can just use a door slab, and take one side off the door... the under-side. or just build a frame and lay 1/4in plywood over the top. but to simulate terrain, i can cut strips for grade elevations.