corney-island/ergogen/config.yaml

546 lines
13 KiB
YAML

meta:
engine: 4.0.2
name: corney-island
version: 0.1
ref: &kb_ref "Corney Island v0.1"
author: ceoloide
url: https://github.com/ceoloide/corney-island
footprint: &switch_footprint "mx"
switch:
$extends: presets.mx
presets:
# These presets provide different layout options
# Select a preset in the `units` section below
# Note: The appropriate switch footprint will still need to be set in the `pcb` section
mx:
# Key and keycap measures
kx: u # spacing between key centers (X-axis)
ky: u # spacing between key centers (Y-axis)
ks: 19 # horizontal space between columns (default: 19)
kp: 19 # vertical padding between keys (deafult: 19)
kcow: 14 # key cutout hole width (cherry: 14, choc: 13.8)
kcoh: 14 # key cutout hole height (cherry: 14, choc: 13.8)
keycw: 18 # keycap width (cherry: 18, choc: 17.5)
keych: 18 # keycap height (cherry: 18, choc: 16.5)
led_pos_x: 0 # Led X position relative to the switch center
led_pos_y: -4.75 # Led Y position relative to the switch center
led_rotation: 0 # Led rotation
vertical_diode_shift: -1.5 # How much to shift to avoid overlap
diode_rotation: 0 # Diode rotation
switch_rotation: 0 # Hotswap north, led south
choc:
# Key and keycap measures
kx: cx # spacing between key centers (X-axis)
ky: cy # spacing between key centers (Y-axis)
ks: 18.5 # horizontal space between columns (default: 19)
kp: 17.5 # vertical padding between keys (deafult: 19)
kcow: 13.8 # key cutout hole width (cherry: 14, choc: 13.8)
kcoh: 13.8 # key cutout hole height (cherry: 14, choc: 13.8)
keycw: 17.5 # keycap width (cherry: 18, choc: 17.5)
keych: 16.5 # keycap height (cherry: 18, choc: 16.5)
led_pos_x: 0 # Led X position relative to the switch center
led_pos_y: 5.5 # Led Y position relative to the switch center
led_rotation: 0 # Led rotation
vertical_diode_shift: 1.5 # How much to shift to avoid overlap
switch_rotation: 180 # Hotswap south, led north
choc_mx_spacing:
# Key and keycap measures
$extends: presets.choc
kx: u # spacing between key centers (X-axis)
ky: u # spacing between key centers (Y-axis)
ks: 19 # horizontal space between columns (default: 19)
kp: 19 # vertical padding between keys (deafult: 19)
units:
# The following statements will make the content of the preset
# available in the units context
$extends: meta.switch
hand_rotation: 0
# Physical measures
screw_radius: 1.1 # M2 screws
spacer_radius: 2.05 # M2 standoffs
fillet_radius: 0.5
# Thumb splay
splay_thumb_middle: -15
splay_thumb_far: -15
points:
zones:
# Main key matrix
matrix:
key:
padding: kp
spread: ks
tags:
- key
- matrix_key
anchor:
rotate: hand_rotation
shift: [100, -100] # Fix KiCad placement
columns:
outer:
key:
column_net: C0
rows:
top.key:
led_prev: LED_18
led_next: LED_19
home.key:
led_prev: LED_19
led_next: LED_20
bottom.key:
led_prev: LED_20
led_next: LED_21
pinky:
key:
column_net: C1
rows:
top.key:
led_prev: LED_15
led_next: ULED_1
underglow_prev: ULED_1
underglow_next: LED_16
home.key:
led_prev: LED_16
led_next: ULED_0
underglow_prev: ULED_0
underglow_next: LED_17
bottom.key:
led_prev: LED_17
led_next: LED_18
ring:
key:
stagger: 0.25 kp
column_net: C2
rows:
top.key:
led_prev: LED_14
led_next: LED_15
home.key:
led_prev: LED_13
led_next: LED_14
bottom.key:
led_prev: LED_12
led_next: LED_13
middle:
key:
stagger: 0.125 kp
column_net: C3
rows:
top.key:
led_prev: LED_8
led_next: ULED_2
underglow_prev: ULED_2
underglow_next: LED_9
home.key:
led_prev: LED_9
led_next: LED_10
bottom.key:
led_prev: LED_10
led_next: ULED_3
underglow_prev:
underglow_next: LED_11
index:
key:
stagger: -0.125 kp
column_net: C4
rows:
top.key:
led_prev: ULED_6
led_next: LED_8
underglow_prev: LED_7
underglow_next: ULED_6
home.key:
led_prev: LED_6
led_next: LED_7
bottom.key:
led_prev: ULED_5
led_next: LED_6
underglow_prev: LED_5
underglow_next: ULED_5
inner:
key:
stagger: -0.125 kp
column_net: C5
rows:
top.key:
led_prev: LED
led_next: LED_1
home.key:
led_prev: LED_1
led_next: LED_2
bottom.key:
led_prev: LED_2
led_next: LED_3
rows:
bottom:
row_net: R2
home:
row_net: R1
top:
row_net: R0
# Thumb cluster
thumbfan:
key:
padding: 0
spread: 0
stagger: 0
tags:
- key
- thumb_key
anchor:
ref: matrix_middle_bottom
shift: [0.5 ks, -kp -3]
columns:
near:
key:
column_net: C3
rows:
home.key:
led_prev: LED_11
led_next: LED_12
middle:
key:
splay: splay_thumb_middle
column_net: C4
stagger: -2.750
spread: ks + 2
rows:
home.key:
led_prev: LED_4
led_next: LED_5
far:
key:
splay: splay_thumb_far
rotate: 90
column_net: C5
stagger: 2.122
spread: ks + 3.463
rows:
home.key:
led_prev: LED_3
led_next: LED_4
rows:
home:
row_net: R3
outlines:
_switch_cutouts:
- what: rectangle
where: true
size: [kcow, kcoh]
_backplate_additional_outline:
- what: rectangle
where:
- matrix_inner_top
size: [20, 3.5 kp]
adjust:
shift: [ks + (20 - ks) / 2, -1.25 kp -0.125 kp]
operation: stack
- what: rectangle
adjust:
ref: thumbfan_far_home
size: [1.5 ks, 1.75 kp]
operation: subtract
_matrix_outline:
- what: rectangle
where: [matrix_key]
size: [ks, kp]
_plate_outline:
- what: outline
name: _matrix_outline
- what: rectangle
adjust:
ref: thumbfan_far_home
shift: [0, 0.275 kp]
size: [1.5 ks, 1.5 kp]
- what: rectangle
adjust:
ref: matrix_ring_bottom
shift: [0, -0.5 kp]
size: [3 ks, 0.5 kp]
- what: polygon
points:
- ref: matrix_pinky_bottom
shift: [1.5 ks, -0.5 kp]
- ref: thumbfan_near_home
shift: [-0.5 ks, -0.5 kp]
- ref: thumbfan_far_home
shift: [-0.75 ks, 0.5 kp]
- ref: thumbfan_far_home
shift: [0.75 ks, 0.5 kp]
- ref: thumbfan_near_home
shift: [-0.5 ks, 0.75 kp]
_screws:
- &circle
what: circle
radius: screw_radius
adjust:
ref: matrix_pinky_top
shift: [-0.5 ks, -0.5 kp]
- <<: *circle
adjust:
ref: matrix_pinky_home
shift: [-0.5 ks, -0.5 kp]
- <<: *circle
adjust:
ref: matrix_inner_top
shift: [-0.5 ks -0.032, -0.5 kp + 1.139]
- <<: *circle
adjust:
ref: thumbfan_near_home
shift: [-0.5 ks -4.343, 7.135]
- <<: *circle
adjust:
ref: thumbfan_far_home
shift: [0, 0.5 kp + 2]
_spacers:
- &bigCircle
what: circle
radius: spacer_radius
adjust:
ref: matrix_pinky_top
shift: [-0.5 ks, -0.5 kp]
- <<: *bigCircle
adjust:
ref: matrix_pinky_home
shift: [-0.5 ks, -0.5 kp]
- <<: *bigCircle
adjust:
ref: matrix_inner_top
shift: [-0.5 ks -0.032, -0.5 kp + 1.139]
- <<: *bigCircle
adjust:
ref: thumbfan_near_home
shift: [-0.5 ks -4.343, 7.135]
- <<: *bigCircle
adjust:
ref: thumbfan_far_home
shift: [0, 0.5 kp + 2.631]
_controller_overlay_screws:
- <<: *circle
adjust:
- ref: matrix_inner_bottom
shift: [0.67 ks + 0.032, -0.15 kp - 0.001]
- <<: *circle
adjust:
- ref: matrix_inner_bottom
shift: [1.45 ks - 0.356, -0.6 ks + 0.03]
_keycap_outlines:
- what: rectangle
fillet: 2
where: true
size: [keycw, keych]
_backplate_outline:
- what: outline
name: _plate_outline
- what: outline
name: _backplate_additional_outline
operation: add
backplate:
- what: outline
name: _backplate_outline
fillet: fillet_radius
- what: outline
name: _screws
operation: subtract
pcb:
- what: outline
name: backplate
- what: outline
name: _spacers
operation: subtract
- what: outline
name: _controller_overlay_screws
operation: subtract
frontplate:
- what: outline
name: _plate_outline
fillet: fillet_radius
- what: outline
name: _switch_cutouts
operation: subtract
- what: outline
name: _screws
operation: subtract
controller_overlay:
- what: outline
name: _backplate_additional_outline
fillet: fillet_radius
- what: outline
name: _controller_overlay_screws
operation: subtract
_debug:
- what: outline
name: frontplate
operation: stack
- what: outline
name: controller_overlay
operation: stack
preview:
- what: outline
name: backplate
- what: outline
name: pcb
operation: stack
- what: outline
name: frontplate
operation: stack
- what: outline
name: controller_overlay
operation: stack
- what: outline
name: _keycap_outlines
operation: stack
pcbs:
backplate:
outlines:
main:
outline: backplate
frontplate:
outlines:
main:
outline: frontplate
controller_overlay:
outlines:
main:
outline: controller_overlay
corney_island:
outlines:
main:
outline: pcb
footprints:
key_switches:
what: *switch_footprint
where: [key]
params:
reverse: true
hotswap: true
keycaps: false
from: "{{column_net}}"
to: "{{colrow}}"
adjust:
rotate: switch_rotation
diodes:
what: combo_diode
where: [key]
params:
from: "{{colrow}}"
to: "{{row_net}}"
include_tht: false
adjust:
shift: [0.5 kcow + 0.8 - 0.173, vertical_diode_shift]
rotate: 90
per_key_leds:
what: sk6812mini-e
where: [key]
params:
P1: VCC
P2: "{{key.led_next}}" #DOUT
P3: GND
P4: "{{key.led_prev}}" #DIN
reversible: true
reverse_mount: true
adjust:
shift: [led_pos_x, led_pos_y]
rotate: led_rotation
underglow_leds:
what: sk6812mini-e
where:
- matrix_pinky_top
- matrix_pinky_home
- matrix_middle_top
- matrix_middle_bottom
- matrix_index_top
- matrix_index_bottom
params:
P1: VCC
P2: "{{key.underglow_next}}" #DOUT
P3: GND
P4: "{{key.underglow_prev}}" #DIN
reversible: true
reverse_mount: false
adjust:
shift: [0, -0.5 kp]
mcu:
what: promicro_pretty
where: matrix_inner_top
params:
P0: data
P1: LED
P21: C0
P20: C1
P19: C2
P18: C3
P15: C4
P14: C5
P4: CS
P5: R0
P6: R1
P7: R2
P8: R3
adjust:
shift: [19.704, 0.5 kp -0.125 kp -19.3 -0.340]
rotate: -90
oled:
what: combo_display
where: matrix_inner_top
params:
oled: ssd1306
reverse: true
adjust:
shift: [0.5 ks + 10.147, 0.5 kp -0.125 kp - 19.3 - 22.65 - 0.398 + 3.652]
reset_switch:
what: reset_switch
where: matrix_inner_top
params:
from: GND
to: RST
adjust:
shift: [0.5 ks + 18 - 0.183, 0.5 kp -0.125 kp - 19.3 - 20.65 - 0.301]
rotate: -90
trrs:
what: trrs
where: matrix_inner_top
params:
A: data # Tip and first ring can be together
B: data # Tip and first ring can be together
C: GND
D: VCC
reverse: true
symmetric: true
adjust:
shift: [0.5 ks + 19.2 + 0.41, 0.5 kp -0.125 kp - 19.3 - 30.75 -0.26]
rotate: -90