When making cockpit controls you should define all types of inputs to be used and know what type of switches you need to control every function in your cockpit - toggle switch with maintained functions (OFF-ON), toggle switch with one or two momentary positions, push-button switch with either momentary or alternate functions, etc.
For more information about the different types of input actuators, see the tech guide pages (upper menu).
Most of the systems in an aircraft cockpit are controlled with toggle switches, multi-position switches and momentary push-buttons. For parameter value increment/decrement two coupled momentary push-buttons (- and +) can be used in your cockpit. It can be buttons for map zooming, clock setting, trim adjustment, as well as for any other incremental inputs instead of using encoders.
Also, the rotary encoder is a commonly used input device for changing numerical data step-by-step. With SimVimCockpit you can configure any two input pins either for encoder or for a pair of increment/decrement buttons.
Any switch, button, or encoder can be connected to the master controller board directly, without using extension boards. You can use this for initial tests purpose, or if you have a very simple control panel with a few switches, or you just need to add additional switches to your system.
All multiplexers used for inputs are connected to 4 common address lines! So, you need only 4 wires to connect all input multiplexers together and, of course you need to use 2 power lines - +5V and Ground for each board.
The SIG (or Z) output of every input multiplexer is connected directly to the pin assigned in the configurator for this input extension.
The "EN" signal of each input extension board should be always logical "0" (set to GND). Usualy the multiplexer breakout board has a pull-down resistor on this 'EN" pin, so it can be already set to logical "0" but you need to be sure it is, so just connect it to GND.
1. To work with SimVimCockpit correctly, the throw terminals of every toggle switch or push-button should be connected to one input directly, without using any pull-up/pull-down resistors. Another, "pole" terminal is connected to the common GND bus.
2. To work with SimVimCockpit all encoders (or pair of push-buttons) should be connected to Arduino pins or multiplexer pins directly, without using any pull-up/pull-down resistors. Each encoder always occupies two adjacent inputs, and the common "C" terminal of each encoder is connected to the common GND bus.
NOTE: you need to know the positioning of the common ("C") terminal in each encoder, because it can be either in the middle or not.
Read more technical details about encoder types on this page: Tech Guides - Rotary Encoders
3. Toggle 3-position switch uses two inputs (n, n+1) with common (middle) terminal connected to GND and normally when the switch handle is in "UP or DN" position one of two input pins is closed to GND. In middle position both inputs are open.
4. Multi-position (rotary) switch uses as many inputs as many positions it has, with common terminal connected to GND and normally when the switch rorates one input pins is closed to GND.
Before fixing some switch (simple or 3-position) on your panel please read these "connection rules" for SimVim. <<<
For simple On/Off toggle switch used in most common panels there is one rule - when you short the controller pin to the GND - it is always the "ON" state. All you need is to test the toggle switch before and place it the way that it is in OFF state when not shorted to the GND.
You can group a set of switches into one module/panel using multiplexer extension boards. Place several modules in different parts of your cockpit and connect them to the main board using only one pin for each multiplexer and the common 4 address wires that are laid across the cockpit to each multiplexer:
Note: Make sure that the GND wires of all devices and power supplies in your system are all connected to the common GND bus wire (the symbol is used as common ground wires for every device pictured on this website)!
Use +5V source (either from separate power supply or from the master controller board) to power all multiplexers. See more detail about system powering here.
Although we recommend to use the 16-channel multiplexers for inputs, even if you don't use all 16 channels, you can also use the 8-channel 74HC4051 multiplexer when you don't need many switches in one particular place.
There is no difference in code performance because the firmware function always counts it as 16-channel MUX.
Note: if you use the 8-bit multiplexer board you should not connect the "EN" input to the "GND". Instead you need to use the first 3 bus address lines for S0..S2 and connect the 4-th address line to the "EN" input of this multiplexer board.
Assigning the toggle switches, buttons and encoders in the configuration is easy and intuitive process - simply find needed parameter in the the table and select input for it - either direct pin or multiplexer output (multiplexer should be assigned before this!).
You can select any pins for one switch position in any order, but more likely you would choose one sequential set of inputs, when input pins are positioned one-by-one.
In SimVim Configurator most of the commonly used rotary switches are pre-defined as "macros" to ease configuration process. When you select a parameter from the list which is pre-defined as multiposition switch and select the first input number the configurator assigns the next several sequential inputs according to the number of positions. Pre-defined rotary switches stricly use only sequential inputs.