An attempt to make a DIY gaming keypad - Page 1
Forum section: electronics / projects

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: August 30, 2016, 03:20:41 am
content: So, I just received my PSoC CY8CKIT-059 kits and wanted some excuse to use one them.It's now 05:19 AM so I decided: Why not finally make something I've been pondering for a while! Namely my own (gaming) keypad.I did a slight attempt with STM32 but since I use them for work I am kind of fed up with them. And I've got to say; Cypress has earned a fan in me.Also, I started with Fusion 360 a few days back so be kind (or don't)Yet another awesome software package!I've tested the firmware and it works.Next up is to start a 3d print, make a breadboard test board with headers for debugging and lastly figure out what I'll do with my remaining IO

author: lapm
author_rank: Frequent Contributor
timestamp: August 30, 2016, 03:32:05 am
content: Do you really need to use all that extra IO? Bloat is nasty decease that seems to eat all spaceIf it works well....

author: ale500
author_rank: Frequent Contributor
timestamp: August 30, 2016, 05:18:27 am
content: Nice design !Since I started playing TF2, I wanted a 3d-joystick thingy with some buttons, playing with the keyboard still seems totally awkward..., the question is can this chip act as a HID ?, most probably, doesn't it ?Would you post some code ?. I'll order one, I wanted one since I read about these SoC on a thread on the microprocessor subforum

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: August 30, 2016, 08:53:12 pm
content: Hi there ale500!Indeed it acts as a HIDHere's the source:https://github.com/AlexanderBrevig/DIYGamingPadDM me if you need help getting it up and running!I've verified the source with this:

author: ale500
author_rank: Frequent Contributor
timestamp: August 31, 2016, 05:16:16 am
content: Great !I ordered such a stick, thus I'll give it go !Thanks !

author: ale500
author_rank: Frequent Contributor
timestamp: September 01, 2016, 05:24:26 am
content: I tried to load the project from github in to PSoC Creator, and it gives some errors:Errors found while loading "C:\02_Elektronik\095_DIYGamingPad-master\HIDKeyboard.cydsn\TopDesign\TopDesign_01.cymacro" file. This file would not be considered in the update process.At least one file seems to be missing: TopDesign_01.cymacroI tried with PSoC 3.1 and 3.3 probiert, the file is missing

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: September 01, 2016, 05:34:30 am
content: Ah. No worries. It's supposed to be deleted... thoughtI saved the change. Just click OK and save the workspace!Let me know of you find some bugsif you submit a PR I'll merge or fix it.

author: ale500
author_rank: Frequent Contributor
timestamp: September 01, 2016, 05:49:41 am
content: The file doesn't get generated, but I can compile the project anyways. If I go over the USBFS symbol I can generate a macro file, than a TopDesing_02.cymacro gets generated... I renamed it to 01 and now seems to be happy... now I have to wait a few days till the stick arrives....Thanks !

author: bobaruni
author_rank: Regular Contributor
timestamp: September 01, 2016, 12:46:18 pm
content: Quote from: alexanderbrevig on August 30, 2016, 03:20:41 amThis chip looks very interesting, tons of analog peripherals...shame no F4/F7 upgrade path (yet).Just wondering what the USB stack is like compared to the STM32 Cube/HAL, Is it just as flexible, could you for example create your own feature reports / control transfers within HID using custom descriptors or is the source hidden in a pre-compiled module?

author: wraper
author_rank: Unknown
timestamp: September 01, 2016, 01:13:29 pm
content: Comment about functionality. I hope that you don't think that gaming keyboard can contain tact switches and work anywhere decently/reliably.

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: September 01, 2016, 02:17:33 pm
content: Quote from: bobaruni on September 01, 2016, 12:46:18 pmThe source is not hidden, and usually the documentation is excellent. Here's thedatasheet for USBFSQuote from: wraper on September 01, 2016, 01:13:29 pmCare to elaborate?

author: wraper
author_rank: Unknown
timestamp: September 01, 2016, 10:51:08 pm
content: Quote from: alexanderbrevig on September 01, 2016, 02:17:33 pmHave you ever seen tact switches in commercial keyboard product? Don't think so. There are two main reasons except the price. 1. With amount of presses keyboard experiences they will fail very fast. 2. Their tactile features suck for using in keyboard, too short travel and you always need to press them down to the bottom to make a contact. And unlike rubber dome which have the press to the bottom issue too, they also are very hard, no amortization at all. If you ever try typing on a tact switch keyboard, I guess your fingers would ask to stop doing so very soon.

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: September 01, 2016, 11:36:02 pm
content: Wait; I understand now. You're thinking I'm going to use those prototype tact switches? I'm using Cerry MXIf you look at my 3d render I'm sure you will recognize them if you too have looked inside a commercial mechanical keyboardEDIT: rephrased as I can see I came off a bit wrong replying too late last night.Also, it's printing!

author: ale500
author_rank: Frequent Contributor
timestamp: September 03, 2016, 05:02:08 am
content: I got the stick ! it works a treat !Thanks !

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: September 07, 2016, 08:25:48 am
content: Here it is, printed on an Ultimaker 2:Now some primer and color before I wire it all up!EDIT: the firmware is updated (new pinout so if you've wired something up beware)https://github.com/AlexanderBrevig/DIYGamingPad

author: dferyance
author_rank: Regular Contributor
timestamp: September 07, 2016, 04:52:39 pm
content: I'm really impressed with the look of the 3d print. That should turn out really cool.One of the nice things about the PSoC is the programmable digital. I did a keypad myself using the same PSoC board but instead of using up all the IO lines, I used the UDB blocks with verilog to scan rows and columns and store the results in a register. Looks like you are fine on IO lines, but if you ever want to play around with PSoC features that is an idea you can try.

author: ale500
author_rank: Frequent Contributor
timestamp: September 08, 2016, 05:51:10 am
content: Looking at that nice print, I wonder which games do you want to play ?I want something else, a kind of joystick but with buttons, something I can operate with one hand: the fingers should be free to press buttons. I was thinking on something that looks like a gear lever, with one button per finger positioned in a way that I can press them without moving my fingers away...

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: September 08, 2016, 01:46:02 pm
content: RE: Print quality; I've very happy with the Ultimaker 2, especially on PLA and of course care must be taken to get the print bed level. I've also found that it pays to check the slicing and to make sure proper supports are made.I rarely play games these days, no timeBut I played LoL and CS:GO a lot before so those are the games I'll try to get back into. Not seriously this time though. Important to have some recreational activities tooI don't quite picture what you had in mind ale500. Care to make a quick sketch?I'm intrigued.

author: jonovid
author_rank: Super Contributor
timestamp: September 08, 2016, 03:30:58 pm
content: If you are interested DIY joy-pads, in 2009 I had an idea, for a kind of Gun Like joy-pad but with more rumble & kick for my PlayStation 3 But before I could have a working prototype, as no 3d printing back then, - in 2014 Sony changed the PlayStation 3 firmware with an update to block all aftermarket or non-Sony game-pads from working on their consoles. as my idea was to use aftermarket PS3 game-pad electronics inside a two part plastic shell with end caps for the buttons. with added rumble kicker solenoid. see the 2010 kind of Gun Like joy-pad art. failed project.

author: jh15
author_rank: Frequent Contributor
timestamp: September 08, 2016, 03:39:55 pm
content: "in 2014 Sony changed the PlayStation 3 firmware with an update to block all aftermarket or non-Sony game-pads from working on their consoles"Evil company.

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: September 08, 2016, 03:41:06 pm
content: It's painted now.

author: jonovid
author_rank: Super Contributor
timestamp: September 08, 2016, 05:24:17 pm
content: do not have a 3D printer or ever used one, But i see that the your plastic casting can benefit from more under coat, to full in the imperfections from the 3D printing process. i Know a little about automotive body repair . otherwise its looking good.

author: jh15
author_rank: Frequent Contributor
timestamp: September 10, 2016, 03:57:23 am
content: Keep note of making a Commander Keen friendly setup.

author: DaJMasta
author_rank: Super Contributor
timestamp: September 10, 2016, 04:10:17 am
content: The chassis is looking good, am I correct in assuming that the key caps, when depressed, will be entirely outside the pictured housing? Typically I see keys butting up against each other on an interface, but for that the be the case here, the key caps would have to be wider and you have to be sure that the depression distance of the switch is short enough to keep the back of the key cap from hitting the chassis - this could also be helped by getting the board as close to the back of the housing as possible, which is then dependent on the size of the switch mechanism itself.I'm also wondering if you've considered a reinforcing backplate for the keypad. I don't think board flexing will be as much of a problem given the relatively short span compared to a normal keyboard, but it seems that a lot of people notice even a little play from the board flexing under the impact of a switch - some additional mounting points near the center of the board or a reinforcing plate or bar of some sort could clean up any spongyness you may run into in the assembled project.

author: Monkeh
author_rank: Super Contributor
timestamp: September 10, 2016, 04:11:27 am
content: Quote from: jh15 on September 08, 2016, 03:39:55 pmEvil false information.They blockedunlicensedcontrollers, the quality of which is uh, variable, to say the least. There's a wide range of aftermarket, licensed, controllers available. Not quite as evil as made out.

author: jh15
author_rank: Frequent Contributor
timestamp: September 10, 2016, 04:14:08 am
content: Yeah, sure, my homemade button must be licensed

author: Monkeh
author_rank: Super Contributor
timestamp: September 10, 2016, 04:14:53 am
content: Quote from: jh15 on September 10, 2016, 04:14:08 amNo, but your controller containing a lithium battery and bearing a Sony or Playstation logo must be.They primarily targeted fake controllers pretending to be real Sony units, not 'all aftermarket or non-Sony' controllers.