Add PCB definition to Ergogen config; add custom footprints
This commit is contained in:
parent
9cba8a85d1
commit
97c06871bf
5 changed files with 513 additions and 14 deletions
|
|
@ -24,6 +24,9 @@ units:
|
|||
|
||||
# Define the points (i.e. keys)
|
||||
points:
|
||||
key:
|
||||
tags: [ is_key ]
|
||||
|
||||
zones:
|
||||
pad:
|
||||
# Set anchor to fix placement on KiCad sheet
|
||||
|
|
@ -33,28 +36,79 @@ points:
|
|||
# Key rows (from bottom to top)
|
||||
rows:
|
||||
one:
|
||||
row_net: P9
|
||||
two:
|
||||
row_net: P8
|
||||
tags: [ is_key, flip_led ]
|
||||
three:
|
||||
row_net: P7
|
||||
four:
|
||||
row_net: P6
|
||||
tags: [ is_key, flip_led ]
|
||||
five:
|
||||
row_net: P5
|
||||
|
||||
# Key columns (from left to right)
|
||||
columns:
|
||||
one:
|
||||
key.column_net: P18
|
||||
rows.one.led_din_net: led_dout_two_one
|
||||
rows.two.led_din_net: led_dout_one_three
|
||||
rows.three.led_din_net: led_dout_two_three
|
||||
rows.four.led_din_net: led_dout_one_five
|
||||
rows.five.led_din_net: led_dout_two_five
|
||||
two:
|
||||
key.column_net: P15
|
||||
rows.one.led_din_net: led_dout_three_one
|
||||
rows.two.led_din_net: led_dout_one_two
|
||||
rows.three.led_din_net: led_dout_three_three
|
||||
rows.four.led_din_net: led_dout_one_four
|
||||
rows.five.led_din_net: led_dout_three_five
|
||||
three:
|
||||
key.column_net: P14
|
||||
rows.one.led_din_net: led_dout_four_one
|
||||
rows.two.led_din_net: led_dout_two_two
|
||||
rows.three.led_din_net: led_dout_four_three
|
||||
rows.four.led_din_net: led_dout_two_four
|
||||
rows.five.led_din_net: led_dout_four_five
|
||||
four:
|
||||
key.column_net: P16
|
||||
rows.one.led_din_net: led_dout_five_one
|
||||
rows.two.led_din_net: led_dout_three_two
|
||||
rows.three.led_din_net: led_dout_five_three
|
||||
rows.four.led_din_net: led_dout_three_four
|
||||
rows.five.led_din_net: P19
|
||||
five:
|
||||
rows.five.skip: true
|
||||
key.column_net: P10
|
||||
rows.one.led_din_net: led_dout_five_two
|
||||
rows.two.led_din_net: led_dout_four_two
|
||||
rows.three.led_din_net: led_dout_four_five
|
||||
rows.four.led_din_net: led_dout_four_four
|
||||
# Upper right corner: Rotary encoder instead of key
|
||||
rows.five:
|
||||
width: 20.5
|
||||
height: 20.5
|
||||
shift: [ 1.5, 2 ]
|
||||
tags: [ is_rotary_encoder ]
|
||||
|
||||
# Generate outlines that can be used in the PCB and for 3D models
|
||||
outlines:
|
||||
# Outline of the key caps (like the demo preview; used for debugging)
|
||||
_keys:
|
||||
# Outline of the key caps
|
||||
keys:
|
||||
- what: rectangle
|
||||
where: true
|
||||
where: is_key
|
||||
size: [ cx-1, cy-1 ]
|
||||
|
||||
# Rotary encoder with knob (2cm)
|
||||
# TODO: Not sure about the size and position yet
|
||||
rotary_encoder:
|
||||
- what: rectangle
|
||||
operation: stack
|
||||
size: [ 14, 14 ]
|
||||
- what: circle
|
||||
operation: stack
|
||||
radius: 10
|
||||
|
||||
# Maximum size of PCB (100x100mm to keep it cheap) for visualization
|
||||
_max_outline:
|
||||
- what: rectangle
|
||||
|
|
@ -70,22 +124,22 @@ outlines:
|
|||
adjust.shift: [ 0, 50 - 0.5cx ]
|
||||
fillet: 4
|
||||
|
||||
# Debug version of board with key caps for visualization
|
||||
board_debug:
|
||||
# Preview version of board with key caps and components for visualization
|
||||
board_preview:
|
||||
- board
|
||||
- ^keys
|
||||
- ^_max_outline
|
||||
- ^_keys
|
||||
# Pro Micro board
|
||||
- what: rectangle
|
||||
operation: stack
|
||||
where: pad_five_four
|
||||
size: [ 18, 32 ]
|
||||
adjust.shift: [ 0, cy + 5 ]
|
||||
# Rotary encoder
|
||||
- what: rectangle
|
||||
operation: stack
|
||||
where: pad_five_five
|
||||
size: [ 14, 14 ]
|
||||
size: [ 18, 32 ]
|
||||
adjust.shift: [ 0, 5 ]
|
||||
# Rotary encoder (component)
|
||||
- what: outline
|
||||
name: rotary_encoder
|
||||
operation: stack
|
||||
where: is_rotary_encoder
|
||||
|
||||
# Cutouts for the switches
|
||||
switch_cutouts:
|
||||
|
|
@ -97,3 +151,93 @@ outlines:
|
|||
switch_plate:
|
||||
- board
|
||||
- -switch_cutouts
|
||||
|
||||
# Generate the PCB
|
||||
pcbs:
|
||||
eepypad:
|
||||
outlines:
|
||||
main:
|
||||
outline: board
|
||||
|
||||
footprints:
|
||||
choc_hotswap:
|
||||
what: choc_pretty
|
||||
where: is_key
|
||||
# Rotate footprint so that the hotswap socket is at the bottom and the LED can be at the top
|
||||
adjust.rotate: 180
|
||||
params:
|
||||
keycaps: true
|
||||
hotswap: true
|
||||
from: "{{column_net}}"
|
||||
to: "{{colrow}}"
|
||||
|
||||
# TODO: Check if the position of the rotary encoder fits with the controller board
|
||||
rotary_encoder:
|
||||
what: rotary
|
||||
where: is_rotary_encoder
|
||||
adjust.rotate: 90
|
||||
params:
|
||||
from: "{{column_net}}"
|
||||
to: "{{colrow}}"
|
||||
# TODO: Set these to GPIO pins
|
||||
A: "rotary_encoder_a"
|
||||
B: "rotary_encoder_b"
|
||||
C: "rotary_encoder_c"
|
||||
|
||||
diode:
|
||||
what: diode_smd
|
||||
where: is_key
|
||||
# TODO: Is this a good position? Might be a bit too close to the hotswap sockets...
|
||||
adjust:
|
||||
shift: [ -8.28, -8.5 ]
|
||||
rotate: 90
|
||||
params:
|
||||
side: B
|
||||
from: "{{colrow}}"
|
||||
to: "{{row_net}}"
|
||||
|
||||
diode_rotary_encoder:
|
||||
$extends: pcbs.eepypad.footprints.diode
|
||||
where: is_rotary_encoder
|
||||
adjust.shift: [ 0, 0 ]
|
||||
|
||||
led_pixel:
|
||||
what: sk6812_mini_e
|
||||
# Place unrotated LEDs in all rows without the flip_led tag
|
||||
where: [ [ is_key, -flip_led ] ]
|
||||
# Position LEDs on the LED hole in the Choc switches
|
||||
adjust.shift: [ 0, 4.7 ]
|
||||
params:
|
||||
side: B
|
||||
din: "{{led_din_net}}"
|
||||
dout: "led_dout_{{colrow}}"
|
||||
|
||||
led_pixel_flipped:
|
||||
$extends: pcbs.eepypad.footprints.led_pixel
|
||||
# Place flipped (rotated by 180°) LEDs in all rows *with* the flip_led tag
|
||||
where: [ [ is_key, flip_led ] ]
|
||||
adjust.rotate: 180
|
||||
|
||||
# TODO: Decoupling capacitors for the LEDs?
|
||||
|
||||
controller:
|
||||
what: promicro_modified
|
||||
where:
|
||||
ref: pad_five_five
|
||||
rotate: -90
|
||||
shift: [ 0, 2 ]
|
||||
params:
|
||||
orientation: down
|
||||
|
||||
reset_button:
|
||||
# TODO: Check if the footprint fits to the buttons we ordered
|
||||
what: button
|
||||
where:
|
||||
ref: pad_four_five
|
||||
shift: [ 0, 15 ]
|
||||
params:
|
||||
side: B
|
||||
from: GND
|
||||
to: RST
|
||||
|
||||
# TODO: Mounting holes?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue