Airspeed and Altitude Instrument

(a SimmStick Project)

 

Abstract:

For the last several years, I have been building a small two place airplane. Much of the work to date has been construction oriented, but as the cockpit area nears completion, I have been looking into instruments as needed to complete the project. This list of instruments is rather lengthy and includes required flight instruments as well as many smaller informational instruments that display volts, amps, fuel levels, temperatures, etc (i.e. non-flight critical supplemental information). As I began to shop for the instruments and panel gauges, I noticed that the total expense was quite high per gauge depending on the function. Furthermore, each sensor is usually connected to a single 2 1/4" diameter gauge that tends to fill the available panel space in an already crowded area.

The majority of the modern instruments that I ran across were electronic LCD based, but still setup to mount into the 2-1/4" panel hole. I began to wonder if using an 8051 based processor coupled with readily available A/D, display interface, and electronic sensors could replace the bulk of the instruments normally found in a small aircraft. This research led to the realization that the world of sensors and A/D converters has been exploding in the last few years (probably as a result of the auto-makers and other industry utilization). At this point, I decided to plan a prototype instrument that not only read 0-5 Vdc on a single display, but would also interface with a couple of the more interesting sensors that I had run across. This would realize the goal of building an integrated display device that had the following features.

 

In order to see what might be accomplished with a fairly simplistic approach (i.e. not too much time or money invested), I decided to look for a small microprocessor based platform that could be mated with the following hardware:

 

After some time on the Internet, the SimmStick platform using the Atmel 89C2051, or possibly a PIC processor, seemed like the best choice. This platform coupled with two of the Motorola pressure sensors would yield a prototype instrument that could be used for barometric pressure measurement, altitude measurement, and airspeed measurement, or expanded to display more sensor information as needed.

The major hardware pieces of the project became:

Block Diagram:

A block diagram of the major functions and pieces of the project is listed below.

Note that as the project planning developed, and the pressure sensor/instrument took shape, the following additional hardware was obtained to see how it might be integrated with the original pressure sensor instruments. Although part of the hardware developed, the software to access these devices is not part of this project.

 


 

Prototype Construction:


SimmStick Motherboard:

The SimmStick motherboard is assembled as suggested in the Dontronics web based instructions with the following notes:


 

SimmStick CPU:

The SimmStick CPU is assembled as described on the Dontronic's web page for use with the AT89C2051 processor with the following notes and additions:

 

SimmStick Prototype Board - A/D interface:

The SimmStick prototype board contains the 12 bit A/D interface. Both the two channel LTC1298 ADC and the eight channel 12 bit MAX-186 ADC are shown, however, only the two channel LTC1298 is used in this project. Note that the chip orientation is setup so that the analog signals into the chip are along the upper edge of the prototype board, while the digital inputs and outputs are along the lower, bus edge.

LTC1298 - 12 bit, 2 channel ADC Diagram:

MAX-186 - 12 bit, 8 channel ADC Diagram:


 

LCD Module:

The LCD module is a standard 4 x 20-character display setup for four bit data transfers into the 14-pin connector (shown at the top left edge). A connector on the top right hand part of the DT104 CPU board connects to the 14-pin ribbon cable that in turn, connects to the rear of the LCD module via a small VERO board adapter. This adapter/connection contains the LCD contrast POT and also wires to the quadrature switch (described later).

The display is showing a typical static reading of 29.58 "Hg and a corresponding ground elevation altitude of 661 feet (the elevation of my desk). The airspeed sensor has zero differential pressure across the transducer and is also reading zero Knots. 


2 Bit Quadrature Encoder Switch - User Interface

The 2 bit,16 detent position, quadrature, encoder switch provides the user with access to various LCD displays and adjustment of the altitude (i.e. barometric offset).

As the switch is turned through it's detents to the left, the display scrolls up a line and as the switch is turned to the right, the display scrolls down. This feature is used to put not only the sensor information on the display, but to be able to scroll the information up in order to view additional information or debug information.

.

.

Power Supply:

 The SimmStick motherboard can be connected to either a wall transformer converted to 8-13 Vdc or connected to a battery when portable operation is desired. The nine-volt battery (shown to the right), operates the SimmStick processor, display, and sensors for about twenty hours.

When connected to the AT89C2051 programmer board, the SimmStick motherboard must be connected to a 15 Vdc wall transformer supply.

.

.

.


Altitude Sensor:

The altitude sensor is derived from a Motorola MPX4115AP absolute pressure sensor. The sensor is calibrated and temperature compensated to provide linear 0 to Vref/Vsup signal over the sensed range of 0 to 16.6 PSIA (pounds per square inch, absolute). The sensor uses a "ratio-metric" output with the supply voltage and the ground as the range and zero respectively. Of note are:

 


Airspeed Sensor:

The airspeed sensor is like the altitude sensor with the following exceptions:


 

Software:

The software is written in C and comprised of a main program and a few hardware interface functions. The table below defines how the digital I/O points on the AT89C2041 are wired to the respective devices. These connections define how the software accesses the respective devices via the AT89C2041 digital I/O architecture. Of the fifteen available digital I/O pins, P1-1 is neither used for input or output and can be utilized for a chip select on another device. The rest of the I/O pins are used for hardware access both on and off the DT204 board.

Currently, the MAX-186 8 channel ADC is included for future additions of other sensors in addition to the altitude and airspeed sensors.

Table 1: Hardware/Software Configuration

AT89C2051

Port

SimmStick Bus

(pin number)

LCD Interface

Rotary Encoder

Switch

RS-232

Serial Port

LTC1298

2 channel A/D

MAX-186

8 channel A/D

P1-0

D0 (pin 15)

-

-

-

CS (out)

-

P1-1

D1 (pin 16)

-

-

-

-

-

P1-2

D2 (pin 17)

-

-

-

-

CS

(pin 18)

P1-3

D3 (pin 18)

LCD_EN (out)

-

-

-

-

P1-4

D4 (pin 19)

D3 (out)

-

-

SCLK (out)

SCLK (out)

(pin 19)

P1-5

D5 (pin 20)

D2 (out)

-

-

Din/Dout

Din/Dout

(pin 17&15)

P1-6

D6 (pin 21)

D1 (out)

-

-

-

-

P1-7

D7 (pin 22)

D0 (out)

-

-

-

-

P3-0

SI (pin 12)

-

-

RXD (in)

-

-

P3-1

SO (pin 13)

-

-

TXD (out)

-

-

P3-2

D8 (pin 23 )

-

-

-

-

-

P3-3

XD9

-

A (in)

-

-

-

P3-4

IO (pin 14)

-

B (in)

-

-

-

P3-5

SCL (pin 10)

-

C (in)

-

-

-

P3-7

SCA (pin 11)

LCD_RS (out)

-

-

-

-

 

The C files/functions (contained in the associated zip file) that acquire the A/D data, create the altitude and airspeed measurements, and then display the data on the LCD module, are contained in:

Other functions are also included that handle the serial port and other utilities. The present memory map is quite full, and additional software may require the use of the AT89C4021 with 2Kbytes more memory. In any event, all of the source software that is used to program, download, and run the Altitude/Airspeed instrument application is included in the zip file.