Jump to content
  • entries
    338
  • comments
    905
  • views
    259,835

Next project


EricBall

1,441 views

While working at IBM (1993-2008) I acquired several classic Model M keyboards. Unfortunately, they have PS/2 connectors which isn't supported even by many current desktops. I have bought one of the "blue cube" adapters so I can use one at work, but I'm thinking I'd rather "roll my own" - open up the keyboard and replace the 6805 based controller with something that will output USB.

 

This has been done before by others, so I'm not breaking new ground. I even have a keyboard which is missing the SDL cable - so is ripe for modification. The question is what microcontroller to use. The popular hobbyist solution appears to be either the ATMega16 or 32. However, I also found a TI whitepaper which uses the MSP430. The advantage of the MSP430 is it should be more "according to spec" versus something which works "well enough".

 

10 Comments


Recommended Comments

Update: I've found some keyboard hacker hangouts - in particular http://deskthority.net/ and http://geekhack.org/

 

One advantage of using something like the Teensy (AVR based) versus the MSP430 is there's other people also working on it. So there will be improvements over time. And while it might be possible to get something like the Sprintek controller cheaply, then there's the cost of the PCB & USB port.

 

But the first thing I need is a 5.5mm / 7/32" nut driver to open the case. (Or I can use a Bic Pen: http://i.imgur.com/7fjQCXA.jpg )

Link to comment

More research & thinking:

 

First, Atmel makes AVRs with built-in USB controllers - so the result is much more "according to spec" than those where the AVR had to bit-bang out the USB. Unfortunately, the common ATMega32U4 only has 26 I/O while I'd need 27 (16+8 row/column matrix + 3 LEDs). The AT90USB1286 based Teensy++ has 46 I/O, but costs $24+shipping. And one of the objectives of this project is a keeping the project (tools & material) costs low.

 

I've also been thinking about how I'm going to connect to the keyboard internals. Although I haven't opened it yet, my understanding is there are several ribbon cables connecting the keyboard matrix and LEDs to the 6805. My first idea was to desolder the cable connectors from the PCB and then somehow connect those to the AVR breakout board. But the I had another idea - why not remove the 6805 and connect the breakout board there.

Link to comment

You could always go with a cheaper micro and use shift registers for most of those pins.

 

Speaking of cheaper micro, v-usb is pretty well tested, especially for implementing HID keyboards. Not speaking from experience, but I'd give it a shot. (I worked on a couple of small atmega projects before, just not v-usb)

 

There are even sample implementations you can crib from.

Link to comment

Yes, it would be possible to use external components to virtually add pins, but that would drive up the project cost due to needing a custom PCB. My current plan is to use the Teensy++ 2.0 as a semi drop-in replacement for the 6805. Both are 40 pin DIPs and most of the pins match up so I can just solder on some headers. And I'm hoping some simple wire can bridge the few mismatches.

 

From a firmware perspective, I'm looking at using code done by Soarer - which is very easy to customize. There's also Hasu's popular TMK firmware. It's very powerful & customizable, but requires you to recompile it to make changes.

 

Of course I wasn't able to find the nut driver at Home Depot or Princess Auto. However, it appears it is a common tool in the RC world. Unfortunately, my local hobby shop is out of stock at the moment.

Link to comment

Well, with a cheaper tiny you could just use perfboard and not much more than the shift registers and a decoupling cap.

 

But for sure the teensy++ is the easier route, given the near pin out match.

Link to comment

I now have the nut driver, and it was only C$3.95 (including tax) + 17 miles of gas. Hoo-rah! Now I can't wait to get back home so I can take the keyboard apart and beep out the PCB.

 

Although I won't be using it, the Adafruit BlueFruit EZ-key is very cool. It's a Bluetooth keyboard + mouse controller with several different input options:

1. It has connections for 12 NO buttons for easy connection to any digital controllers (like an Atari joystick or an NES controller).

2. It has a serial input for simple ASCII transmission.

3. The same serial input also will handle HID events from a direct keyboard (or mouse) controller.

Link to comment

I took the keyboard apart last night (yech - board chow) and had my first look at the PCB. Hrmm, those pins are finer pitch than I remember... There's also a few more components than the circuit diagram I found which would need to be removed or bypassed. So now I'm rethinking my plans.

 

My new idea is to either extract the membrane connectors or buy new ones and connect those directly to the Teensy.

Link to comment

Maybe you could tackle the problem at another level... if you interfaced to the internal PS2 pins, you could convert that to USB HID keyboard protocol.

 

It looks like there are a few implementations, including one built around an origial teensy.

 

[edit] Nevermind. I see you discounted Blue Cube adapters, which is this sort of thing. Just looked it up. :)

Link to comment

Yeah, the typical option is to convert the PS/2 connection to USB. (There's even one which builds it into the SDL cable.) However, these have two problems:

1. A converter does nothing to reduce the current requirements. Because the logic appears to be based on open collectors with external pull-ups, this means the controller wastes a lot of power - sometimes more than USB likes to provide.

2. The firmware is limited by both protocols and the original controller implementation. So if the original controller will only support 2 simultaneous keypresses, there's no way to work around it.

  • Like 1
Link to comment

Today I finally priced out the parts for this project and it's ~$60, which breaks down as:

$27 Teensy++ w/ pre-soldered pins

$5.50 USB panel socket

$8 shipping for above

$12 connectors (two styles)

$8 shipping for above

 

Hrmm... I need to think about this. Desoldering the connectors will save me $20 - although my first attempt was not successful, this is extra motivation to try again.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...