Frontpanel

Building and using the frontpanel

In June 2003 I wanted the possibility to control my VDR directly without using the infra-red remote control. So I thought about the game port. On my search for possibilities I found the webpage about compound joystick buttons. In the following section I will describe the circuit I've built, the buttons I've used and how the whole thing works in Linux and with VDR.

The basics

A Standard PC joystick port allows the usage of 4 joystick buttons through its 4 button lines. There are several ways to get around this. One of the simplest one is to use compound-button-presses. That means you press more than one button at a time, the 4 button bits are combined to a single 4 bit word giving 16 different button states. One is used as "no button pressed" so there are 15 combinations left, 14 of them are actually used.

This method just has one disadvantage: Only one button can be pressed at a time. But as in VDR exists no state where more than one button is pressed this is irrelevant.

The circuit

The circuit consists of many diodes (25 of them). They are needed for preventing the cross-short of the button lines. I am using the common and cheap silicon switching diode 1N914. They are connected like on the following picture.

circuit

The rectangles with circles inside are plugs for cables. The 2, 7, 10, 14 and GND are pins of the joystick port. For GND I used pin 4. So that Linux detects this circuit as a real joystick 2 resistors (between 10K and 100K) must connect Axis 1 with +5V (pin 3 and 1) and Axis 2 with +5V (pin 6 and 8).

The buttons

The buttons I obtained from reichelt.de, a german reseller for electronic equipment. The are about 10mm x 10mm in size. This are their order numbers:

I soldered them on a second curcuit board and connected them by short cables with the plugs on the circuit board above.

The result

I mounted the button circuit board behind a 5 1/4 inch slot blind. It looks like on the following picture. At the moment I am using just 11 of the 14 possible buttons.

result

Get it working

To get the whole thing working in Linux, a kernel with joystick support is needed. The following options have to be enabled (If modules are used they have to be loaded manually):
In Input core support enable:

In Character devices / Joysticks enable: Then the analog joystick driver has to be loaded with CH Flightstick Support:
 insmod analog js=fullchf 
To use the front panel as a remote in VDR, the joystick plugin is needed:
 runvdr -Pjoystick 
If the plugin is loaded the first time it will start in "Learning Remote Control" mode.

last updated on 2003-10-12