Steppers in SimVimCockpit
Stepper motors, Tech Guide

Stepper motors for cockpit instruments

Note: here is described how to use some stepper motors with SimVim Interface. 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.

Low-power X25.xx - X29.xx stepper motors

No doubt, one of the best choices for replicating most of aircraft panel instruments is using small bipolar stepper motors X27.168 (or X25, VID29 and other similar ones) that are used in car and motorcycles dashboards nowdays. You can get these steppers for a price of $3..5 a piece on Ebay, AliExpress, etc.

To control these very low-power motors (which draw about 20 mA only), you need to use the driver chips which are specially designed for such motors:

VID6606, STI6606Z, AX1201728SG or STI6608 chips

One such controller chip includes 4 low-current drivers and provide very precise positioning - 12 micro-steps per degree for 4 stepper motors (the STI6608 controls 2 motors).

These controllers can be found online for $1 ... $2 for the chip (check the links above). Also, along with driver chips, you can buy very useful small boards (for $0.1 for a piece) that will allow you to make a breakout board yourself and save some time and money.

Using a small soldering iron you will make a good "breakout board" for 4 stepper motors just in a few minutes and spending $2 (chip + board + header strip). If you want, you can make PCB (below is the sample of a possible one-side PCB design), but this is absolutely not necessary.

All 4 Switec stepper motors should be connected directly to the controller outputs, without using additional diodes or resistors, as shown in the connection diagram for VID6606 below. Pay attention to the steppers pin numbering.

Instruments with limited rotation

X25.xx - X27.xx stepper motors have an internal mechanical stop (sii the picture below) that limits shaft rotation to 315 degrees. For most instruments with an arrow rotation angle less than 320 degrees you can use these stepper motors without any modification - no need to make zero-position sensor (though you can).

In this case, when SimVimCockpit is started or reconnected, the firmware program moves the motor shaft until it stops against the limiter and resets its position counter.

If you have other stepper motors with unlimited rotation, you can use them for the sectoral gauges too, simply adding the mechanical stopper at it's "zero" position. It can be a pin that stops the needle rotation in the leftmost position. If the motor has a high torque you still can use this method, fastening the needle in such a way when it can rotate on the shaft when it stops by the limiter.*

* On the other hand, for high-torque motor you can add the momentary limit switch (button) as a simple position sensor. It can be placed on the other end of the stepper motor shaft, as it's shown in the right picture

Instruments with a full-circle rotation

To make an instrument with continuous rotation (like compass card, altitude indicator, directional needle) you need a motor without internal limiter and thus, it should have a position sensor to define the initial needle location. It can be a thin electric contact wire, IR opto sensor, or Hall-effect sensor.

You can easily remove the stop for the Switec X27 motor, just carefully open the pair of plastic half shells of the stepper's body (they snap together without glue), and cut off the plastic stop located on the gearwheel using a sharp blade (see the picture).

Positioning Sensor (opto)

A good way to make a position sensor is to use an optical (infra-red) sensor - a 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 reflection, but for us just a white plastic arrow worked great, with diode connection shown on the diagram below.

The optical pair is placed behind the faceplate at 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 external light interference. For instruments that have no needle but have a rotating card just use a black matte surface on the back side of this card with a thin white line or strip of foil aligned with "zero" on the face side.

In this case, when SimVimCockpit is started or reconnected, the firmware program moves the motor shaft until the needle/card cross the position sensor and resets its position counter.

Stepper motor driven instruments, demo

Other stepper motors

Besides X27-like steppers, others stepper motors can be used with appropriate controllers/driver boards that have "STEP" and "DIR" inputs, for example A3967 chip ("EasyDriver" board) or DRV8825 and other.

NOTE: Most stepper motors can require quite much power to run. If your Arduino is powered using an external power source via the power jack (7-12V opposed to 5 volts from the USB source) and your stepper needs power source of 7..12V you can access it through the Vin pin on Arduino board. This allows you to power the stepper with the same power supply (but you need to be sure that this PS's maximum current will be enough for all connected stepper motors).

You will need to enter the number of steps per 360 degrees for your stepper when you select it in the configurator. The default is the number of microsteps for X25, X27 and similar steppers used with the controllers described above only!

28BYJ-48 stepper motor with gearbox

This is a stepper motor widely used in various hobby constructions, and you can use it with SimVimCockpit too. It's a unipolar motor but it can be easily converted into bipolar to work with controllers that drive bipolar stepper motors.

Information into this chapter will be added after all hardware tests with 28BYJ-48 stepper motor

© Copyright 2012-2018 - SimVim