A while back lam.M & I both talked about drawings wasting time.
Little things can make a big difference and it takes time to learn them.
Not trying to pick on you, but just show very small detail as example.
I know what a 165 is an how it works, so knowing this look at this and do you see what you expect?
First quick look and no serial input connection, took a while to find it.
Other things here also delayed the find.
You have a very simple drawing but have a lot of separate detail areas to work with.
Power & Ground Put next to each other and leave a gap between other details
SPI here you have 3 or 4 signals, again a detail
You have SPI In & SPI out. Again a detail but here Knowing that Serial in goes to first 165 and daisy chains was lost. It does not stand out so it's easy to see.
Your eye can easily follow group of lines. You need differences to stand out.
Here you have a chip that is drawn for Left to right flow. If the whole drawing was left to right flow then it would be easer to understand, BUT some time you will have a need for a drawing like this. For example a drawing that had 167 & 595 chips.
So what can/could you do?
Simple things, move your 5 horizontal lines down so top line is where your SS line is now.
Move Power and ground to be next to each other. Keep in mind that you will have a 3rd power wire per chip and need to make it stand out a little from the two shown
Change the gap between power and SPI signals.
make the direction of MISO and MOSI really stand out in the pattern by when they go vertical. MISO going vertical to the right before the chip is a good hint here. A gap in the MISO bus under the 165 is a hint. so bring pin 9 connection down to left of 165. Here you need a cross like you have of 9 & 10, put it closer to chip and further from bus. make cross stand out.
A little thing like moving pin 8 vertical closer to chip makes a difference.
Your 132 does not follow the left to right. In on left side of box, out on right side of box and then up to pin 1.
--
Now you are working detail on power and connections. More detail that needs to stand out when you take a quick look that that drawing to find something.
-----
Lets see if I can help some with delays.
Some times you get berried in the details You need to keep looking at big picture
If you can get in mind the big picture & the small picture you have a better chance.
A while back a news item stated a " minor accident on LA's freeway would have traffic backed up and slowed for 9 hours," & "you could walk faster"
People walking have this problem if there are a lot of people in a line.
What is missing is the Sync signal to get all to start move at same time
One often missed thing.
You are talking via sat to some one. Your baud rate is X but it takes time to get to sat and back down. For easy numbers say 1 sec.
From this example you have X times 2 bits stored in AIR.
Storing bits on a wire was done a long time ago. Search Delay Line if you care.
Now jump to electronics
You have a bunch of inverters connected in series. From data sheet you see time to change.
Again using simple numbers, change takes 10. So with 100 inverters in series you change input to ONE and get ONE out of last 1000 later.
You can still change input faster then this total delay, you just have to stay in the limits of a inverter.
Now Your input changes fast, Inverter output might change faster or slower on output. After 1000 inverters your nice fast square wave could look line a sign wave.
A while back, lan.M talked about Schmitt input on logic.
If the above inverters have Schmitt inputs, each would be doing it's little part in making that logic change faster. The sign wave output happens at a higher frequency.
Now replace the inverters with a non inverting buffer. You still have the delay!
If you draw the clock signal (the inverter input or buffer) on paper and then make a copy on a transparency.
Each inverter/buffer shifts the transparency by some amount.
You could number the changes see that current input is x newer then output
Now the 165 has a delay!
To hide the delay the clk input shouts out STEP NOW to all the bits in shift register. As you add more clk inputs to 165's the shout gets smaller.
One way to make shout work better is to do it when peak should happen on data input.
First you have when a bit happens on output. Think of your first output chip replaced with a 165. You would have to shift out bits for all output chips before getting to 165 bits.
You would not do this as to update outputs you would also have to send 8 more bits after the output bits to get output bits in proper position.
If you put 165 as last chip then you send 8 output bits & get 8 input bits.
Until you have matching number of input & output bits you have to send or receive extra bits.
If you have nothing but TPIC6C595's & 165's in chain and NO buffers, you are good.
The design of chips have all shift registers stepping at same time.
But ( always a but ) your input signal times must be good.
If you add buffers in series you have to think about delays as shown in Inverters in series above.
Now what could you do?
With a big loop where you have buffer delays going out and the all the way back, you have a problem. The cure is easy if you use clock out to sample the input bits.
A SPI Master only has a send clock and not a send clock and receive clock.
A SPI Slave only has a receive clock.
If you had to have the big loop with buffers you could send with the SPI Master and receive with the SPI Slave. The master generates the clock that the slave uses after delay.
You are splitting the OUT from the IN. A simple step that removes OUT delay from picture. The timing at the SPI Master will be good, but you have to allow for the buffer delays working back.
Think of many transparencies stacked. The nice thing is that a slower clock rate removes the transparencies.
Think of a computer reading memory. Data needs to be at computer to read. A miss of 10ns gives computer garbage. Speeding up memory or slowing computer by 15ns gives a 5ns safety margin and working computer.
Now to lan.M
In is posts to this thread in answering your questions and making suggestions are a LOT of important details.
I would suggest reading this thread many times and ask your self "why did he say that"
I really like this one
Then you get into stuff like switch wetting current. As a rule of thumb, unless a switch or relay has sealed, mercury wetted or gold plated contacts, it will be unreliable unless you have enough voltage across it when open and pass enough current through it to break down any oxides or other slight contamination. A rough rule of thumb is minimum 10V, 10mA.
Happened to me in the 70's, system used real high dollar low current switches that were suppose to last 100 thousand to 1 million switch cycles. Every thing known at time to make switch last longer.
In an effort to protect the switches, designer lowered the current to far to lower limit. New switches worked but got faulty 10,000 to 20,000 cycles later, One resistor of wrong value. Think it was 10 cent resistor vs $15 switch. If you are repair man, bad switch replace switch.
Try telling management " if you harm switch more by switching higher current it will last longer".
If its coming from the layout, I suggest you use 12V signalling. ON is >9V, OFF is <3V. A potential divider 15K lower arm, 22K upper arm will do that nicely with no issues up to a maximum voltage of 13V.
A different way to do this is use RS232 chips like
MC1488N SN75188N MC1489N SN75189N
but you then need a negative supply
---------
Now think ahead a bit
so far you have standard SPI interface.
The Teensy 3.2, 3.5 & 3.6 all have a CAN Bus interface.
CAN Bus is a nice way to connect many CPU's together.
You could have many Teensy in system connected via CAN bus.
You could use one to control track and then add two more with each controlling one operator interface.
Now problem with this is high cost of Teensy
SPI & CAN Bus interface can be found on many chips.
Even the ESP32 has SPI & CAN Bus & Arduino
So what I am suggesting is not to get locked into idea that one has to do it all.
Easy to make many copies of a board.
Easy to make many copies of software.
Not hard to have many input or output chains of the boards here.
Not hard to leave off parts mounted to boards
Some times not hard to use different parts on a board to get a little different function.