Dalius's blog

Friday, October 13, 2023

Keyboard with joysticks

I got obsessed with idea to create keyboard with joysticks that actually works. If you have not seen you can check my post on Joystick algorithms. The idea is to document building process with all the failures. This is more like a log not like a story.

I am buying mainly stuff from AliExpress as it is cheaper sometimes (but not always). The main problem that I have to wait 3–4 weeks until things arrive. I am listing all prices with shipping price included.

This time I have decided to use rp2040-zero (3.75€ per item): https://www.aliexpress.com/item/1005004281549886.html?spm=a2g0o.order_list.order_list_main.46.7d3e18024B2Znp

I want to make 34 keys keyboard with joysticks, and rp2040-zero has enough pins to do that. The good part I don’t even need to solder anything initially. Here is how I connect wires to MCU:

wiring example

So first I have started with PSP 2000 joystick (about 2.5€ per joystick): https://www.aliexpress.com/item/1005005351342433.html?spm=a2g0o.order_list.order_list_main.34.7d3e18024B2Znp

I have tried to connect joystick somehow to wires, but I have not found reasonable way. Finally, I have soldered it directly as no other way was working. I guess high temperature or something has corrupted it as in results I got incorrectly working joystick:

  • it sometimes started to float to the right

  • it was misreporting minimal position

connected joystick

The only good thing is that overall this was working. To fix this problem I have ordered conductive rubber pad (1.2€ per item): https://www.aliexpress.com/item/1005004860091030.html?spm=a2g0o.order_list.order_list_main.16.7d3e18024B2Znp

I have no idea if that will solve the problem but I will try. Otherwise, I will consider other options (e.g. PSP 3000 or even downgrade to 1000).

Next I tested with two rp2040-zero.

two rp2040-zero + joystick

The good part here is that it is working. Here as I have kind of validated the idea that I can use joysticks I have decided to investigate other ideas. I tried to look if I can create handwired keyboard similar to adux. I have used plexiglass (4€ for 25x50cm piece) to create something. This looked like this:


There were several problems with this:

  • I have made some holes not large enough and switches got stuck when pressed.

  • I have made holes in slightly wrong positions and keycaps got stuck on each other. Overall it is hard to make small holes in correct position manually.

  • It took quite some time to do this and time is what I don’t have.

Therefore, I have decided to look what I need to design my own PCB and if it is easy. Here I have learned about Ergogen. I recommend watching this video by Ben Vallack if you are beginner:


Here is result (I am waiting for my board from JLCPCB (24€) and don’t know yet if everything is OK). It does not have joystick connections yet as I am not sure what’s the best way to go with it as I want to make reversible design for joysticks as well:


Here is GitHub repository of this keyboard:


Alternatively I have decided to investigate Nintento Switch Joystick.

Joycon joystick (1.25€ per joystick) https://www.aliexpress.com/item/4001209760173.html?spm=a2g0o.order_list.order_list_main.29.7d3e18024B2Znp

FFC/FPC Adapter Board (0.8€ per board): https://www.aliexpress.com/item/4000902737228.html?spm=a2g0o.order_list.order_list_main.23.7d3e18024B2Znp

This makes 4€ for 2 joysticks (not bad IMHO) and I hope that will work better than PSP 2000 joystick.

Other expenses:

TRRS (1.6€ for 10 items) https://www.aliexpress.com/item/1005003299392377.html?spm=a2g0o.order_list.order_list_main.5.7d3e18024B2Znp

Kailh Low profile switches (16€) https://www.aliexpress.com/item/1005005446722280.html?spm=a2g0o.order_list.order_list_main.40.7d3e18024B2Znp

I think keycaps would add another 15-20€ if I would buy new ones. I hope that should give idea how much making keyboard might cost.