Home | Articles | Dutch

Keyboard Emulation | Dual encoder | Swap Use/Stby | FS.config file

How I build my own cockpit ?

Radio stack Part 2.

In this articles I will tell you some more about the input of different signals from the radio stack to the PC. I will also try to explain how we are going to use the different character to set the frequencies and autopilot functions. For this we are going to make a study in depth of the FS* cfg file and see how we can customise it to our needs. Without this adaptation the radio stack will not work.

Keyboard emulator.

Like I described in article 9 there are different ways to send signals to a PC. For the radio stack we have chosen for the Keyboard emulator, because it is very direct. We are going to build some extra electronics to send pulses to the keyboard emulator. We don't need a special cheque list for this device because there are no fixed switches,we only have rotary encoders and pushbuttons. And above all the the 7 segment displays will be managed by a program that will read out the values from FS directly. So the information on the displays will always be exactly the same as in FS no mater what. The negative aspect of the keyboard emulator is not applicable here so this makes it the ideal connection tool for the radio stack.


Dual encoder.

All the selection knobs will be connected to encoders. If you don't connect this to additional electronics this can lead to problematic situations. For instance, when you turn the knob and the encoder stays in between two contacts. It keeps on producing signals. Very annoying when you try to start up your computer, it won't start at all due to endless input of signals. When this happens it very hard find out what knob is causing the trouble. Other problem, when you to fast on the encoder. It produce to many pulses and the keyboard emulator can't follow the impulses. Third problem, the range of usable characters is small because the direction of rotation depends on how many there are in the same row or column as the shift character. Because the direction of rotation is determined by sending a character and a shift sign or vice versa for the other direction. So you generate a minuscule when turning one way and a capital turning the other way. This is haw you determine the direction of rotation. On one condition that you don't turn to fast (loss of characters).
To fix all these problems we looked long and hard for a electronic solution. It has become a piece of art that is developed by Florent Van Vlasselear. We called it the Dual encoder , it saw its first daylight after months of experimenting. And I can assure you that we did a lot of experiments and a lot ended up in the waste-paper basket.
What can this wonderful device do.
Like the name says (dual encoder) it is made to connect two encoder to. It makes sure that all signal are send correctly to the keyboard emulator. It determinants electronically the direction of rotation. So there is no limitation anymore, you can now use all available character. This also sees to it that there isn't any signal send when the encoder is in between two position and when turning to fast it only sends the number of characters the keyboard chip can handle. So this is exactly what we needed. The whole thing is made out of very simple basic electronic components and IC's who are very cheep and can be found anywhere. we also invested in a small print lab so we can make our own single sided print boards for a reasonable price. A must if you want to experiment a bit and make solid digital circuits. Once you have the right lay out it is very easy to reproduce the circuits. Because there are a lot of encoders, displays and pushbuttons in the radio stack it is a necessity to be able make a lot the same prints.


Swap use/standby.

By using a pushbutton you can generate a character and send it to the keyboard emulator. This without any problem, but what to do if I need to send more than one character with on button for instance to make swap for COM1, NAV1 and 2. Here for you need again a piece of creative electronic equipment.
Again Florent developed this little piece of electronics and called it the SWAP USE/STBY print. To swap the frequencies of the radios with a keyboard you need to push three keys (F. I. COM2 swap = c 2 x). This print generates three characters of your choose when you push one pushbutton. So this problem is also solved.


FS* .cfg file.

After all the technical problems are out of the way we now need to reconfigure the PC configuration so we can implement all the different character inputs and new functions. For this need to go deeper in to use of the FS configuration file. You can find it in main directory of FS. You can open it by double clicking it. The computer will now ask you with what program you want to open it. Here you choose for the standard notepad. After this you will now see a whole list of names and numbers. What we are interested in are the keyboard_main functions.
It looks like this (this is only a small fraction of the list)
First of all you have the name for a certain function then = sign and after this two numbers divided by a comma. The first number stands for the character and the second number stand for a plain key (8) or SHIFT+ key (9) or CNTRL+key (10) or SHIFT+CNTRL+key (11). For a more detailed explanation I refer to "Configuring Microsoft Flight Simulator controls" by Pete Dowson. Here you can find all information you need how it all works. It gives you also a listing of all available button controls you can add to the config file for extra functions who are not available in standard FS.

What did I do with all these information?

First I made a analysis of all the used characters in FS and put it in a Excel file so I had a overall picture of all used characters. So I quickly saw which characters where still free or which characters could be moved to other combined characters. After analysing this in depth I moved as much characters as possible to free all the plain keys if possible by moving most functions to different combined characters. I needed all the plain keys for more important functions of the AP and radio frequencies operation. After putting all the new functions and characters in there place in the Excel file I then adapted them in the
Fs config file. I had to start over again a few times because I made some mistakes by overlooking some things. The FS config reset itself when you make double use of the same character. Therefore it is very important that you make a backup first of the FS config file before changing anything and that you keep track of all the changes you make in the file. So be very careful when changing anything in to the config file. In case all goes wrong you can always change back to the original config file and start over again.
After all this I made a new excel file for the connection of the keyboard emulator with all the rows and columns for each character.
After this I made a third file with all the connections for the wires and colours schemes. This is a heck of a job, I can guarantee you there are a massive amount of wires to be connected to the different print boards, buttons and encoders. You will lose track very easily if don't plan this meticulously.

radio4 radio5 radio6

That all folks about the input. A whole lot of work to come this far.

The third part and last about the radio stack is completely dedicated to the output from the PC to the displays. This will take a while because this part isn't finished yet. But we will persevere.

In the mean time we have some other things to finish like the cabin, the introduction of analogue instruments in the main panel and the ATC, view and FS panel. These are last missing part to ban the keyboard out of the cockpit.


<< Previous | Index | Home | Next >>

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