This is my suggested layout. I imagine that there will be some additional components, but this should be the bulk of it.
So as I stated before there are two separate types of circuits. It starts at the 5v pin(s) on the GPIO, these pins run to 4 relays/octo-couplers and then to each of the leads on the limit switches. The common of each are connected and a resistor is placed in series and it returns to GND on the Pi. (This set of circuits are the long distance circuits.)
The next set of circuits are for the GPIO, internal Pull up resistors. For each of the 4 leads on the limit switches there is an associated GPIO data pin. A wire is run from the pin on the board to the relay / octocoupler. When the above circuits are closed, the relay will closed, creating a magnetic field and closing the bottom connection. This results in the same signals being passed to the pi as previously, but allows this secondary circuit to remain very short.
In this configuration, my code should be unaffected. I might only just need to increase the small delay, to allow for the limit switch to be pressed, and also for the relay to react.
Think this will work? Or what else is needed?
Thanks for the help!
