USB keyboard - Flight simulator control

I wanted to help friend building control panel for a flight simulator "on the cheap". I'm not much into gaming scene but it sounded a fun project, and I could use it for other projects.
The first idea that came to mind was to "hack" or "cannibalize" keyboard controller and connect it to switches. Guilherme also mentioned some sort of visual feedback when the switch is activated. For switches I thought of rocker switches, they look like made to be "air borne" all the time. I passed the "word" that I needed a keyboard to all my friends, and waited... Alex had a folding keyboard that wasn't working anymore, he gave it to me to be "sacrificed"... "may God have mercy on its soul"...

I opened the keyboard and separated the membrane, I marked lines and columns with letters and numbers respectively.
Then I wrote and identified all the keys in the membrane, so I could build a list of correspondence between key and of column, line.

Then I identified one line and one particular column, line is marked black and column is marked red. I marked the key "Q".
Then I wired a switch to the keyboard on the "Q" contacts, the second contact would be used to power the LED when the switch was activated.
Well, it didn't worked out exactly as expected... I toggled the switch and "W" appeared... connected the black wire on the wrong line...
There was another problem, once the switch is activated it keeps writing Ws, not what I intended. I would need some more electronics to translate a toggle of the switch to a single key press...
Then I decided to try another alternative, build my own USB keyboard controller. I knew of a firmware only implementation with AVR micro controllers here, since I had some AVRs in the components box I decided to give it a try.
I started with the HIDKeys project, but since I didn't have a ATmega8 I had to change the project for the ATtiny2313. I started with a breadboard version of the project once the software started running OK (being recognized by the PC), I build a small prototype board.

Development was done on the PC (SUSE linux platform) with avr-gcc and for the programming I used the AVR-ISP mk 2 USB programmer. The source is not final and there are still no switches and output indicators, as soon as I finish something I'll publish it.

1 comment:

GUI said...

It´s Amazing João!!!

Can´t wait to see it finally working :]