Home | Articles | Dutch

General reflections | Mechanical construction | Electronics | Visual Basic Program | Conclusion


Building aircraft instruments for Flight Simulator:

For a long time now I was looking for the still missing motor instrumentation for my dakota.
What I needed were instruments with two center needles. Like always there are for the moment no manufactures who produce such a instrument. Besides they are to expensive. So building them myself was again the only option. After some googling I bumped into the book “Building Simulated aircraft Instrumentation” from the American writer Mike Powell.


After a bit of reading on his web site ( where he also describes the construction of an instrument. I decided to take the risk and order the book.
In the book there are descriptions of different instruments with all kind of propulsions. He uses Air cores, Servo and stepping motors. The electronics is either analog or with PIC (Programmable Integrated Circuit) or programmable IC's. This last one was for me completely new and unfamiliar mater. Besides I didn't now of anyone who new anything about it and who could help me out if anything would go wrong. But a men must take a risk from time to time and try out the unknown. But if everything would work out fine it would mean a enormous cost reduction, not unimportant.

Enough intro, lets get down to work.
The instrument that I'm going to build is a Manifold pressure gauge. The principle is the same as the "ADF/RMI instrument with stepper motor" out of the book. Only a little bit adapted to the materials I have to my disposition. The electronics is similar to that in the book.

Mechanical construction.

All the examples in the book needed to be adapted to the metric system because everything is in inches. (of course only for those who want to use metric systems like me) I remade the technical drawing for use in metrics. Also a big different's is the use of the stepper motors. I use stepper motors with a gearbox(Mots 1from Velleman) in stead of external gears.

So I don't need any extra reduction to let the needles move per degree.


The whole thing is made from aluminum from 1,25mm, acrylic plate of 3mm and 6mm.
Studding of M3 and different tubes with diameters that varies from 2mm until 5mm.
For those who want the complete technical drawing worked out in detail I refer to the pdf file Dual Needle instrument.pdf
In reality it looks lie this without the stepper motors and transmission.


For the transmission I used the gears I made in epoxy for my radio stack. They were not to big I only needed to divide them in two parts and put in a center axis. The two axis were the pointers are connected to turn well in one another.
The two gears are glued with a 2 component epoxy bond to the tube. The bushing where the tubes turn in are made from Ertalon. They are also glued to the aluminum plate with 2 component epoxy bond. So they turn very smoothly with as less as possible friction. The two stepper motor shafts are connected to the tubes by a plastic tube (fore instance: a air hose for a aquarium) this is a very flexible connection and costs next to nothing.
The faceplate is made with a drawing program and printed out on photo paper. De pointers are hand made from a 1.25mm alum. plate.

instr2 instr3

The mechanical part can be made fairly easy with a little patience.
Now the electronic part and the steering of the stepper motors still to put together.


First I have taken over the schematic and adapted it to the to locally available parts. After this I turned this schematic in to a print board design and assembled the whole thing.

Mike Powell©

I also bought a PIC programmer 1experiment board (K8048) from Velleman to be able to program the PIC for this project. It is also programmable on other ways but I thought this is a bit more secure.
The electronics is divided in to two separate parts. The first part is the communication part with the serial port (comm) this exists out of a RS232 to RS422 converter. With this device it possible to connect up to 16 instruments on one interface in a daisy chain. This can save you a lot of cables and keeps it more clearly structured.
The second part is build in in to instrument itself. It exist also out of a communications part (receiver RS422) and the stepper motor steering with a PIC16F628

It initializes the instrument, resets the stepper motors when starting and identifies and processes the in and out going signals.


The PIC program is written with MPLAB IDE v 7.20 free downloadable on the web site of Microchip.
The firmware for this project is all described in detail in the book of Mike and exist out of more then 25 pages. No simple thing to put this in to a workable Hex. file. A single mistake in a point or comma, small or capital letter and it wont work. Besides the original version of MPLAB the writer used isn't available anymore. What makes it more difficult because there are small differences between the two versions. If you don't now anything of programming assembler it is almost impossible to make this work. Unless you want to spend the time to learn Assembler.
I already had tried for over three weeks to make the hex.file myself without any luck. I received over and over again foult messages but no use full hex. file.
Thanks to the help of the author I received the hex.file by mail and could proceed the project.
Remark: In the mean time all the hex. files are on his web site.

After flashing the hex.file in to PIC I could start testing. Normally the stepper motors should start turning to its zero point, indicated by the opto- interrupters, from the moment you put on the current. This is one of the first test to see if the PIC is fully functional. What do you think happened? Like usual they didn't turn at all. After the first frustration was gone away I started to think more clear. We started looking on what we did wrong or what could be the mistake. I started with reviewing the schematic with the original in the book. At first I saw not much of a difference except for the ceramic resonator with internal capacitors. I had replaced them with a crystal of the same value but without capacitors. After correcting this I made a second test, but still no movement. After a series of measurements with the oscilloscope it seemed I received signals from the PIC but only one digit was send through to one stepper motor. After a study in depth there seemed yet another mistake in my schematic due to a wrong interpretation of the original schematic. That is the binary stream of information was not given through from one flip flop to the other of the 74LS374. So there was only one bit being send to the stepper motors instead of 8 bits. Of course that it could work like this. After correcting this mistake the stepping motors started to turn to there zero position without any problem. Now I could put everything together and could start to think on how to program it to send the necessary data over the serial port to the instrument.



Visual Basic program.

Making a visual basic program to send information over the serial port was unknown to me. At fist I started looking on the internet for test program or a example of such a program. They were not so hard to find. Unfortunately there is no description of any kind of such a program in the book. The only thing what is in the book is the command summary. A short description on what to send to the PIC to make curtain things work. So again for someone unfamiliar with this matter it seems hopeless to bring this to good end. Unless of course you spend again enough time to the subject and learn how to program this.
After some tests with the test program I already succeeded in resetting the motors by means of the program and change the unique name of the instrument. Sending data to position the needles didn't yet work. The problem lay in the interpretation of the send data. The identification number of the instrument is send in ASCII code.
The command number is also in ASCII ( example: 1 in ascii is 00110001 binary and not 00000001)
But the data has to be in straight binary code or the equivalent in ascii ( example: 0 has to be 00000000 or NUL in ascii, a not visible character.) besides the high byte and low byte must be reversed.
After a number of trials and a good explanation of Wim Roscam I succeeded for the first time to position the needles of the instrument with my own made test program. After a good day of programming on Sunday I managed to integrate this program in to main cockpit management program with success.
After a little adjustment on the volt regulator who became to hot the instrument was ready for use.


It is perfectly possible to construct your own aircraft instrumentation with the help of the book of Mike Powell. I would even dare to say that, this book should need to be on every book shelve of every self respecting cockpit builder, even if it was only for giving you some inspiration.
You need to adapt all the drawings to the metric system just for practical reasons because the tools you need to construct it are to hard to find here. Further the technical explanation to construct the instruments mechanically is very good and in detail.
The electronic schematics are in general very comprehensive, only in some case there are things you could wrongly interpret and lead you in to troubles, like in my case. I would therefore have been better is was also a ready made board lay out with the schematic so you could use this to make your print boards. With this help you always would be right from the first time.
The firmware is for a layman a through nightmare. It is all in the book word for word, but by the difference in version and by the manual input of the program there can go wrong so many things that you don't know where start looking anymore. So if you are not a professional don't start on it.
Remark: In the mean time this problem is overcome and all the hex. files are on his web site.
Luckily Mike Powell always helped me out and put me always back on the right track.
You could of course also use the analog way to steer the instruments, this is also explained in the book but it requires more space and is more expensive because you need more electronic components.
As last part, the connection between the instruments and FS and the programs in C++ or VB isn't described in detail in the book. If you know nothing about this matter it also not recommendable to start building your own instruments. Of course as a cockpit builder you will always be confronted with the fact that you need to program certain things. It is therefore recommendable that you either try to learn it yourself like me or maybe you know a friend who wants to do the programming for you.

I there for recommended it to Mike Powell to put a CD in his book with all the necessary hex. files of the different instruments.
Include the necessary print board lay outs to avoid mistakes in the circuits. And finally a test program were you can put in any value to test every kind of instrument.
If I find the time I will make a test program myself that you can use with this instruments. See download

Despite all obstacles I succeeded in making a very good working, smoothly turning Manifold pressure gauges thanks to some wonderful peoples like Mike Powell, Florent Van Vlasselear and Wim Roscam. Thank you all for your support and help.


<< Previous | Index | Home | Next >>

© Verley Jan 2007-2017 original text from 2006 translation Jan Verley