Ergogen: Finalize PCB

This commit is contained in:
Lexi / Zoe 2024-08-03 19:14:18 +02:00
parent 6bf16ac7fe
commit 31995f676a
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
3 changed files with 124 additions and 12 deletions

View File

@ -49,13 +49,13 @@ points:
rows:
# Modifier row (Ctrl, ..., but excluding the thumb keys)
mods:
row_net: GP13
row_net: GP17
led_previous_key: "{{zone.name}}_{{neighbor_col_left}}_{{row}}"
tags: [ is_key, flip_led ]
# Bottom letter row (Shift, ZXCV...)
bottom:
row_net: GP14
row_net: GP16
led_previous_key: "{{zone.name}}_{{neighbor_col_right}}_{{row}}"
# Middle/home letter row (Caps Lock, ASDFG...)
@ -66,12 +66,12 @@ points:
# Top letter row (Tab, QWERT...)
top:
row_net: GP16
row_net: GP14
led_previous_key: "{{zone.name}}_{{neighbor_col_right}}_{{row}}"
# Number row (`, 12345...)
numbers:
row_net: GP17
row_net: GP13
led_previous_key: "{{zone.name}}_{{neighbor_col_left}}_{{row}}"
tags: [ is_key, flip_led ]
@ -165,7 +165,7 @@ points:
# Rotate the thumb keys around the bottom-left corner of the key
key:
row_net: GP13
row_net: GP17
tags: [ is_key, flip_led ]
origin: [ -0.5cx, -0.5cy ]
splay: -4
@ -306,18 +306,18 @@ outlines:
- what: polygon
points:
- ref: primary_zero_numbers
shift: [ -0.5cx, 1.5cy + function_zone_offset ]
shift: [ -0.5cx + 1, 1.5cy + function_zone_offset + 2 ]
- ref: primary_twelve_numbers
shift: [ 0.5cx, 1.5cy + function_zone_offset ]
shift: [ 0.5cx - 1, 1.5cy + function_zone_offset + 2]
- ref: primary_twelve_mods
shift: [ 0.5cx, -0.5cy ]
shift: [ 0.5cx - 1, -0.5cy + 2 ]
- ref: mirror_thumb_four
shift: [ 0.5cx, -0.5cy ]
shift: [ 0.5cx, -0.5cy + 2 ]
- ref: thumb_four
shift: [ 0.5cx, -0.5cy ]
shift: [ 0.5cx, -0.5cy + 2 ]
- ref: primary_zero_mods
shift: [ -0.5cx, -0.5cy ]
expand: 6
shift: [ -0.5cx + 1, -0.5cy + 2 ]
expand: 4
# Preview version of board with key caps and components for visualization
board_preview:
@ -359,10 +359,12 @@ outlines:
# Generate the PCB
pcbs:
eepyboard:
# Define outline (edges) of the board based on the outlines defined above
outlines:
main:
outline: board
# Define PCB components
footprints:
controller:
what: rp2040_purple
@ -495,3 +497,51 @@ pcbs:
params:
from: GND
to: RUN
# Mounting holes
mounting_hole_top_left:
what: mountinghole_m2
where:
ref: function_esc
shift: [ -9, 11.5 ]
mounting_hole_top_center:
what: mountinghole_m2
where:
ref: function_f4
shift: [ 12.5, 0 ]
mounting_hole_top_right:
what: mountinghole_m2
where:
ref: primary_twelve_numbers
shift: [ 9, cy + function_zone_offset + 11.5 ]
mounting_hole_bottom_left:
what: mountinghole_m2
where:
ref: primary_one_mods
shift: [ 10.5, -12 ]
mounting_hole_bottom_center:
what: mountinghole_m2
where:
ref: primary_six_bottom
shift: [ 0, -23 ]
mounting_hole_bottom_right:
what: mountinghole_m2
where:
ref: primary_eleven_mods
shift: [ -10.5, -12 ]
# Render text with project name and copyright onto the PCB
copyright_text:
what: text
where:
ref: primary_six_bottom
shift: [ 0, -15 ]
params:
text: |-
eepyBoard v1.0 by binaryDiv
(c) 2024 (MIT License)

View File

@ -0,0 +1,24 @@
// MountingHole_2.2mm_M2
// Source: https://kicad.github.io/footprints/MountingHole
module.exports = {
nets: {
net: undefined
},
params: {
class: 'HOLE',
},
body: p => `
(module MountingHole_2.2mm_M2 (layer F.Cu) (tedit 56D1B4CB)
${p.at /* parametric position */}
(fp_text reference "${p.ref}" (at 0 -3.2) (layer F.SilkS) ${p.ref_hide}
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_circle (center 0 0) (end 2.2 0) (layer Cmts.User) (width 0.15))
(fp_circle (center 0 0) (end 2.45 0) (layer F.CrtYd) (width 0.05))
(pad 1 np_thru_hole circle (at 0 0) (size 2.2 2.2) (drill 2.2) (layers *.Cu *.Mask))
)
`
}

View File

@ -0,0 +1,38 @@
// Graphical text box to render text (e.g. project name, copyright) onto the board
//
// The text can be multi-line. Linebreaks and quotes are automatically escaped.
// Backslashes are *not* escaped to allow for other escape sequences.
//
// Params
// side: Side of the PCB ("F" or "B")
// text: Text to be rendered
module.exports = {
params: {
layer: 'F.SilkS',
text: 'Example text!',
},
body: p => {
function escape_str(text) {
return text
.replace('"', '\\"')
.replace('\n', '\\n')
.replace('\r', '')
}
return `
(gr_text "${escape_str(p.text)}"
${p.at /* parametric position */}
(layer ${p.layer})
(effects
(font
(size 1.5 1.5)
(thickness 0.3)
(bold yes)
)
)
)
`;
}
}