Close

Keyboard Addon

A project log for SDA - The best new PDA

Do you miss those old small devices in your palm? Don't be sad, you can always build your own!

brtnstbrtnst 06/24/2023 at 22:580 Comments

Since the last update three years ago, I made mostly software updates for the SDA and I will do an OS walk-through log at some point. This log is about a new hardware extension. I always liked the Palm portable keyboard and wanted something similar for my PDA.

When I got the Palm portable keyboard, I was mesmerized. It is quite a good keyboard and it makes a great tool to input text in the little device, way better than the graffiti or on-screen keyboard.

Adapting the Palm keyboard might be a good approach. It communicates over serial port, making some sort of an adapter and reversing the protocol shouldn't be hard. But my device has some troubles. Flex cables inside are a bit broken and few of the keys work only sometimes. So I left the Palm keyboard on it's shelf and went with something different.

Keyboard

I ended up using this keyboard, that I already had for some other forgotten project. It's from a keyboard tablet case that i bought from aliexpress.

It's nice for the price, but as a keyboard it's not great. The buttons are a bit flimsy and some of them are too small for adult human fingers. I didn't expect to type a novel on it anyways. For a proof-of-concept it's good enough.

Prototype

The original PCB from the keyboard have a nice set of test pins and after a quick modification can be used as a breakout board (just saw of the part with the controller). I connected this to a STM32F0 discovery board to figure out the schematics of the keyboard matrix. After that I worked on the keyboard firmware and its communication with the PDA. Firmware ended up being a simple loop that reads the keys and when key is pressed, hold or released, it sends the key id and key string over the serial. Firmware also manages the keyboard layouts for Function keys, Alt keys and Num keys. I did this to simplify decoding on the PDA side and because the keyboard has a bit too much of a computing power.

Sadly I don't have any pictures of the prototype.

PCB design

Nothing really interesting here. I went mostly with parts I had in stock. The board is just the MCU with few LEDs, reset button and connections to the keyboard, PDA and st-link. Circuitry for the external oscillator is left unpopulated.

JLCPCB made the boards and they worked fine. Firmware needed few updates because the prototype schematics was a bit different from the final boards.

Case design

This was also straightforward. the only complication is that my 3D printer has 120mm maximum print size. I experimented with printing the keyboard in more parts that will be screwed together. This didn't work well enough and designing it to the level of complexity at which it would have worked just wasn't worth it. I ended up with a design where the large parts are glued together (printed in ABS and then glued with acetone) and then its assembled with a few screws.

It's not perfect, mainly the PDA stand needs to be fold able for the thing to be practical to carry. Also the text editing app now supports landscape mode and this keyboard obviously does not.

I might fix this in some later revision.

The final thing

In the following video you can sort-of see how it worked out. It works, but it's not perfect. The non-foldable stand for the PDA is not very ergonomic. The keyboard driver is on the application side. This approach pushed the whole software stack to its limits, that lead to lots of improvements in the SDA OS, but in the end it still isn't fast enough for quick typing. I will move the driver to the OS in some future update.

Hardware and firmware sources are available on GitHub.

Discussions