Incremental rotary encoders are used in the simulator interface as rotary knob controls to simulate instruments knobs mechanically geared with dials/needles, or for radio and autopilot data setting knobs, etc.
For your home cockpit you can use any cheap mechanical rotary encoders that can be found on AliExpress or Ebay. Don't look for some "special", "branded", expensive encoders., any cheap encoder ($0.3 ... $1 for a piece) works fine with RealSimControl fimware. There is absolutelly no difference in work between $0.5 encoder and $30 "brand" encoder in your home cockpit!
Depending on usage in your cockpit it can be a single encoder, dual (coaxial) encoder, or encoder with built-in push-button to switch it's modes.
The connection is simple - to work with RealSimControl all encoders should be connected to Arduino pins or multiplexer inputs directly, without using any pull-up/pull-down resistors. The encoder always should occupy two adjacent inputs, and the common "C" terminal of each encoder 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 for different encoders. Read more technical details about encoder types below on this page.
If the encoder has a built-in push-button switch you can use it as any other "standalone" button for any simulator command, not linked with encoder itself, or as push function for encoder mode switching, to control more than one parameter with a single encoder.
Assigning the encoders in the configurator is easy and intuitive process - simply find needed parameter in the the appropriate category map, click the parameter and select the first of two inputs (N) for it - either direct pin or multiplexer input (multiplexer should be assigned before this!). You will see the assigned input in the configuration table and the next input (N+1) with the "^" sign.
An encoder type and its acceleration or single-step options can be configured in the plugin input settings menu (see below under the encoder types description). The configurator is only used to assign a parameter to the encoder.
Just assigning encoders in the configurator is not enough to get them working correctly
You should use the plugin menu to set the correct type and other options for every connected encoder, testing how it works right away. After connection with the board is established, open the "Input Options" menu in the plugin and rotate the connected (and configured!) encoder.
Options for this encoder will appear. Select the correct encoder type (if you know it) and click "Save/Reconnect". The selected type and acceleration will now be saved in the plugin for this encoder (based on the board pin number).Selectable options:
Rotary encoder has two output terminals (A,B) and one "common" C. Each output is cyclically connecting to the "common" terminal when the shaft is rotated, and the encoder generates a shifted sequence of On/Off signals on its two outputs.
This code sequence can be processed by the controller (or hardware circuit) as direction and velocity. Commonly, in relation to the simulator, we need to get the moment of state change and its direction.
The number of phase changes in 360 degrees of rotation can vary for different encoders. For example, having 20 full phase cycles per rotation, or 20 PPR, the program can detect 80 state changes ( 80 combinations of "On" to "Off" states on A and B outputs).
Usually the encoder shaft has several fixed positions (switch effect) in full 360-deg range, that define the "touch-feel resolution" for you when you rotate the knob. An encoder may have 8,12,16...20,24,32 detents, and a smaller detent number may give you more sensory control when entering parameters which need fine step-by-step change. On the other hand, large number of small steps (or even complete absence of detents) is mostly usable in consumer electronic as volume regulator, etc.
An encoder phase state in detent position is defined by encoder construction that may have one of the main 3 types, described below.
On the program side, within one physical "click" 1 to 4 phase changes may occur, depending on the detent type. The program should be able to detect all the phase changes between detents to determine the direction correctly, making only one step per detent to avoid excessive value change or step skipping.
Encoder of this type has one full cycle per detent (4 phase changes), it differs in that it is always in the same phase state at each detent and when encoder is rotated by one "step", its outputs phase changes 4 times between two fixed positions what allows the program to reliably detect an encoder direction and speed.
Encoder of this type has a half cycle per detent, when encoder is rotated by one "step", its outputs change 2 times between two fixed positions.
Encoder with detent in each phase position (detents in 00,10,11,01), when encoder is rotated by one "step", its outputs change by one phase state and provide full resolution.
Often you can find and buy some sort of breakout board with encoder soldered in it, but it only increases the price for you. If you have bought such board, and you are going to connect it as you have read somewhere about its connection, don't do that, don't connect it to 5V! The marking (+Vcc, GND, SW, DT and CLK) on this encoder board has no practical meaning in relation to SimVim connections. All you need is only encoder itself.
Just desolder the encoder and throw away the PCB, use encoder as we described. Or, you can make changes as on the picture below:
Note: All encoders I have (a lot of encoders of different types) are cheap and any of them can be perfectly used with RealSimControl firmware, Here are some examples:- LINK1 - $0.25 / piece, no button