This page describes how to use some stepper motors with ArdSim/ArdSimX Interface. As for basic principles and construction of stepper motors (bipolar/unipolar), controlling types (full step, half step, etc.), you can find a lot of information in Internet.
Making gauges for the simulator using a stepper motors has some advantages against servo - they can be used for continuous full-circle rotation with high precision and they can be less noisy. On the other hand, stepper needs more tricky programming to get the real-time data and turn it into rotation without stuttering.
If you have your own custom code or use external library for stepper motors you can just use ArdSim/ArdSimX to receive data from X-Plane and then use these data to control your steppers.
But ArdSimX has inbuilt program module that allows you to use any dataref data directly, linking it with pre-configured stepper, without need any other libraries and additional programming. Just select needed parameter in the configurator, select Arduino pins and configure needed stepper motor mapping.
Many stepper motors can be used for gauges, but best choice to make your own instruments - using a car dashboard instrument steppers, such the Switec X25, X27, VID29 and similar low-current steppers (these motors draw about 20 milliamps per winding). You can get them for a price of $3..5 a piece on Ebay, AliExpress etc.
The X27.168 stepper is used in car speedometers which rotate less than a full circle. This motor has internal stop which limit its shaft rotation to 315 degrees. This limiter allows you easy to use the stepper "As-Is" for most instruments with a limited arrow rotation angle (less than 315 degrees) like ASI, VSI, all engine instruments etc. On the start the program move the needle against the stop to zero position. You need to fasten the needle on the shaft exactly in this zero position to exclude its misalignment
To make the instruments with continuous rotation (like compass card, altitude indicator, directional giro) you will need the motor without internal limiter. In these steppers you can easily remove the stop, just disconnect carefully a pair of plastic half shells which snap together without a glue, and cut off the plastic stop located on the gearwheel using a sharp blade:
In the case of free unlimited rotation some modifications need to be made to the steppers to add a sensor for the "zero" positioning, so that all steppers might reset to their initial position on startup. Using physical contact sensors seems to be simple but may not be useful when you use weak stepper with low torque like X25. To use hall effect sensors you'll need very small but strong magnet attached to the arrow.
A good way is to use an optical (infra-red) sensor - pair of infrared LED and IR photodiode, as shown in the picture, using the instrument needle as the "mirror" that deflects the light from the LED onto the sensor. You can glue a piece of tin foil on the back on the needle for better deflection, but for us the white plastic arrow worked great as it is with diode connection as shown on the diagram below.
The optical pair is placed behind the faceplate on a distance of about 3..5 mm and the faceplate has a small vertical gap in front of it (about 2 mm width) - this will exclude the external light interference. For instrument which has no needle but has rotating card just use a black matte surface on back side of this card with a thin white line or strip of foil aligned with a "zero" on the face side.
The ArdSimX start-up sequence program moves all steppers toward of "zero" position , and all steppers (with the sensors or with a limiter) would take their position. After this sequence all steppers will be moved to their work position accordingly with incoming data from the plugin.
One of the most convenient way to control stepper motors is use of a special controller chips. ArdSimX controls stepper motors with external stepper motor controller IC - VID6606, STI6606Z or AX1201728SG. All these chips are the similar clones and have 4 drivers for 4 Switec motors and it is specially designed for these type of steppers. Another option - use the STI6608 chip that is the same as all above but has 2 drivers to control two Switec motors.
All such drivers have two main control inputs - "DIR" and "STEP" for each one motor, so, to control one stepper you can switch its rotation direction with "DIR" signal and move it with "STEP" signal.
But in ArdSimX "DIR" inputs of all connected steppers are combined that allow you control of more motors with one Arduino, using just one output pin for each one stepper, plus one common "Direction" pin for all steppers.
Note: For the stepper with positioning sensor one more Arduino pin is used as sensor input. This pin always follows the "step" pin assigned for this stepper (N - "step" pin number, N+1 - sensor pin number).