Modular CTC for Bob I guess

Some while back you shared on here or the old blog the modular CTC panels you had designed. Where can I see that information? Reason I ask every time we make a slight change to our CTC machine I have to rewire and reprint track diagram and move stuff around. If i had a modular single block type PCB and front panel it would be much easier. A system where as each 2 inch panel would have a single cable going to the DOUT32 boards rather than the wire mess we have now.

Thanks, Jay

Look a few posts down from this one, titled “CTC Machine Build.”

The main idea was to eliminate almost all of the messy point-to-point wiring. I certainly wasn’t going to deal with a rats nest of wires between C/MRI hardware and individual switches and lamps.

Everything that can attach directly to the PCB does so. The power of multiplexing was used to distill all wiring between the panel and the controller to just 4 CAT5 cables carrying power and I2C buses. Each of the CAT5 cables controls up to 128 I/Os, although not all are needed.

Each column PCB is a PCA9555 I2C chip with 16 programmable I/Os. This part has 3 address pins so there can be up to 8 on a single I2C bus. I use the interrupt output pin as a fast way to determine if a code button has been pressed. There’s no need to constantly poll all the code buttons.

The machine controller has a PCA9545 4-way I2C mux. The processor is a $20 PJRC Teensy 3.1 (current model is 3.2) with all code written in object-oriented C++ using the Arduino development environment. I didn’t follow Chubb’s code examples. Instead of reading the entire layout, calculating everything, then writing the whole layout, the code reads one SMINI, calculates, and writes it back. It then checks to see if any code button was pressed by testing the interrupt output pin of the I2C mux. The worst-case time spent in the Arduino loop() routine takes about 15 mS, so there’s no need for a resistor+capacitor on the back of each code button.

Based on what I learned, today I would add two 6-32 standoffs to hold the board rigidly to the panel instead of relying primarily on one or two switches.

Also, today I’d look into the Model Railroad Control Systems cpNodes instead of SMINI hardware or build something similar using the $10 Arduino Pro Mini. I recently replaced all the PIC processors on SMINIs with Teensy 3.5s. These add CRC error-detection on all data transmissions. Today we run error-free at 115,200 baud.


Jay -

I understand you want to have column-wide panels each with a PCB behind it, the wires going to C/MRI DIO cards. You might have a bunch of 2" minus size 16 GA steel panels water-jet cut at a local vendor. But would the big disruption be more to the wiring behind the panel instead of moving the visible parts of a panel over a column or two? I suspect the difficulty would be more from the wires tangled at the back of the column than moving the parts in the column themselves.

If everything in a column (lamps, switches) are multiplexed through an I2C GPIO chip located on the board, then the assembly can be easily moved to another column with little disruption other than perhaps changing jumpers defining its own and nearby card I2C addresses. If addresses change, then one updates a few numbers in C++ arrays.

My $0.02: If you want a CTC hardware design that more flexibly accommodates column changes, and eliminates almost all point-to-point wiring, an I2C bus connected to multiple column PC boards is currently my best understanding if you feel comfortable with the required skills. I know you designed some very nice PC boards that connect SMINI cards to RS425 sockets and are sold through MRCS, so I am optimistic about your skills.

I etched my own PC boards to adapt 8-pin groups on the SMINI giant 0.156" Molex connectorsto 0.1" pitch 2 and 4 pin punchdown connectors designed for solid 24 AWG CAT5 wire. Outputs include signal current-limit resistors and yellow-adjust pots. Inputs are all 2-pin with signal and ground.

Of course none of this insulates us from necessary changes in the model board for new occupancy lamps and different track plans. Those can be $$$ to say the least!

Your thoughts? Please reply or PM me through the A&O Forums.

All the best.

Hi Bob. Thanks for the two replies. If I had it to do over again I would design some type of CTC that minimized the wiring to cables rather than single wires. But I don’t see me doing that at this time but others have asked for my advice at a recent open house. My main problem now is changes to the model board and like you said a problem. My board is printed rather than etched but still reprinting for changes is a pain. So I have made small overlays where I can to reflect changes. Also have to plug or drill some holes due to those changes. The one thought I did have was repeater LEDs on the model board would be real handy particularly for new operators. However, I would want three color using a single LED. Using my signal board I designed or just two bit logic I think it could be done. But I haven’t run across any 3mm LEDs that would be useful. At the moment Bill Carr provided me with a computer screen display of the CTC which shows signal aspects but it is a 22 inch monitor and the model board is eight feet long so difficult to look both places. I doubt I will go beyond the thinking stage as I have dozens of projects including surface mounting LEDs on O Scale PRR position light signals. That in itself is a huge projects particularly with my 79 year old eye sight.
Anyway thanks for the information.
Jay Beckham