Skip to content

Added GamerBoard #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions hackboards/GamerBoard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# GamerBoard

I really wanted to make a split keyboard, but not with the typical ergonomic split - so instead, I made it so you can decide between just the main keyblock or a full keyboard. Also, both parts can be used seperately.

The way I split the key matrix and pinout between the sides is incompatible with QMK, and barely compatible with KMK, so I used that this time (instead of QMK, which I used on my hackpad). The firmware currently is just a very basic variant with some features missing, I will develop it more once I get the keyboard.

## Pictures

![schematic](assets/schematic.png)

[PDF for the PCB](assets/pcb.pdf)

![case fully assembled](assets/full.png)

![case, seperate](assets/case-sep.png)

The screw holes are very close to the edge of the plate/case, because I wanted to make it as small as possible.

Also, the two sides of the keyboard are going to connect by JST cable, and are going to stick together with magnets. There are holes in the side of the case for up to ten magnets on both sides.

## BoM

Prices might not be the same as setting the currency on AliExpress to USD, I converted the prices in EUR to USD for this table.
All prices include taxes.

### Electronics

|qty|name|price in USD|link|
|---|----|-----|----|
|2|100x Diode 1N4148|3.38|<https://www.aliexpress.com/item/1005004962400215.html?mp=1>|
|1|100x Resistor 5,1k|1.73|<https://de.aliexpress.com/item/1005001652314923.html>|
|1|OLED display 128x64|1.84|<https://de.aliexpress.com/item/1005006901604221.html>|
|1|USB-C receptacle (incl. shipping to DE)|4.24|<https://de.aliexpress.com/item/1005008600540419.html>|
|1|5x EC11 encoder|2.71|<https://de.aliexpress.com/item/1005005983134515.html>|
|2|Orpheus Pico|-|-|

sum: _13.90 USD (of 15 USD)_

I will buy the RGB leds and capacitors myself.

### Keys

|qty|name|price in USD|link|
|---|----|-----|----|
|110|MX Switch|0.40 per switch|<https://candykeys.com/product/gateron-smoothie-pom-silver-switch>|
|1|HyperX Pudding Keycaps|25.26|<https://www.amazon.de/gp/product/B08DJ8Q7M4/>|
|1|Stabilizers|18.41|<https://candykeys.com/product/owlab-screw-in-stabilizers-v2>|

I hope the 26 cents above 25 USD are fine. I'll pay them myself if necessary.

### Fasteners

|qty|name|price in USD|link|
|---|----|-----|----|
|1|100x 3x1mm Magnets|2.06|<https://de.aliexpress.com/item/1005008094695227.html>|
|1|100x Heatset insert, M2x4x3|5.19|<https://www.aliexpress.com/item/4000232858343.html>|
|1|Screw Set|2.33|<https://de.aliexpress.com/item/4000056753202.html>|

### PCB

- Left PCB: $24.40 (326.23 mm * 147.64 mm, lead free HASL)
- Right PCB: $15.10 (169.07 mm * 147.64 mm, lead free HASL)
- Shipping estimate (both at once): $19.70
- Taxes: $11.25
- **Total: $70.45**

I'm willing to pay for lead free HASL myself, it only adds $4.42 to the whole PCB order.

Cost of whole keyboard (excl. RGB LEDs and Orph. Pico): **_$181.60_**
Binary file added hackboards/GamerBoard/assets/case-sep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackboards/GamerBoard/assets/full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackboards/GamerBoard/assets/pcb.pdf
Binary file not shown.
Binary file added hackboards/GamerBoard/assets/schematic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackboards/GamerBoard/cad/CaseLeft.FCStd
Binary file not shown.
Binary file added hackboards/GamerBoard/cad/CaseRight.FCStd
Binary file not shown.
6 changes: 6 additions & 0 deletions hackboards/GamerBoard/firmware/boot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from kmk.bootcfg import bootcfg

bootcfg(
midi=False,
usb_id=("Gamer153", "GamerPad"),
)
117 changes: 117 additions & 0 deletions hackboards/GamerBoard/firmware/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
from kmk.modules.split import Split, SplitSide
from storage import getmount

SIDE = SplitSide.RIGHT if str(getmount('/').label)[-1] == 'R' else SplitSide.LEFT



import board as b, busio

from kmk.kmk_keyboard import KMKKeyboard
from kmk.keys import KC, Key
from kmk.scanners import DiodeOrientation

from kmk.extensions.RGB import RGB
from kmk.modules.holdtap import HoldTap
from kmk.modules.encoder import EncoderHandler

from kmk.extensions.display import Display, TextEntry, ImageEntry

# For SSD1306
from kmk.extensions.display.ssd1306 import SSD1306



keyboard = KMKKeyboard()

holdtap = HoldTap()
keyboard.modules.append(holdtap)

rgb = None # type: RGB

if SIDE == SplitSide.LEFT:
keyboard.col_pins = (b.GP8, b.GP9, b.GP10, b.GP11, b.GP12, b.GP13, b.GP14, b.GP15, b.GP16, b.GP17, b.GP18, b.GP19, b.GP20, b.GP21, b.GP22)
keyboard.row_pins = (b.GP2, b.GP3, b.GP4, b.GP5, b.GP6, b.GP7)

rgb = RGB(pixel_pin=b.GP26, num_pixels=80, sat_default=0, val_default=0)
keyboard.modules.append(rgb)
elif SIDE == SplitSide.RIGHT:
keyboard.col_pins = (b.GP7, b.GP8, b.GP9, b.GP10, b.GP11, b.GP12, b.GP13, None, None, None, None, None, None, None, None)
keyboard.row_pins = (b.GP6, b.GP5, b.GP4, b.GP3, b.GP2, None)

rgb = RGB(pixel_pin=b.GP18, num_pixels=32, sat_default=0, val_default=0)
keyboard.modules.append(rgb)

encoder_handler = EncoderHandler()
encoder_handler.pins = (
(b.GP14, b.GP15, None),
)
encoder_handler.map = (
(KC.VOLD, KC.VOLU, KC.MUTE),
)
keyboard.modules.append(encoder_handler)

i2c_bus = busio.I2C(b.GP_SCL, b.GP_SDA)
driver = SSD1306(
i2c=i2c_bus,
)
display = Display(
display=driver,
width=128,
height=64,
)
display.entries = [
TextEntry("GamerPad", x = 5, y = 5),
]
keyboard.extensions.append(display)

keyboard.diode_orientation = DiodeOrientation.COL2ROW


class MacroKey(Key):
def __init__(self):
self.macro = []

def on_press(self, keyboard, coord_int=None):
pass

def on_release(self, keyboard, coord_int=None):
pass

### may be reintroduced later, to make some kind of rgb disabling animation
# class LightSwitch(Key):
# def __init__(self):
# pass

# def on_press(self, keyboard, coord_int=None):
# fn_activated = not fn_activated

# def on_release(self, keyboard, coord_int=None):
# pass

# ls_sw = LightSwitch()

media_pp_k = KC.HT(KC.MEDIA_NEXT_TRACK, KC.MEDIA_PREV_TRACK)

kcno_8 = (KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO)

keyboard.keymap = [
[
KC.NO, KC.ESC, KC.F1, KC.F2, KC.F3, KC.F4, KC.NO, KC.F5, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, KC.F12, KC.PSCREEN, KC.SLCK, KC.PAUSE, KC.KP_EQUAL, KC.KP_SLASH, KC.KP_ASTERISK, KC.KP_MINUS, *kcno_8,
KC.NO, KC.GRAVE, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.MINUS, KC.EQUAL, KC.BSPACE, KC.INSERT, KC.HOME, KC.PGUP, KC.KP_7, KC.KP_8, KC.KP_9, KC.KP_PLUS, *kcno_8,
KC.NO, KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.LBRACKET, KC.RBRACKET, KC.ENTER, KC.DELETE, KC.END, KC.PGDOWN, KC.KP_4, KC.KP_5, KC.KP_6, KC.NO, *kcno_8,
MacroKey(), KC.CAPSLOCK, KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.SCOLON, KC.QUOTE, KC.NONUS_HASH, KC.NO, KC.MB_LMB, KC.UP, KC.MB_RMB, KC.KP_1, KC.KP_2, KC.KP_3, KC.KP_ENTER, *kcno_8,
MacroKey(), KC.LSHIFT, KC.NUBS, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMMA, KC.DOT, KC.SLASH, KC.RSHIFT, KC.NO, KC.LEFT, KC.DOWN, KC.RIGHT, KC.KP_0, KC.NO, KC.KP_DOT, KC.NO, *kcno_8,
media_pp_k, KC.LCTRL, KC.LGUI, KC.LALT, KC.NO, KC.NO, KC.SPACE, KC.NO, KC.NO, KC.NO, KC.RALT, KC.RGUI, KC.RGB_TOG, KC.RCTRL, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, *kcno_8,
],
]

split = Split(
split_flip=True,
data_pin=b.GP0,
data_pin2=b.GP1,
)
keyboard.modules.append(split)

if __name__ == '__main__':
keyboard.go()
Loading