PS Cockpit System can handle 3 types of encoders:
- 8 inputs to 3 outputs.
- 16 inputs to 4 outputs.
- 32 inputs to 5 outputs.
For the first two you can always use an encoder chip or make it of your own as we are going to do here for a MFD.
Making the truth table
The first thing to do is to make the truth table for the MFD. This is where the relationship between the given pushbuttons and the outputs is going to be established.
We have 28 pushbuttons in a MFD, 20 OSB plus 8 for GAIN, CON, SYM and BRT. The truth table will be:
You can see in the examples that each pushbutton will activate the corresponding outputs of the encoder.
To translate the truth table to an electrical schema we have to just set the 5 outputs and the pushbuttons and make the wiring from the pushbutton to the output. In the examples, the OSB1 has to be connected only to output 1; the OSB14 has to be connected to output 2, 3 and 4; and the SYM- has to be connected to output 2, 3, 4 and 5.
To isolate one pushbutton to another we will use the diode 1N4148, who is very useful at high frequencies with a reverse recovery time of no more than 4ns and very cheap, as we will need one of it per connection.
This is how the electrical schema looks like for the 5 first pushbuttons:
Now you can make the board with your favourite program:
Here you have the results of the MFD where I have added also some leds for lighting. Is anything more interesting than a few hours working on your favourite hobby?
Now we can connect the board to one of our expanders. I have chosen the 16I/O expander with 010 address and I have connected the MFD to pins 8 to 12.
PS Cockpit Software configuration
Now we are ready to tell the software were we have connected our MFD with a encoder system of 32 inputs to 5 outputs.
Go to the IO Layout page of the PS Cockpit Software, select I2C channel 0 and expander 010. In the corresponding pin 8 select “Input” from the dropdown list and 32 to 5 BCD of the function dropdown list. Set the desire TAG and accept.
Time for testing: Click on the “Test” command and you will see which inputs are activated when you press any of the pushbuttons:
Sending commands to the simulator
We have now to tell the PS Cockpit Software the commands we want to send the simulator on every key. Remember the truth table; each key will activate one or several inputs.
Open the Commands page and select BCD. With the scroll bar on the left you can select the corresponding tag. Depending on the type of encoder you will see a different table according with the amount of inputs. In this case, select the tag MFD and we will see a table of 32 cells where the columns are the first two outputs of the encoder (truth table = O1-O2 = low bits) and the rows are the last three outputs of the encoder (truth table = O3-O4-O5 = high bits).
Select the corresponding cell and type the key to send to the simulator on the keyboard. Click on “Replace” command to accept:
Time for testing: Go back to IO Layout page, click on “Test” command and on “Test commands”. A small window will appear and the corresponding command will be shown as you press any pushbutton:
Of course, you can always use (2) encoders of 16 inputs/4 outputs or use the 40I/O expander board of the PS Cockpit System to connect directly all the pushbuttons of the MFD.