Sharing 80 common inputs between 2 different Arduino Mega's for flight simulator

I have developed a flight simulator cockpit where the inputs, a mixed bag of switches, buttons, encoders and potentiometers, feed into two Arduino Mega's. Each Arduino is set up to use a different simulator software (DCS World where Arduino1 is loaded with DCS-BIOS and X-Plane where Arduino2 is loaded with Air Manager).

The 80 odd connector inputs are connected to each of the two Arduino's. Only one Arduino is used at any one time, for example if I am running DCS World, I want the Arduino serving X-Plane to be isolated in order to avoid interference from the non-working Arduino.

What would be the best way of isolating 80 inputs with the flip of one switch? Would it be best to do this by transistors mounted on a PCB?

Your thoughts would be greatly appreciated.

Hi,
How are you interfacing 80 inputs with the Megas?

If you used expansion ports you could just switch the expansion port comms lines between the two Megas.
If they use I2C you only need to switch the clock line.

Tom... :slight_smile:

Hi Tom, I collect all the inputs in a row of barrier blocks, then run two connectors off the barrier block, one connector each to the assigned pin on the Arduino. But your mentioning those two routes is very helpful, I will investigate how those might be used further...
Thank you, Roel

HI,
A group of MCP32017 would do the trick, 16 I/O on each IC, five 32017 will give you 80 I/O.
I2C comms is two wires and gnd, you only really need to switch the clock line between the controllers to do the job.

If you needed to add more I/O it would be very easy.

Tom... :slight_smile:

TomGeorge:
HI,
A group of MCP32017 would do the trick, 16 I/O on each IC, five 32017 will give you 80 I/O.
I2C comms is two wires and gnd, you only really need to switch the clock line between the controllers to do the job.

If you needed to add more I/O it would be very easy.

Tom... :slight_smile:

Much appreciated Tom! I have quite a bit of research and learning to do but will try to follow the I2C route.
Cheers,
Roel

rstausebach:
a mixed bag of switches, buttons, encoders and potentiometers, feed into two Arduino Mega's.

Can one assume the pots. go to some analog inputs?

Can you just put the not-in-use Mega into Reset so that all it's IO pins revert to Input pins, with just 1uA of load?

Simple toggle switch is then all you need - either one Mega is in Reset, or the other one is.

CrossRoads:
Simple toggle switch is then all you need - either one Mega is in Reset, or the other one is.

Make-before-break!