Howto:Build your own Panel or Cockpit - Switches - SPI

From FlightGear wiki
Jump to navigation Jump to search
Return to Build your own Panel or Cockpit
Return to Prototyping

"It's noteworthy to keep in mind that the bus lines SCLK and MOSI are shared amongst all slaves. So when plugging multiple slaves to the Pi make sure that the fan-out of the Pi is not exceeded by the load (resistance and capacitance of the input pins of the slaves) - although this is less of a problem today with the low capacitance and high resistance of digital inputs."

- Ghanima in his response to: [ http://raspberrypi.stackexchange.com/questions/31932/add-more-than-2-spi-slaves]

The prototype for switches will consist of several banks capable of supporting 16 switches each, but populated with only a few switches. The prototype will have two spi chips with different purposes:

It will use 4 bits of data to drive high one of 16 lines used as vcc for the switches. There is one such line per bank of switches. The output of the 16 switches in all the banks will be fed into a second multiplexer which will be read back to get the value of the 16 switches selected. Isolation between the banks will be provided by diodes between the switches and the input.

Questions:

  • In a circuit like this, is there a need to manage the current or voltage on the switches that are open, or can they just float?
  • What does the circuit for an individual switch acutually contain?