The most important component used in the SimVim system for input expansion is the CD74HC4067 multiplexer. The CD74HC4067 module (16-channel multiplexer) is widely available online as a cheap breakout board (less than $1 for a piece). Also, you can use the 8-channel 74HC4051 multiplexers if needed.
CD74HC4067 is useful for the system with large number of inputs and works as simple multiposition electronic "switch", when only one of the 16 channels is connected to the signal line at any given time. The 4 address inputs on this board (S0...S3) are used to select one of 16 ports (0..15) to be connected.
The SimVim firmware code periodically, very quickly scans all the assigned multiplexer inputs, reads each input state, and if it has been changed since the last scan, the program saves it and sends a data packet to the plugin (synchronized with the simulator FPS).
To extend the number of inputs to 16 you need to connect an extension board to SimVim address bus as described here, and select any free pin number for this input extension. The "SIG" (or may be "Z") output of every input multiplexer is connected directly to this pin.
So, you can connect 16 toggle switches or momentary buttons to the multiplexer inputs, or use appropriate number of inputs for rotary switches and encoders.
The most reliable way of wiring these extension modules is to place the board close to a group of switches and solder them with thin wires:
If you noticed that some of your assigned switches or encoders are not stable, for example they send excessive On/Off signals when you activate them, do not cosider this a switch bouncing problem, as SimVim firmware code has good debounce protection. If you see that switches in your virtual plane cockpit are occasionally "flicking" when the real swithes are in OFF state, that means you have either missed common GND or "noisy" electric environment in combination with rather long wires.
The multiplexer Z (or SIG) output wired to the master board input has high-impedance "open" state and the wire can catch such EM interference that depends on the electic noise level in power source lines and other surrounding wires. Although every assigned controller board input pins already have internal pull-up resistors connected, their 50k nominal could be not effective enough for long wires.
Thus, if you have long wires between the switches and the multiplexer inputs, or between the master board and the multiplexer "Z (SIG)" output, you need to place an additional pull-up resistor ( 2 to 10 KOhm ) between MUX Z (SIG) output and +5V as shown in the picture above.
You can group a set of switches into one module/panel with 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:
To extend a number of 7-segment displays in SimVIm, the CD74HC4067 module can be used as output multiplexer. One muliplexer can control up to 16x 7-segment displays. The difference from the input MUX lies in the wiring and the signals direction, in this case the Z (SIG) is used as input and all 16 channels as outputs.
Note: You can use several multiplexers for output, but probably only one output extension board will be enough for whole your system.
Five inputs (S0,S1,S2,S3,Z) of multiplexer are connected to the 4 address bus lines and one "S" (SIG) line. The "EN" input is connected to the controller output pin assigned for this output multiplexer board.
The SimVim firmware program receives formatted data from the plugin that need to be changed for particular display. In the moment when needed channel is opened it sends data for output device connected to the selected channel.
Note: Any single extension board can be used either for inputs or outputs only! Don't try to connect switches to output multiplexer.
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.
1. SimVimCockpit supports multiple serial outputs (up to 64x LEDs for one signal line), for this you need to use LED drivers or shift registers (see the details in the Wiring Guides).
2. SimVimCockpit also supports "LED matrix output" (up to 64x LEDs for one output), for this you need to use the MAX7219 controller .
3. To extend the number of PWM outputs in SimVimCockpit use one 24-channel PWM driver TLC5947 ).
4. For stepper motors control additional SimVim Stepper controller board is used. It is one Uno or Nano Arduino board with special SimVim stepper control firmware uploaded to it from the SimVim plugin menu.
5. For servo control additional SimVimServo controller board is used. It is one Uno or Nano Arduino board with special SimVimServo control firmware uploaded to it from the SimVim plugin menu. Also you can use the WitMotion 16-32-channel Servo Controllers.
6. Support for Button Matrix Extension board, the "SimVimMatrix" firmware is added and the "Matrix" board is included in the configurator.