An Easy Approach to an Analog Gauge
The Switec motor is an unassuming bit of plastic and metal that is found behind the dashboards of many American cars and trucks. Itís only a little over an inch in diameter, but it reliably swings tachometer, speedometer, and fuel gauge needles mile after mile. Given that itís easy to use and readily available though Ebay, itís amazing that itís not a common item in DIY flight sim projects.
This particular Switec motor, a model X25.168, is a stepping motor with a built in 180 to 1 reduction gear. The stepping motor portion consumes little power, generates low torque and moves in big steps. Once the reduction gear does its magic, the unit still consumes little power, but the torque has been multiplied to a respectable level, and the steps have been reduced to a third of a degree.
The X25.168 model was designed for gauges like speedometers which rotate less than a full revolution. It has internal stops which limit rotation to 315 degrees. These stops make the motor easier to use. When a stepping motor gauge is first turned on, the gauge controller must make sure the gauge pointer is aligned with zero on the face plate. If the motor has no stops, the gauge designer must provide some sort of position sensor like an optical interrupter. If the motor has internal stops, no sensor is needed. The gauge controller can simple step the motor long enough to be sure the motor is stalled against one of the stops.
There are other Switec models which lack internal stops and can rotate freely. These might be suitable for projects like a vertical card compass or a directional gyroscope, unfortunately the only model which appears readily available is the one with stops. I havenít tried, but the stops might possibly be removed. The motor case consists of a pair of plastic half shells which snap together. It doesnít appear that glue was used.
The motor draws about 20 milliamps per winding. This is easily handled by microcontrollers like the PIC. In fact, the Switec spec sheet specifically says the motor can be directly driven by a microcontroller. However, Iíve always had reservations about driving inductive (magnetic) loads with a microcontroller output. All too often inductive loads generate voltage spikes which do nasty things to electronics not specifically designed for such duty. I could add protection circuitry I suppose, but if Iím going add extra circuitry I may as well use a chip made for driving motors, like the L293D, which is what Iíve done in the picture below.
Stepping motors are a natural partner for microcontroller circuitry, either readymade like the Arduino, or home brewed like the PIC16F648A example below. The Switec X25.168 is a particularly good partner when youíre in the process of making your own steam-gauge style instruments. It was designed specifically for gauge duty, is easy to use, and is readily available for about $4 through several vendors on Ebay.
Mike Powell, author of
Building Recreational Flight Simulators,
Building Simulated Aircraft Instrumentation, and
Building Simulator Display Systems. (A work in progress)