lainchan / Ω

How to make USB for HP Jornada keyboard

Cutter · 2019-06-16 06:13
I own a very cool keyboard. It's a foldable keyboard with a metal case. The problem is that it's not made for regular computers, but for a series of HP pocketPCs that began in 1998. This keyboard is cool as fuarrrk and should not go to waste, but I have no idea how to make this old connector from 1998 work as a USB keyboard. I've not found any kind of adapters for it or anything, and I don't know how to know to wire it up into a USB port, if that makes any sense. What should I do?
John Rain · 2019-06-16 06:53
Huh. Wow, I thought Targus was just joke from Tim and Eric. It's real! Unfortunately it looks like it uses some kind off TTL serial connection. Not something easy to translate with an off-the-shelf chip, such as PS/2. However, seems like somebody has done the heavy lifting and made some arduino code to translate it and serve as a normal USB HID. http://www.cy384.com/projects/palm-keyboard.html Branding is different, but it seems to be pretty similar. Well, actually the connector is different now that I look. I guess this is for a Palm, and of course everything's gotta have some dumb proprietary connector. I'd start by taking out the PCB and seeing if it looks similar to this. Look up the pinout for the palm connector versus that HP pocketPC thing, trace the PCB and make sure it makes some sense. Test the logic levels to make sure it's still +5v TTL. Probably a better idea--you could go the brute force approach, pull that PCB entirely, and hook up a Teensy2.0 or similar board to the keyboard matrix itself (there are little ribbon connectors connecting to the keys in rows and columns) and have it read the switches directly and output USB. http://blog.komar.be/how-to-make-a-keyboard-the-matrix/ There's loads of tutorials on how to build one of these. You might need to trace all the wires or probe around a bit. There will be existing code for the microcontroller that won't require much modification. Be sure to get a microcontroller with enough input pins for that matrix. DIY keyboard forums are also full of people who know the situation and would probably help. Considering you'd have to use an HID-capable microcontroller anyway, you might as well take out the one in the keyboard entirely and do it cleanly.
Morpheus · 2019-06-16 07:06
Side note--ah, the days when things were held together with plain ol' screws and nobody had developed an anal complex about hiding them all under fuarrrking stickers or plastic snap-together panels that break instantly when you disassemble them. I wish more things just let you see the fasteners. The electronics on this thing are so easily accessed. Just grab a phillips and take out those two screws over the 8 and 0 keys. If the chip inside isn't the same one shown in that tear-down above, maybe try looking it up and seeing what kind of controller it is. Might get lucky and have a ps/2 interface or something else. But I still think the best way would be to just scan the key matrix directly with a teensy.
Yu-ichi · 2019-06-16 23:08
>>17723 The connectors are completely different on mine. >>17725 Damn. I tried reading that second link and I think this stuff is just way over my head.
Meddler · 2019-06-17 18:54
>>17742 To try to paraphrase it, you get a microcontroller board like one of the HID-capable arduinos or a teensy2.0. The keyboard I'm typing on right now is controlled by a teensy, by the way. The board will have several digital input pins. These connect to rows and columns of wires coming from the keyswitches. That's the ribbon connectors in the photo above (well, some of them--one probably goes to the dock connector on top of the board. You can find that pretty easily with a continuity tester, or just by disassembly). Basically the controller scans the keyboard several times a second, checking each row and column individually to see if there's continuity across where they intersect--which indicates that a key is pressed. Then it looks up which key corresponds to that row and column combination and sends it off to the computer over the USB port. This sounds complex, but it's all work that has been done already by plenty of people. You can find a well-polished piece of software to load onto the microcontroller on github or a keyboard enthusiast forum. All the circuitry except the controller is already in the keyboard you have--such as the matrix connecting the keys together and the diodes across the keys. You wouldn't have to worry about that. All you'd have to do is connect those ribbon connectors to the proper data inputs and then configure the lookup table that tells you which key goes where. You can do this through trial and error if you don't want to get too deep into tracing the circuit--e.g. press the A key, see that the keyboard outputs a B, so you go into the config file and remap B to A. It might be a challenge, but you can definitely do it. Might be a fun and educational process.
Koos van der Merwe · 2019-06-17 19:10
>>17742 Oh yeah, and for the software I was referring to--I like Soarer's stuff. https://geekhack.org/index.php?topic=50437.0 His software is robust, full-featured, and it allows you to modify the internal configuration by sending a config file over USB without having to re-program the controller each time. So that's very convenient. He's also responsive to people getting into projects and figuring out how to wire up their own keyboards. There are some very strange ones on there--doubt he'd be stumped by what you've got here.