SimVimCockpit plugin monitors simulator parameters and translates them into signal sequences for every connected stepper motor. Firmware receives that data and converts them into specific stepping pattern for every motor, keeping track of amplitude and speed of change, simulator FPS rate and code loop timing, to eliminate jumps and ensure smooth movement.
Any stepper motor should only be used with a special controller (driver) that is capable to drive the selected stepper motor and must have the required output current, operating voltage, step frequency.
Be noted, that these controllers are not simple drivers like ULN2003, which is just a current amplifier used between the low-current microcontroller outputs and high-current motor.
Only those controller chips or boards that include STEP and DIR control inputs (also can be marked as Clock and CW/CCW) - can be used with SimVimCockpit.
X27.168 and similar motors are considered as default for SimVimCockpit firmware program code and all parameters are pre-defined for use with them. These motors are suitable to replicate most of aircraft pointer instruments and can be driven with controllers, designed specifically for these very low-current motors, read more here >>>
But, it is possible to use other stepper motors with SimVimCockpit. Be aware, though, that most of them require much more power to run, in terms of current consumption or operating voltage. Use only appropriate controllers and power supply for powerful steppers!
In current versions of SimVimCockpit you can control stepper motors using additional SimVim Stepper controller board. It is simply one Uno or Nano Arduino board with special SimVim stepper control firmware onboard (that you can upload from the SimVim plugin menu).
This "slave" board is connected with the Master controller board, getting data intendent for the steppers. The internal code of the slave board is fully dedicated to generate correct positioning, speed/acceleration move for multiple stepper motors.
The "slave" controller board (Uno, Nano) is linked with the Master controller board using serial interface, when Tx output signal of one board is connected to the Rx iput of another board.
For the stepper control the Tx1,Rx1 ports are used in SimVim. So, you should always connect the Tx pin (#1) of the slave board with Rx1 pin (#19) of the master board, and "slave" Rx (pin 0) - with the "master" Tx1 (pin #18).
Note 1. Never forget to connect the GNDs of each board ( and other devices as well) to the common GND wire.
Note 2: When you need to upload stepper control firmware to the slave board you need to disconnect the Rx,Tx wires before uploading! To simplify this you simply can add a "shut-off" switch breaking this two wires.
Another option - you can leave the Rx/Tx connected, but press the Reset button on the master board and hold it while uploading stepper firmware to the slave board.
The slave board receives all data from the master controller board only. So, you don't need to keep it connected to USB port after the SimVimStepper firmware upload. You can use any +5V source connected to the slave board using USB connector, or +5V pin. It can be the same source that is used for feeding the stepper motor controllers (AX1201728SG or VID6606, STI6608).
When you select a parameter for stepper output in the configurator you should enter some options depending on the instrument type.
1. If this instrument has a 360-degree continuous scale (heading indicator, altimeter), you only need to select the stepper output number for it. A zero-position sensor needs to be used for this stepper motor.
2. In case you select a parameter for a stepper-driven gauge that has limited pointer rotation angle you have to enter the maximum angle of the pointer rotation and map several data values to corresponding angles (from 1 to 10 sectors, depending on non-linearity factor).
By default, a stepper motor used in a gauge with limited-angle rotation may not have a zero position sensor and is just halted at the end position with a mechanical stop (usable only for low-torque motors!). For proper indication, the needle of the gauge should be aligned with its initial (min) position when the stepper is in its stop-end position. How to calibrate the stepper needle.
But as an option (especially if you have a stepper motor without a mechanical limiter or with high torque) you can add a sensor to it.
If your indicator has a zero-position sensor (either optical or mechanical switch) you should mark the "Zero-Sensor" checkbox when configuring it.
1. You can assign two parameters for output to one particular stepper gauge and make it dependant on some input (switch) state or specific parameter value. For example you gauge may show voltage from different sources.