forum

Osu! Keyboard Recipe - For the DIY Minded

posted
Total Posts
95
Topic Starter
The Gambler
:D Okaerinasai minna!

UPDATE August 12, 2018: The newer guide has now been posted in my Github page as a doc file. I will keep the old guide here until I figure out how to format the newer guide into BBcode. Enjoy everyone :)

I would also like to clarify that this thread's official support system is only in English. Those who understand other languages as well as English are encouraged to contact me through PM to relay other issues posted here in different languages. I do not think I can satisfactorily help you very well even with Google Translate. I might try, but GT has inconsistent luck with different languages.

UPDATE June 21, 2018: When posting your code in the threads, please use the [/code] format to properly format your code. It'd be nice code in its full, monospaced glory. Otherwise, carry on below

WELCOME EVERYONE !!!

Seriously, if you find yourself frustrated with the osu! keyboards going out of stock here's a guide on how to build your own controller. Keep in mind that this thread does not go into specific designs in order to keep this thread flexible for other gamemodes. (Mania controller, Taiko, etc.)

Also post your builds here if you'd like. It'd be nice to see what the maker community in osu! can come up with.


A shopping list to consider:


Electronics - the heart of any osu! keyboard build
- Teensy 3.1, 3.2, LC, etc... or Arduino-based stuff like the Micro, Trinket, Due, Leonardo, etc...
- 4 x Cherry MX switch of choice (salvaged or new) (Get plate-mount if mounting via the plate; use PCB mount if your case is thick)
- 4 x Cherry MX key caps of choice (salvaged or new)
- 24-30 AWG wire
- Solder
- Soldering Iron
- Arduino IDE w/ Teensy Bootloader
- LEDs (Optional)


Case - it matters not how you do it, as long as it holds the goods properly

The way of the 3D printer
- 3D printer (or get it printed somewhere)
- Nuts and bolts of choice (I used M5 nuts and bolts)
- Sketchup (or Blender; any 3D modelling program of choice)
- Filament of choice

The way of the laser or CNC cutting

- AutoCAD or Solidworks -> basically anything that can generate a g-code compatible file.
- Sheet metal or acryclic (1.5mm for metal, 2mm - 2.5mm acrylic)
- A shop that can cut for you or access to a cutting machine.

The way of the ghetto

- Some sheet acrylic or metal (or tupperware)
- A dremel


Some design tips

THE CASE
- To plate mount a Cherry MX switch, you must cut 14mm x 14mm squares each. A standard keycap (non-modifier) is 18mm x 18mm. You must space them accordingly in design and in fabrication. Data sheets for Cherry MX are online. Model your case based on that
- Make sure your plate isn't more than 2mm thick with plate-mounted switches; you will run into switch problems. Use PCB mounted switches with thick cases, preferably with hot glue.
- Plan a resonable size that will fit both microcontroller and the switches. If possible, do not mount microcontroller beneath switches, lest you want massive kinking like mine does
- Make sure the Micro-USB port is accessible. Unless you design the KB with a non-removable cable: in which case, plan enough space for that extra bit of cable.
-- When using a 3D printer, remember the slicing software needs a compatible file, so do some research on the printer you're using and export accordingly. Same applies to CNC/laser cutters.


Electronics

- Only the inputs need to be wired in parallel. Ground can all be wired in series as they all lead to the same ground pin.
- Adding LEDs? Find 3mm flange less LEDs. Remember that (for a brand-new LED) the longer wire is generally positive and cannot be wired the other way.
- Be extremely careful of soldering. Unless yours is outfitted with headers or a breakout board, the dangers of frying your chip is high.


Coding/Extras

- Keyboard libraries are on github and Teensy website. Find those
- Don't bind two keys to the same keyboard button. Osu! locks up any key being pressed at the moment


-HAVE FUN!!
Example Wiring Diagram
I hope you know pullup resistor configurations. Google is you friend if you don't.
External resistors only if your microcontroller doesn't have internal resistors.

Example Code for the Teensy controller, mind that you will have to experiment a bit.
#include <Bounce.h> // this is needed to use the bounce library


#define KEYP_1 KEY_Z // here we are making it easier to change the key bindings later

// button pins
const int key_1 = 0; // input pin for your keyswitch; not necessary but helpful for doing other things like LED effects

Bounce button1 = Bounce(0, 8); // first number is pin number and second number is debounce time

void setup() {
pinMode(key_1, INPUT_PULLUP); // here we are telling the teensy what pin 0 is being used for
}

void loop() {

button1.update(); // this is reqired for your code to actually send the keypress to the computer

if (button1.fallingEdge()) { // fallingEdge is when the key is pressed
Keyboard.press(KEYP_1);
}
if (button1.risingEdge()) { // risingEdge is when the key is not pressed
Keyboard.release(KEYP_1);
}
}

Mind you that pullup function only works with resistors built into the controller. Otherwise, using external resistors, use:
pinMode(key_1, INPUT);

For adding more buttons:
#define <KEYP_X> <keycode> // keycode is the keycode for whatever you want the key to be


const int <key_X> = <pin> // pin is the pin your button is connected to

Bounce <buttonX> = Bounce(<Y>, 8); // Y is the pin number

pinMode(<key_X>, INPUT_PULLUP);

<buttonX>.update();

if (<buttonX>.fallingEdge()) {
Keyboard.press(<KEYP_X>);
}
if (<buttonX>.risingEdge()) {
Keyboard.release(<KEYP_X>);
}


Mine ended up like this



Sanwa build







New Build 12/29/2017


Feel free to go nuts with your design. Sorry the tutorial took forever to post

Some words from Thnikk himself:

Thnikk wrote:

If there's anything I'd add, it would be that the Teensy LC is still the best option of the Teensy series for its price and is still more than powerful enough, even if you wanted to add LEDs and do some fancy stuff. Also, the trinket is a nice option but harder to use for a 4-key since there's only 3 pins you can use for input while communicating with the computer, so you'd have to use some magic with resistors to get multiple buttons working on the same pin. They are great as a cheap controller for a 2-3 button keypad, though!


FUTURE PROJECTS
- Hardware switch debouncer
- Interrupt-based actuation Too hard
- Underglow LEDs
- Sanwa build FINALLY DONE

Credits:
- Thnikk - code help
- PJRC - Teensy documentation
- Unnamed room in my university campus
- A handful of people in said room - 3D printing and modeling help
[/box]
shortpotato
howdo i get razer switches?? i heard all the cool kids have them D:
Topic Starter
The Gambler
Call Kailhua for a bulk order
KanoSet
it's sad that i can't get most of the list if not all
rip fun i could get making one
nice btw 8-)
ZenithPhantasm
Flaretech Optical Switch not out yet so no point
Saphirshroom
Pretty cool.
Is it comfortable to play on? Mostly asking because of the screws and the edges, and because it looks very light.
Topic Starter
The Gambler

Saphirshroom wrote:

Pretty cool.
Is it comfortable to play on? Mostly asking because of the screws and the edges, and because it looks very light.

I purposely didn't post any 3D files so that people would learn how to design their own, really. This thread only has design philosophies and tips, not instructions on how to build one.

August 12, 2018 --> 3D Files have been posted. 2015 Gambler, it's time to move on :)

In my situation though, I had a book elevate my hand so I wouldn't hit the edges. The screws were far enough to be a non-issue. The height of the switches were the bigger issue though...

Again, it's all trial and error for anyone undertaking this project. This project took about 4-5 prototype cases before going official.

KanoSet wrote:

it's sad that i can't get most of the list if not all
rip fun i could get making one
nice btw 8-)

pretty sure you can order the switches from digikey and the teensy controllers from sparkfun/adafruit.

Pair that with some sheet metal/plastic and a dremel and there shouldn't be a problem.
Topic Starter
The Gambler
Updated with new info, hope the new stuff is useful.

Also wondering if this thread should be in Development or G&R. It feels like a bit of both.
KanoSet

The Gambler wrote:

Updated with new info, hope the new stuff is useful.

Also wondering if this thread should be in Development or G&R. It feels like a bit of both.
the shipping fees would kill me am sure.. but if i had a chance i defo gonna give it a try school takes so much time :|
i forgot to mention that i don't have a 3d printer nor solder tool so this might be harder than to handle tbh
i would say ask a mod to move it.. development seems to fit more
ZenithPhantasm
I was hoping you would design custom housing for MX switches instead. Ones that are easily swappable.
Topic Starter
The Gambler

ZenithPhantasm wrote:

I was hoping you would design custom housing for MX switches instead. Ones that are easily swappable.
That's where the 3D printer comes in handy, as you can disassemble it easily. The contact points though, are still hand wired. Right now, I'm trying to look for SIP sockets for switches.

That, and I also might possibly have to use a prototyping PCB. But for the time being it's all hand-wired
Topic Starter
The Gambler

ZenithPhantasm wrote:

I was hoping you would design custom housing for MX switches instead. Ones that are easily swappable.
I could go solder right-angled female receptacles onto the teensy board with the GND I/O forked out to a 4-way splitter. Though you still need to solder wires to the switches themselves.
Topic Starter
The Gambler
Build #2 - Different Casing, Same parts




Poku
Looks good and nice guide!

Though I can't get most stuff on the list D:
ArionW
Looks great! I'm planning to build my own osu! keyboard based on ATMEGA8, it may not be so easy in terms of coding, but this microcontroller is almost 20 times cheaper. Although I will probably use your wiring diagram as a reference. So, thanks for that!
Topic Starter
The Gambler
The man has spoken... Thnikk has graced us.
Topic Starter
The Gambler
Testing Build v2

KKoonnraDD
Hey Guys!! I made my own keyboard today. i used MX reds for the keys and a Teensy 3.2. The case is bac becaue i dont have access to a 3d printer so i just had to bend a piece of 1.5 mm perspex.. :lol: Your code sample was very helpful !! thanks ! i set the keys to be K, T which are my initials :oops:


[box=Images]



Topic Starter
The Gambler
Holy shit I thought the thread was abandoned by now... Dude that is awesome.

As for the future builds I'm doing, they're on the back burner due to exams
KKoonnraDD
by the way.. I got my custom Caps today.. so i updated the images :oops:
fb39ca4

ArionW wrote:

Looks great! I'm planning to build my own osu! keyboard based on ATMEGA8, it may not be so easy in terms of coding, but this microcontroller is almost 20 times cheaper. Although I will probably use your wiring diagram as a reference. So, thanks for that!


Did you ever build your keyboard? The Atmega8 doesn't have any USB hardware, so you would have to bit-bang everything. If you just need something cheap, you can buy Arduino Pro Micro clones pretty cheap.
Topic Starter
The Gambler

fb39ca4 wrote:

ArionW wrote:

Looks great! I'm planning to build my own osu! keyboard based on ATMEGA8, it may not be so easy in terms of coding, but this microcontroller is almost 20 times cheaper. Although I will probably use your wiring diagram as a reference. So, thanks for that!
Did you ever build your keyboard? The Atmega8 doesn't have any USB hardware, so you would have to bit-bang everything. If you just need something cheap, you can buy Arduino Pro Micro clones pretty cheap.
I'm pretty sure he could just use V-USB to create a low-speed USB device. Most Trinket-level devices I know do that as they are powered by the same chip.
KONATAonPC
I've got an Arduino Uno (A clone) that i bought a while back for something that didn't work, will that work?
Topic Starter
The Gambler
I'm not very knowledgeable about this; I've only confirmed this build with the build I have.

If your AVR chip has USB support built-in (ATmega with U - like ATmega32U4 on the Leonardo and Micro) -definitely has support and will work-, or has a built-in USB to serial converter (like the Uno, and Mega 2560), theoretically it should work though you'd have to dig online for actual references.

If not, you'd have to either use a USB to serial converter (like USB to FTDI serial cables) or emulate USB via V-USB, which I have not tried yet. Adafruit Trinkets are nice candidates for V-USB.

As for ARM-based chips, I've only tried using a Teensy, which already has built-in support.
Flami
Looks very cool. I might try it soon!
Kyozoru
dang, this is awesome!
Topic Starter
The Gambler
Sanwa switch build people!!!!



Also this is what happens when you don't account for cable spacing... A wasted breadboard.



Some demos:







A hard drive case is actually a pretty solid choice for an arcade-style build.
[Zarc]
didn't expect to find such project here. I used to work on Arduino projects and I can get the most of the stuff, but I don't know where to get Cherry MX switches. Maybe I'll try it once I get them since it looks interesting.
Topic Starter
The Gambler

iman mutou wrote:

didn't expect to find such project here. I used to work on Arduino projects and I can get the most of the stuff, but I don't know where to get Cherry MX switches. Maybe I'll try it once I get them since it looks interesting.
Works on any regular push button switch. The lovely Sanwa keypad is right above you :)

If not, Digikey or any other mechanical keyboard website like WASD or MechKB should have them in stock.
Better yet, check if Cherry themselves carry it in bulk.
TsuyuRX
OP has been helping me out and i'm currently in the process of building my own, thanks Senpai. o3o
dongwon900
I've been looking at a lot of these osu! keyboards lately. thnikk's keypads are very nice, as well as the one on the osu! store.
I do a lot of keyboards built from parts and this is nothing completely new to me, but its the first time I will be hand-wiring switches.

I'm just gonna use the arduino nano clone from dx, and a custom cnc cut acrylic housing.
What I will add to the previous designs is a palmrest. I'll come up with some more designs in the future.
Switches will be custom lubed 55g vintage cherry mx blacks. my all-time fave
Topic Starter
The Gambler

dongwon900 wrote:

I've been looking at a lot of these osu! keyboards lately. thnikk's keypads are very nice, as well as the one on the osu! store.
I do a lot of keyboards built from parts and this is nothing completely new to me, but its the first time I will be hand-wiring switches.

I'm just gonna use the arduino nano clone from dx, and a custom cnc cut acrylic housing.
What I will add to the previous designs is a palmrest. I'll come up with some more designs in the future.
Switches will be custom lubed 55g vintage cherry mx blacks. my all-time fave
Dayum, looking forward to that then :)

I only handwire in my build since I'm too broke for custom PCBs unlike noodlefighter and Antcenter xd
Vodes
I will probably try to make one with a pro micro, Kailh Speed Copper switches and a case I have laying around. Maybe I will post some pictures then :D
Topic Starter
The Gambler

Vodes wrote:

I will probably try to make one with a pro micro, Kailh Speed Copper switches and a case I have laying around. Maybe I will post some pictures then :D
Will look forward to it.
Vodes
Well. All the stuff came in yesterday morning. So I made a case out of some wood I found in my basement. It was my first time soldering anything. I'm okay with what came out of it xd It's a Pro Micro (5v, 16mhz) I bought from mehkee aswell as the keyswitches (Kailh Speed Copper). The keycaps are some cheap blue ones from banggood.

As for people living in germany shipping was quite fast except for the mehkee stuff. (Almost 2 weeks for that)

Kiciuk
What's better these keypads can be made with almost anything.
I made mine with old pad PCB.
Only soldered switches properly and it works.

Overall cost=2 switches 0.52$
Yes i know it looks like shit, but hey it works.
Topic Starter
The Gambler

Vodes wrote:

Well. All the stuff came in yesterday morning. So I made a case out of some wood I found in my basement. It was my first time soldering anything. I'm okay with what came out of it xd It's a Pro Micro (5v, 16mhz) I bought from mehkee aswell as the keyswitches (Kailh Speed Copper). The keycaps are some cheap blue ones from banggood.

As for people living in germany shipping was quite fast except for the mehkee stuff. (Almost 2 weeks for that)

Good job with the build there. Can't wait to see the demo.

Kiciuk wrote:

What's better these keypads can be made with almost anything.
I made mine with old pad PCB.
Only soldered switches properly and it works.

Overall cost=2 switches 0.52$
Yes i know it looks like shit, but hey it works.
A friend of mine built an SDVX controller with a shoebox... A cardboard one.

He still kicked my ass with it :(

Waiting for that demo ;)
Vodes
Here is a bad video for my keyboard
Topic Starter
The Gambler

Vodes wrote:

Here is a bad video for my keyboard
Don't worry, mine sounds like a toy too. My Sanwa build sounds like hitting a shoebox with a stick. :)
Vodes

The Gambler wrote:

Vodes wrote:

Here is a bad video for my keyboard
Don't worry, mine sounds like a toy too. My Sanwa build sounds like hitting a shoebox with a stick. :)
Imaginating it is hilarious enough xD
TV-Size Kun
For Teesy 2.0 and 2.0 ++ this will work?
Topic Starter
The Gambler

TV-Size Kun wrote:

For Teesy 2.0 and 2.0 ++ this will work?
Yes, just remember to select Teensy 2.0 or 2.0++ in the boards sections of the Arduino, assuming you are using Teensyduino.
DireDoge
I know this post is pretty old, but I just want to say thank you for this guide. It helped me a lot!
Topic Starter
The Gambler

DireDoge wrote:

I know this post is pretty old, but I just want to say thank you for this guide. It helped me a lot!
Pics or it didn't happen :)

Also, no problem. Kinda wish this was stickied though.
Topic Starter
The Gambler
New build posted on the first post. Happy holidays everyone!!
Topic Starter
The Gambler
New build for you guys. This time, a possible 8-key design, using an Adafruit Feather M0 for the controller.



Holystotle
I can't understand any thing about some techinacl shit anyone can help me

In indonesia someone sell it the price is too high about 40$ and I can't use my credit card too (controlled by my mom) :( :(
Topic Starter
The Gambler

quinton69 wrote:

I can't understand any thing about some techinacl shit anyone can help me

In indonesia someone sell it the price is too high about 40$ and I can't use my credit card too (controlled by my mom) :( :(
RIP... Hopefully I could update the guide as well when I have time.
Holystotle
Anyone know teensy alternative for the no-no keyboard i found the Leonardo one help me pls and in Indonesia it's very rare to found 3d printing place
Topic Starter
The Gambler

quinton69 wrote:

Anyone know teensy alternative for the no-no keyboard i found the Leonardo one help me pls and in Indonesia it's very rare to found 3d printing place
Leonardo is perfectly adequate for the job, since it contans all the native USB hardware needed for the keyboard functions to work. The only reason I don't recommend these is that their footprint is quite large. Take a look at some sample boards below:

Leonardo:
Teensy LC/3.2:
Pro Micro:
Trinket M0 (in inches):
It all depends on the chip you are using, but also importantly, how the board is implemented.

At some point, you might also have to leard KiCAD/Eagle to learn how to mount chips directly to PCB. Nono most likely has already done that, along with Techkeys, MaxKeyboard, etc...
show more
Please sign in to reply.

New reply