Had an idea for a rhythm game keyboard, would it even work?

I had this weird idea for a customizable rhythm game controller/keyboard thing. Its basically a set of 8 low-profile switches and mounted onto a small PCB. Along with is, there is also one USB-C port square (idk what to call them, modules?) On it's own it's no better than a weird desk toy, but it has magnets on all 4 sides so that the squares can hook up together and be a small keyboard/macro/thing. Now, my question is, would this be possible? I know it'd be difficult, sure. But is it even able to be built with off-the-shelf parts? Here's a small mockup I quickly made.View attachment 269137

Comments

yea you could between each of the button moduals you could use a connector that work like those magnetic usb cable heads and in each modual you have a mirco controller to route the signals to the usb modual like how switchs and routers for you lan work edit: for using off the sheif parts you can but is would be big you would want a custom pcb to get it to the size you want
 
  • Like
Reactions: 1 person
Considering you mentioned keyboard switches (and rhythm games), you should know it's possible due to the modulatity of mechaniclal keyboards.

The top-left one in your image is for DDR (Dance Dance Revolution) style games.
The top-right one is unknown, but it's probably a choice for individual input for 2-input rhythm games, like circle clickers, where redundant input is nice for complementing fast input, like where you have to spam input, and can spam an other input for double the input power.

Sadly I'm too drunk to give you a good idea, but I'm pretty sure your button mapping can be put to use.

Edit: I'm pretty sure those 8 inputs can be put to use, I don't know of anything which uses all 8 keys to play. However a 4x2 key config should be modular for almost (if not) all games to be able to be played properly.
 
  • Like
Reactions: 1 person
Ok! Glad to know. The top right one and the 7-key design are ideas for osu!mania. The 8-Key thing is also for osu!mania, but it can also be used for DJMAX to my knowledge.
 
  • Like
Reactions: 1 person
I re-read the image now without being drunk, and I have completely missed the "rearrangable via magnets" part. Luckily that mistake on my part requires no correction to my first message, although some modifications will have to be made to the modules.

You mentioned that you want to use off-the-shelf parts.
I'm sorry to destroy the "cool" factor, but to my knowledge low-profile switches are too expensive, not better than readily available "normal size" switches, and it's hard to find keycaps for it. Oh, and their physical parameters are not compatible with regular switches, so if modularity is important then this will be a showstopper.
I'm not trying to discourage you from using low-profile switches, and you should do your own research based on the info I provided (as it might not even be correct, although it's not my intention to spread misinformation either). Just saying.

Short story: I originally wanted low profile mechanical keyboard, but was told off from doing it. Glad I listened, because not being locked to a few select low-profile switches (and keycap sets) has saved my ass. I modded the key switches to better fit my needs (tl;dr: I have many pyhsical issues, and work as a programmer, so having a fully custom keyboard to work around my physical issues is blessing). Also strategically placed o-rings can help simulate low travel if you're not afraid of opening and modding switches (like I did).

Other than that, the hardest you'll have to search for will be the chip itself which acts as the USB host (due to the USB controller part itself), and is fast enough to have a reasonable scan rate (1kHz if you want to be an ultimate GAMER, or 250Hz is also enough as most cheap office keyboards I can get use this polling rate).

The keys themselves could probably be just small dumb microcontrollers which do nothing but check the key and respond to the USB host via a custom small protocoll.

Pretty sure most small magnets have a conductive outside coating, and you can even get more creative than my idea is, but you could use the magnets to conduct the power on the edges, and two small recessed keyed pogo connections on the center to transfer the data.

If you'll really do this: good luck with the software :rofl2: I tried to make my own USB driver for a chip with built-in USB host hardware, and the high-level protocoll is not fun either. I'd say find a chip for host which has a really well supported USB library, so you can more easily implement a fake keyboard, or something like that. Also being able to add a configuration endpoint for use with a configurator software of some sorts. If you do it smart, then you could even have a web-based configurator in some supported browsers which implement WebHID.
 
  • Like
Reactions: 1 person
"The top-left one in your image is for DDR (Dance Dance Revolution) style games."
0 etterna(or all the inferior ddr clones) players use arrow keys
 
  • Like
Reactions: 2 people
By that I meant what I said. The main chip responsible for checking the keys and talking to the USB host (PC/laptop/whatever). There are chips where the USB hardware is built into the chip package. Don't know if external USB controllers are a good idea or not, or how much bottleneck they could create if the USB hardware is not part of the main chip running the keyboard code, but I'd advise getting a chip where the USB hardware is built into the chip (the USB data pins would come out of the chip as well) so you can fit it into the cube you have drawn.

Edit: by chip I meant the microcontroller which will run the keyboard code.
 
While I do have a bias towards ARM, the one with the smelly ATMega32 is looking pretty good USB-wise. The one on the SAMD21 has some really cursed USB controller. And also the comments are saying that there is a lot of documentation on the ATMega32-based one, so I'd say search for code examples for both where USB is used. Preferably one where the keyboard code is already implemented.

I have a feeling the ATMega32 one will have more and better quality examples, so you should probably go with that.
 
I think I have something! Turns out there's stuff in Arduino code to emulate HID devices. All I need to do is have the microcontroller send a high signal when a key is pressed to the USB device.
 
  • Like
Reactions: 1 person
I had a couple of colleagues create USB keyboard emulators like this during undergrad. It's pretty straightforward. You can do it!
 
  • Like
Reactions: 2 people
sono said:
The top-right one is unknown, but it's probably a choice for individual input for 2-input rhythm games, like circle clickers, where redundant input is nice for complementing fast input, like where you have to spam input, and can spam an other input for double the input power.
hey i know this one!
this can be used for 4 key ddr style games(although i prefer my keys to be more spread out but i do know some who like em in a line)
 
  • Like
Reactions: 1 person
I'm currently looking at PCB making software. I have 2 in mind currently, Fritzing and KiCad. Which one would work better?
 
I've hit a snag. I downloaded Fritzing, but there isn't a part for the Qwiic Pro Micro. I don't know how to even make a basic part, much less an entire microcontroller, in Fritzing. Can someone help me?
 
Just want to say it's a good idea ... in theory. I don't want to be the one that pisses in your cornflakes but it doesn't sound like you have done a lot of electronics.
Everyone has to start somewhere but you want to learn the basics before you tackle something like this. Arduinos (and compatibles) are fantastic little things, I wish I had them when I was growing up.
If I sound patronising, please don't take it that way as I genuinely want people to succeed
I see people come up with projects that are above their level of skill and all that ends up happening is they get frustrated because they can't do what they wanted right away and never touch electronics again.

You say all you need to do is know when a key is pressed by the "high" signal ... but how do you know which key is being pressed? If you have these keys rearrangeable with magnets you are going to need several microcontrollers all working together.
Magnets will become the bane of your very existence quickly. Many Many Many years ago at one of my first computing gigs, we had to change a cat5 cable between two machines quite frequently, until one day I got absolutely sick of it and came up with a magnetic cat5 cable it worked for a little while and bam! crosstalk and the output was jibberish and this was pretty well insulated but it was about 20 minutes before I hung my head in shame and went back to just switching the cable out. The only thing I use magnets, for now, is either hall-effect sensors or attaching stuff to other stuff
 
  • Like
Reactions: 2 people
I do recognize that it's going to be hard, but I want to at least try very hard to do it.

EDIT: I also think I have an idea. I may put a small microcontroller in the key squares, that will take the high signal and will send a certain 5+ digit string to the USB Square (henceforth refered to as the Main Square). When the string is read by the Main Square, it will notice what square it's coming from using an array. I don't know how effectively this will work, but hopefully it'll be good.
 
While that could technically work, it falls apart if your small microcontrollers aren't fast enough, and the line becomes noisy and/or congested. Especially in these situations where the connection between the squares isn't something robust, you must design a protocoll to have error detection and/or error correction.

I suggest you develop a scanning protocoll, where you output a Device ID on the bus, and the detected cube will respond by pulling the data line low for the clock signal after the Device ID (basically like I2C ACK on address selection), where low means button pressed, high (default) means not pressed / not present.
The only downside to this is that you'll need small switches on the bottom of the cubes to control which cube is which.
Although that could come as a design advantage if you want two keys to alias eachother.
 

Blog entry information

Author
HomebrewingNeko
Views
602
Comments
54
Last update

More entries in Personal Blogs

More entries from HomebrewingNeko

General chit-chat
Help Users
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
    BakerMan @ BakerMan: kinda feeling like that remix of the perfect cell theme