geekhack
geekhack Projects => Making Stuff Together! => Topic started by: Adlaiunm on Mon, 25 July 2016, 20:52:03
-
Hello everyone!
I'm new to geekhack and DIY keyboards in general, and I don't have a lot of knowledge about the parts typically used. Right now, I'm working on designing a really simple 2 key keyboard for osu!. It seems like it would be extremely easy to do with a Teensy or a Pro Micro, both of which are very cost effective. Considering a Teensy can support a matrix for an entire keyboard, using one for a mere 2 keys seems like a waste. Is there a microcontroller better suited for small projects? How about the cheapest one on the market that can be used to make a HID?
I apologize if this seems kind of vague. I don't really know what specific information I need to provide.
Anyways, thank you very much for your help! As soon as I have all of my parts picked out, I will take some pictures of the build process and maybe even make a tutorial.
-
what's osu?
-
what's osu?
Cheap often means a Chinese clone, not necessarily a good idea.
An attiny85 can be used as an HID device using v-usb, Adafruit's Trinket (https://www.adafruit.com/products/1501) is readily available and only $7 and there's a tutorial here (https://blog.adafruit.com/2013/09/27/tutorial-make-an-adafruit-trinket-usb-keyboard-hid/) - cheap and easy enough for a first project? :)
-
How professionally do you want to make it look?
If you just want 2 buttons and no light effects like on the osu!nono keyboard you could just pick up an old rubberdome board with ps/2 connector (go to a local recycling center, usually you can get one for free or basically free there) and use the controller from that one, just wire up your switches to it and you are in full ghetto mode. Here is a small Tutorial I found a while back: http://imgur.com/a/vwSyf (http://imgur.com/a/vwSyf).
For anything more professional the, already mentioned, Trinket should be one of the best solutions, especially with the huge amount of resources available.
-
trinket or stm8 would probably be your best option or a arduino nano would work to
anything with 1 gpio and a usb will work though
check this out
http://kimondo.co.uk/smallest-usb-mechanical-keyboard-world/
-
The one benefit of getting a teensy over the trinket is that you could reuse the teensy to make a bigger board later on, where the trinket is limited to a much smaller max # of keys. Other than possible reuse in the future, you should let your budget be your guide. $8 vs $20 is close enough I'd upgrade, but they will both work.
Side note - has anyone used a trinket? It has 5 io pins, but 2 are shared with usb, so it seems that if you were using usb you would be limited to 3 pins. 3 pins is a max of 2 keys, right? 1x2
-
3 pins all connected to ground or 5v would be good for 3 switches :)
-
That's 50% more than my guess! Score!
-
The cheap Arduino clones (make sure its a 32U4, not 328P) are pretty good and cheap. Last I bought was about £1.50 + as much again in postage - definitely cheaper, but took about 3 weeks to deliver (so cheap I've ordered more than I've got uses for at the moment)
Quality wise, I've bricked 1 of 4 or 5, and the PCBs cuts are poor, but fully functional (I think the bricking was my fault)
-
Here is a two-key keyboard using a Digispark clone.
[attach=1]
Digispark and it's clones are much cheaper than trinket here, <$5 each.
I use two pins, and with some trick you can input 3 to 4 keys with it.
(1: A, 2: B, 1+2: C)
I prefer trinket's USB code, but it is larger than that in digispark, and it's way more expansive than digispark clones.
[attach=2]
-
Hmmm not sure if you could almost use an IC clocked by the USB itself to power something like a 2 key circuit. I mean, you would only need 4 pins for the entire thing. If not, china is bursting at the seams with cheap cheap cheap MC's. Check out gearbest or aliexpress for all that stuff, element14/digikey/etc if you dont want to wait
Not sure how new you are to circuit design but if you are fresh to all this jazz, I'd go with something that is arduino compatible. It's sooo simple and easy and there isn't too too much that you need much more advanced functionality
-
for 2 keys i would use a attiny mcu
-
My perspective on this is a little different: The time you spend on it is going to be most expensive part of the project, so there's little need to save a few dollars on the microcontroller (I say that without knowing your situation, of course, but I imagine that's true for most people). The Teensies are by all accounts very easy to work with and playing with one of them them would mean learning something that would prepare you better for other, bigger projects.
-
I'm new to geekhack and DIY keyboards in general, and I don't have a lot of knowledge about the parts typically used.
Hi Adlaiunm,
This series of tutorials is the easiest way to learn keyboard electronics and firmware:
https://github.com/wolfv6/keybrd/tree/master/tutorials
Start with tutorial_0_introduction.md
This series of tutorials builds simple keyboards on a breadboard.
The beauty of using a breadboard is that when you're done learning and prototyping, use can pull the Teensy processor out of the breadboard and put it on a different keyboard.
Parts are listed on breadboard_keyboard_supplies.ods
-
I'm trying to use EFM8UB1 series for my 2 keys keyboard. They have 8K and 16K SROM variation.
The series have internal 5V to 3V3 regulator and USB function. The manufacturer provides keyboard example shares around 5K bytes ROM.
I tried to add fucntion to change keycode assigned through USB configuration request. I shares 8100 bytes (98.9% of SROM).
If I can use EFM8UB10F8G-C-QFN20(8K SROM), it cost only $0.86 per 1 MCU.
Oops, I forgot about pre-programmed bootloader shares last 3 pages (1.5K), so I have to keep the code below 6.5K bytes if I need to keep the bootloader. Since I could not solder QFN package myself, I would choose EFM8UB11F16G-C-QSOP24 which has 16K ROM.
-
Welcome to Geekhack!
if you choose a Teensy, you'd be climbing on the shoulders of years of experience using them, especially for keyboards.
You will gain experience in a professional and flexible keyboard interface, which may be invaluable for your next, perhaps larger, keyboard project.
And if you decide to disassemble the one you are making now, you will be able to readily reuse the parts.
-
Hey there, all,
I am interested in designing my own keyboard, but unlike going for the uber small ones, I wish to to design an 87-key, so I'm looking for a suitable microcontroller by which to do so...
If I were to use an atmega32u4 which seems to head toward a 15x5 space, wondering what I could get away with by migrating to a 13x7 space and what impact that would have on the design...
[alternate plans for separate 10-key [RHS] and 6x2 (or 6x4) auxiliary key [LHS] keyboards are also on the plate.]
-
If you don't have all the keys in each row and column on the same pin it's harder to work out the wiring but it will work fine. If you need/want more pins the chip on the Teensy 2.0++ is supported in all firmwares so that could be a better choice, don't know the name off the top of my head.