Free Flight Computer

Home

Introduction

Specification

Photographs

Screenshots

HARDWARE

Software

Utilities

Physics

History

Traces

Links

How do I get one?

Unfortunately you have to roll your own. This is not a product and I won't be constructing units for people. It was always intended as a bit of fun and my contribution to open source development and so I present it.


Schematics

There are three sheets of schematics, best printed out to A4 landscape. They are black and white gif images, a technique I find easiest and quickest to work with:

Sheet 1 of 3
Sheet 2 of 3
Sheet 3 of 3

Originally (four years ago!) drawn on paper I then scanned them in as 256 colour greyscale and decreased colour depth to 16 colours. I then manually reduced the colour depth to just black and white by setting the palette myself. Since then I have cut, paste, redrawn and added text using Paintshop Pro as the circuit has evolved.


Description

The hardware has been through several iterations but has ended up as a straightforward microprocessor circuit. There are some aspects worth discussing which I will go through below.

Overview

The PIC16F76 is at the heart of everything and is driven from a 4MHz crystal. This interfaces to a MAX3223 level convertor for providing an RS232 level interface when required. It features auto power shutdown when not in use, which is the majority of the time.

A 32 kbyte eeprom for storing barograph and settings hangs off a serial bus shared with the analogue to digital convertor (ADC).

The ADC is a cheap 16bit sigma-delta chappie from Analog Devices - the AD7705. It does have some shortcomings as I discovered; the inherant noise is 3 bits even with a perfect incoming signal. Consequently the software has to be a bit clever and average the readings.

Pressure sensor and signal conditioning

The main pressure sensor is a Motorola MPX4100A and makes life really easy. It is linear and temperature compensated from 200 mbar (0.5V) up to and beyond 1000 mbar (4.5V). Consequently it is capable of being directly interfaced to an ADC. With this particular ADC however it is not as easy!

When the AD7705 is operating in buffered mode it can only accept signals to within 1.5V of the positive supply. In unbuffered mode an external buffer would be needed to source current for the switching conversion. There was therefore a choice - external buffer or internal buffer and attenuate the input so don't go past 3.5V. I chose the third option ;)

The TS3V914 is a low voltage rail to rail op-amp so is our man for the job and as we now have an external amplifer we can improve on our resolution. By using a 2.5V reference instead of 5V and setting the max to 1050mbar and minimum input level to 330mbar we get 91 bits per mbar instead of 62. This is very important for obtaining a sufficiently fast vario response time; more bits = more resolution for vario or faster response. See the physics section for sums!

Temperature sensor

Also attached to the AD7705 is a temperature sensor. As it has a relatively high output level signal we can obtain sufficient resolution with the ADC without any additional gain circuit. To prevent problems with self-heating, and save current, it is only 'switched on' when a measurement is taking place.

Variometer

With this version of hardware there is no sensitive variometer circuitry to worry about. I gave up on this after many, many attempts to get it right. Instead I found a more robust and reliable method was to derive this in software from differences in the altitude readings. The downside of this is that the update rate is not as much as I would have liked, though still sufficient.

Sounder

The vario sound is generated by the PIC's PWM circuit. This does impose some limitations as to what frequencies we can use (see squawk.xls from ffc.zip in the software section) but the advantage is less external hardware.

The piezo buzzer drives uses HCMOS inverter gates (74HC04) to efficiently switch between Vbat and 0V. As the high threshold is half of its supply we can interface direct to this from the 5V piezo drive signal.

Both sides of the piezo are driven to increase the volume through a voltage doubling effect. As the piezo has a capacitance of 18nF it takes a finite time, determined by the series resistance, for the voltage across its surfaces to change. As this is greater than the period of the PWM signal the voltage is doubled and results in a very loud piezo sounder. The series resistance consists of the output impedances of the 74HC04 drive, and the external series resistor. This isn't really necessary but just "belt and braces" to ensure the maximum current drive of the invertors are not exceeded.

The remainder of the piezo drive circuit is used to switch off the drive when the pwm signal has stayed low for a short while. This is necessary as a DC component across the piezo will cause it to breakdown at high humidities.

This is achieved by using two diodes to OR a reset voltage with the input pwm signal. This reset voltage comes from a simple RC circuit where the charging time is longer than the discharge time.

This circuit is a very good candidate for computer simulation, and was in fact first successfully run on MultiSim version 7. The demo is available free to download (73Mbytes!) or on CD from Electronics Workbench. It is very easy to use and features virtual instruments you just drag and drop. You cannot save on the demo version but apart from that is fully functional.

Other analogue inputs

The three other analogue channels are read by the multi-channel 8 bit ADC present in the PIC. Two of these are the potentiometer knobs for setting estimated headwind and required 'goal' height for the speed to fly calculations. Strictly speaking they should be 10k rather than 100k which is too high and causes some measurement error. In this case however we don't care and would rather have less current.

Airspeed indicator (ASI)

The third analogue channel on the PIC is used to read from the pitot tube pressure sensor. This is another Motorola high output level pressure sensor but this time gives a relative reading and has a maximum output of 40mbar. Above 17mph this gives sufficient resolution for us to get away with using an 8 bit ADC. Again, please refer to the physics section for details.

Keypad

The last remaining hardware block I've yet to describe is MMI and keypad. As there aren't enough pins on the PIC to go around these again share lines where possible. The keypad is scanned in a fairly standard matrix sort of way when display is not being updated. Note the strategic use of resistors.

LCD

The LCD module is a 20 x 4 type with contrast tied to 0V. You could improve this by having a negative voltage generator but this would give you more noise in the ADC reads. With the specified module there is no problem reading it when contrast is as currently set.

Finally, the interface to the LCD module is terminated with some series resistors to reduce overshoot by the signal edges. The ground and power supply are also several strands of ribbon cable in order to avoid noise on supplies when the module is being written to.


Construction

To aid construction I have put together a parts list, and generated top and bottom side PCB artwork in PDF format:

Parts List (.xls)
PCB top artwork (.pdf)
PCB bottom artwork (.pdf)
PCB silkscreen (.pdf)

If you consider doing your own PCB layout is it important to consider the return paths of the current so as not to upset sensitive (ie small signal) parts of the circuit. For this reason the signal ground goes to the adc ground which goes to digital ground. The more power hungry parts of the circuit are also closer to the battery. You also need to ensure capacitors are placed where they will be needed.

Once all constructed and safely powered up, you then need to run download.bas to send initial settings to eeprom; then power cycle the altimeter. You can find this program in in ffc.zip in the software section.

The default eeprom image sent to the altimeter contains approximate calibration settings. More accurate calibration is fairly simple and performed after noting readings using the supplied program; or directly using hyperterminal. The calibration program then calculates the required numbers and sends them down for you.



Back to top ...