PCB: Add decoupling capacitors to the LEDs

This commit is contained in:
Lexi / Zoe 2024-02-29 18:24:06 +01:00
parent 742be3a927
commit b621ff952c
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
2 changed files with 54 additions and 1 deletions

View File

@ -219,7 +219,23 @@ pcbs:
where: [ [ is_key, flip_led ] ]
adjust.rotate: 180
# TODO: Decoupling capacitors for the LEDs?
led_capacitor:
what: cap_0805
where: [ [ is_key, -flip_led ] ]
adjust:
shift: [ -6, 4.5 ]
rotate: 90
params:
side: B
from: VCC
to: GND
led_capacitor_flipped:
$extends: pcbs.eepypad.footprints.led_capacitor
where: [ [ is_key, flip_led ] ]
adjust:
shift: [ 6, 4.9 ]
rotate: 270
controller:
what: promicro_modified

View File

@ -0,0 +1,37 @@
module.exports = {
params: {
designator: 'C',
side: 'F',
from: undefined,
to: undefined
},
body: p => `
(module C_0805_2012Metric (layer ${p.side}.Cu) (tedit 5F68FEEE)
${p.at /* parametric position */}
${'' /* footprint reference */}
(fp_text reference "${p.ref}" (at 0 0) (layer ${p.side}.SilkS) ${p.ref_hide} (effects (font (size 1.27 1.27) (thickness 0.15))))
(fp_text value "" (at 0 0) (layer ${p.side}.SilkS) hide (effects (font (size 1.27 1.27) (thickness 0.15))))
${''/* capacitor symbols */}
(fp_line (start -1 0.625) (end -1 -0.625) (layer ${p.side}.Fab) (width 0.1))
(fp_line (start -1 -0.625) (end 1 -0.625) (layer ${p.side}.Fab) (width 0.1))
(fp_line (start 1 -0.625) (end 1 0.625) (layer ${p.side}.Fab) (width 0.1))
(fp_line (start 1 0.625) (end -1 0.625) (layer ${p.side}.Fab) (width 0.1))
(fp_line (start -0.261252 -0.735) (end 0.261252 -0.735) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start -0.261252 0.735) (end 0.261252 0.735) (layer ${p.side}.SilkS) (width 0.12))
(fp_line (start -1.7 0.98) (end -1.7 -0.98) (layer ${p.side}.CrtYd) (width 0.05))
(fp_line (start -1.7 -0.98) (end 1.7 -0.98) (layer ${p.side}.CrtYd) (width 0.05))
(fp_line (start 1.7 -0.98) (end 1.7 0.98) (layer ${p.side}.CrtYd) (width 0.05))
(fp_line (start 1.7 0.98) (end -1.7 0.98) (layer ${p.side}.CrtYd) (width 0.05))
${''/* SMD pads */}
(pad 1 smd roundrect (at -0.95 0 ${p.r}) (size 1 1.45) (layers ${p.side}.Cu ${p.side}.Mask ${p.side}.Paste)
(roundrect_rratio 0.25) ${p.to}
)
(pad 2 smd roundrect (at 0.95 0 ${p.r}) (size 1 1.45) (layers ${p.side}.Cu ${p.side}.Mask ${p.side}.Paste)
(roundrect_rratio 0.25) ${p.from}
)
)
`
}