Analog Input


The simulator parameters changing in a certain range can be controlled in two ways: relative (incremental) or absolute change of value. In the first case, the value is changed step by step using an encoder or two "+/-" buttons, in the second case - using any absolute positioning sensor.


ax

The SimVimX system uses resistive sensors, typically variable resistors, connected to analog inputs (A0–A15) as a voltage divider (potentiometer) to control parameter values according to the position of controls such as primary flight controls, engine levers, flap or brake handles and cockpit/instrument lighting.

Also, in some cases you can control pointer position in some instruments (for example, radio altimeter) or even trims, using analog sensors instead of rotary encoders.

ax

The SimVimX plugin receives data from the master board and converts sensor movement range into the range of dataref values and sends a new value to X-Plane every time the sensor position is changed by one step of predifined precision (sensitivity).


Connection

Although the Mega2560 board has 16 analog inputs, the controller itself has only one analog channel and all these 16 inputs (A0–A15) are connected to an internal multiplexer, so data from each analog input is read sequentially over a short period of time.

Any suitable potentiometer with full-stroke resistance of 3k to 10k can be used. Actually you can use any pot, but with lower resistance the circuit is more tolerant to electrical noise from the power lines. In general, 5k potentiometer value is just fine.

ax

You can use all analog pins to control up to 16 axes, but of course if you need only a few axes, any other analog pins can be used as digital inputs or outputs, direct or extended:

ax

NOTE: along with a stabilized +5v power supply for all potentiometers, I recommend to add an electrolytic capacitor (500-1000uF) between +5v and GND close to the group of potentiometers, or directly solder the capacitor between gnd/5v legs of every pot (about 1000uF summary) if you have the pots in different distant places.

Analog multiplexer

SimVimX supports one multiplexed analog input, allowing for an additional 15 axes.

Why only one? Because adding more multiplexers to the chip's built-in multiplexer (see above) isn't very good from a performance standpoint. Adding another 16-channel analog multiplexer and having a large number of axes requires too much valuable processor time, which could impact the operation of other I/O devices.

Furthermore, 31 axes are usually more than enough for any complex cockpit.

ax

When do you need an axis multiplexer?

  1. If most of the Mega2560's analog inputs are used for digital inputs (switches) or outputs (LEDs, LCDs), and you only have one or a few free analog inputs.
  2. If you need more than 16 axes. In this case, I would recommend using an axis multiplexer for low-resolution control, such as brightness knobs.

Note that you don't necessarily need to use potentiometers for all brightness knobs. They can all be implemented using encoders (non-absolute position devices) and all brightness values are saved by the plugin after a reboot.


I'm also considering adding dedicated slave boards to the system architecture for the analog inputs only. In this case, a small Nano board could be placed next to the knob cluster and connected to the master board.



INPUTS
KEY MATRIX INPUTS
Key Matrix Board Pre-set Matrix
Support the project by subscribing to our Patreon

dwn dwn
1-6