General
Banner
Home | Articles | Dutch

Reflections | 7 segment displays | software development

How I build my own cockpit ?

Radio stack part 3.

Some time ago I wrote an article about the radio stack. 2 years already past away since I first stepped in to this adventure. Believing in the fact that it must technically possible to make such a device. I should and would have an interactive radio stack with digital output like the Bendix/King radio. At that time there was no question of finding anything like a Bendix/King for FS in the commercial circuit. Today however this a totally different matter, the only obstacle is the price, it is way to high in my opinion. I don't mean I didn't spend more than my planned budget on the search after the solutions myself. But anyway,you can't make an omelet without breaking eggs.
So building it myself was again the only option. The housing and input of the radio stack is already covered in the first and second article. In this article I want to explain how the output is made, especially the read out of the frequencies and other information out of FS and sending this information to the 7 segment displays.

Top

7 Segment displays hardware.

To display the frequencies we need of course a medium that can produce numbers. The simplest and most realistic way is the use of 7 segment led displays.
You can find them in all kinds of dimensions and colours. I have chosen for the Kingbright SC36-11HWA a common Cathode. Dimensions 9mm x 7mm and bright red. They will be soldered on to custom made print boards. I made print boards for the use and standby frequencies of the COMM1, 2 and NAV 1,2 radio. They exist out of 10 displays with two displays who reproduce a fixed 1, the rest is connected to a multiplexing chip. A second type of print is for 8 displays of the DME. A third type of print is for 9 displays of the ADF and a fourth type is for the auto pilot and has 5 displays. The fifth and last type is for the transponder and counts 7 displays.
If you want to know more about the precise information shown on the displays you can refer back to the radio stack article 1. These print boards will be connected with 17 wires to a new print board with the multiplexing chip. The driver for the 7 segment displays we have chosen is the Maxim chip ICM7218DIJI. This driver can handle 8 displays. It memorises the digital information for the 8 displays and send this information in a continues loop to the segments (multiplexing). This Maxim chip in his way is connected with 9 wires to 8 bits of the I²C card (K8000 of Velleman) and one address bit to a 74LS154. It is possible to connect up to 16 Maxim chip to one address chip. Now you can imagine how many wires need to connected to let all these displays work. There are also other things that can go wrong, not only the wiring but also the print board can cause troubles. It is a nerve wracking job not to make any mistakes in these connection. Several times I had to start over again after some failure. I had to rework the print boards up to three time before they all worked.

display1

Unfortunately there is no room for mistakes. It either works or it doesn't. Finally all ended well.
In so far the explanation of the hardware, but now the most difficult part. How am I going to program all this hardware. Faster said than done, especially if you just know something about programming Visual Basic from a whopper of a Book and never programmed any electronically driven device. But there was no alternative, it was either trying to work it out or nothing at all.

Top 


Software development

For the general cockpit management I already made a Visual Basic program that could write data coming from the cockpit (switches) to FS to make certain things work. It was only sending info to FS. For the displays I now had to read out data from FS and then send it to the maxim chip who at its turn would send the binary code to the 7 segment displays.
For this I started to develop a completely new Visual Basic Program. Of course using the already existing write modules. The first part would exist out of a main form with all starter buttons to start up FS, TRC (simkits instruments), FSUIPC and the K8000 (I²C). I also made a menu bar to open other forms. The most important forms are the test forms.

soft1

First I made a test form to test the I²C. With this I was able to manage the displays manually for the first time. By sending the right binary code I was able to put the numbers on to the displays without having to write an extra program. With this help I could grasp how the electronics worked.

soft2

The second test form is the 7 segment display test program.
Once I new what binary code to send to manage the displays, I have put this knowledge in to a small test program so I could light up every single segment separately and make all kinds of alfa-numeric combinations with them. So I could test if all the displays were functioning like they should.

The next step was to add a text box where I could type in 4 numbers and write them to the first 4 segments or the last 4. At last I made a test program to test the address chip 74LS154. In the beginning I didn't understand at all the behaviour of this thing but by sending a 4 bit string to it with a interval of a second. I quickly found out how it worked. This would later become a very important part of the general management program.

soft3

The third and most important test form was the read-out form. To see if I could read out all kinds of frequencies and data out of FS. In this form I first tested all the read-outs from FS via FSUIPC and the recalculations. Until I had all the right values to displays on the radio stack.

soft4

In the beginning I did read-out every piece of data separately and recalculated it. In a second phase I did read-out all the variables at the same time what gave me again an absolute time gain. Because the reaction time would become the most critical point of the program. The displays needed to follow the changes of the input without limping behind. After ending all kinds of test I gradually integrated all this knowledge in to the general management program. The Biggest question still was how fast could it go before any mistake would occur? There for I installed a slider element so I gradually could test it out. In the beginning I only had one maxim chip connected. And everything was running smoothly. I could place the slider to its maximum capacity without any problem. But would it stay that way if I would connect all the 8 maxim chips. One by one I connected them and started the test again. I did hold my hart every time I restarted the test, would it still work at full speed now? To my astonishment every thing stayed on working even when putting everything to the maximum speed. This was incredible.
I now write about this development as if it was nothing. But I took me three months of hard work, perspiration and blood to develop this part of the program. By experience with other programs, written for the club cockpit by other people, this all didn't seem so evident. Here the displays couldn't follow all the changes of the input, they just limped behind.

After testing all the displays profoundly I started to put all the bits and pieces in to radio stack housing. Because of the amount of wires and cramped space, this was not a easy thing to do. Would it still work after this?

radio1 radio2

After a weekend of hard labour everything was finally at its place. Now just plug in all the connectors and make the final test. Fingers crossed. After starting up the 5v power supply, the PC and the K8000 for the first time the data was seen on the displays of the radio stack. I could believe my eyes, I was so trilled that finally everything came together. I ran to the fridge and took out a bottle of champagne and together with my parents I drunk to health and to the big success. This glorious moment I couldn't let it pas without celebrating. The project was finally coming to an end after 2 years of hard work.
I now say with great pride that I SELF build my own radio stack.

radio3

But I would like to give a special thanks to Florent Van Vlasselaer and Wilfried Dengler because they help me so well with the development of the electronics, without this the project never would have worked. These are two wonderful peoples with great ideas and are willing to chare them with others and didn't see on the big effort they had to do. I'm very honoured to be able to work together with these very talented gentleman.
Thanks again.

Top

<< Previous | Index | Home | Next >>

 

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