rgb matrix and drc rules

This commit is contained in:
2025-09-02 20:35:02 -07:00
parent 41fc26ad4a
commit f2adbc1a75
41 changed files with 45481 additions and 41345 deletions

View File

@@ -0,0 +1,133 @@
(version 1)
# Custom Design Rules (DRC) for KiCAD 7.0 (Stored in '<project>.kicad_dru' file).
#
# Matching JLCPCB capabilities: https://jlcpcb.com/capabilities/pcb-capabilities
#
# KiCad documentation: https://docs.kicad.org/master/id/pcbnew/pcbnew_advanced.html#custom_design_rules
#
# Inspiration
# - https://gist.github.com/darkxst/f713268e5469645425eed40115fb8b49 (with comments)
# - https://gist.github.com/denniskupec/e163d13b0a64c2044bd259f64659485e (with comments)
# TODO new rule: NPTH pads.
# Inner diameter of pad should be 0.4-0.5 mm larger than NPTH drill diameter.
# JLCPCB: "We make NPTH via dry sealing film process, if customer would like a NPTH but around with pad/copper, our engineer will dig out around pad/copper about 0.2mm-0.25mm, otherwise the metal potion will be flowed into the hole and it becomes a PTH. (there will be no copper dig out optimization for single board)."
# TODO: new rule for plated slots: min diameter/width 0.5mm
# JLCPCB: "The minimum plated slot width is 0.5mm, which is drawn with a pad."
# TODO new rule: non-plated slots: min diameter/width 1.0mm
# JLCPCB: "The minimum Non-Plated Slot Width is 1.0mm, please draw the slot outline in the mechanical layer(GML or GKO)""
(rule "Track width, outer layer (1oz copper)"
(layer outer)
(condition "A.Type == 'track'")
(constraint track_width (min 0.127mm))
)
(rule "Track spacing, outer layer (1oz copper)"
(layer outer)
(condition "A.Type == 'track' && B.Type == A.Type")
(constraint clearance (min 0.127mm))
)
(rule "Track width, inner layer"
(layer inner)
(condition "A.Type == 'track'")
(constraint track_width (min 0.09mm))
)
(rule "Track spacing, inner layer"
(layer inner)
(condition "A.Type == 'track' && B.Type == A.Type")
(constraint clearance (min 0.09mm))
)
(rule "Silkscreen text"
(layer "?.Silkscreen")
(condition "A.Type == 'Text' || A.Type == 'Text Box'")
(constraint text_thickness (min 0.15mm))
(constraint text_height (min 1mm))
)
(rule "Pad to Silkscreen"
(layer outer)
(condition "A.Type == 'pad' && B.Layer == '?.Silkscreen'")
(constraint silk_clearance (min 0.15mm))
)
(rule "Edge (routed) to track clearance"
(condition "A.Type == 'track'")
(constraint edge_clearance (min 0.3mm))
)
#(rule "Edge (v-cut) to track clearance"
# (condition "A.Type == 'track'")
# (constraint edge_clearance (min 0.4mm))
#)
# JLCPCB restrictions ambiguous:
# Illustration: 0.2 mm, 1&2 layer: 0.3 mm, multilayer: "(0.15mm more costly)"
# This rule handles diameter minimum and maximum for ALL holes.
# Other specialized rules handle restrictions (e.g. Via, PTH, NPTH)
(rule "Hole diameter"
(constraint hole_size (min 0.2mm) (max 6.3mm))
)
(rule "Hole (NPTH) diameter"
(layer outer)
(condition "!A.isPlated()")
(constraint hole_size (min 0.5mm))
)
# TODO: Hole to board edge ≥ 1 mm. Min. board size 10 × 10 mm
(rule "Hole (castellated) diameter"
(layer outer)
(condition "A.Type == 'pad' && A.Fabrication_Property == 'Castellated pad'")
(constraint hole_size (min 0.6mm))
)
# JLCPCB: "Via diameter should be 0.1mm(0.15mm preferred) larger than Via hole size" (illustration shows diameters for both dimensions)
# JLCPCB: PTH: "The annular ring size will be enlarged to 0.15mm in production."
(rule "Annular ring width (via and PTH)"
(layer outer)
(condition "A.isPlated()")
(constraint annular_width (min 0.075mm))
)
(rule "Clearance: hole to hole (perimeter), different nets"
(layer outer)
(condition "A.Net != B.Net")
(constraint hole_to_hole (min 0.5mm))
)
(rule "Clearance: hole to hole (perimeter), same net"
(layer outer)
(condition "A.Net == B.Net")
(constraint hole_to_hole (min 0.254mm))
)
(rule "Clearance: track to NPTH hole (perimeter)"
# (condition "A.Pad_Type == 'NPTH, mechanical' && B.Type == 'track' && A.Net != B.Net")
(condition "!A.isPlated() && B.Type == 'track' && A.Net != B.Net")
(constraint hole_clearance (min 0.254mm))
)
(rule "Clearance: track to PTH hole perimeter"
(condition "A.isPlated() && B.Type == 'track' && A.Net != B.Net")
(constraint hole_clearance (min 0.33mm))
)
# TODO: try combining with rule "Clearance: PTH to track, different nets"
(rule "Clearance: track to pad"
(condition "A.Type == 'pad' && B.Type == 'track' && A.Net != B.Net")
(constraint clearance (min 0.2mm))
)
(rule "Clearance: pad/via to pad/via"
(layer outer)
# (condition "(A.Type == 'Pad' || A.Type == 'Via') && (B.Type == 'Pad' || B.Type == 'Via') && A.Net != B.Net")
(condition "A.isPlated() && B.isPlated() && A.Net != B.Net")
(constraint clearance (min 0.127mm))
)

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
"shapes": 1.0,
"tracks": 1.0,
"vias": 1.0,
"zones": 0.6
"zones": 0.4099999964237213
},
"selection_filter": {
"dimensions": true,
@@ -73,6 +73,8 @@
false,
false,
false,
false,
false,
false
],
"col_order": [
@@ -85,19 +87,23 @@
6,
7,
8,
9
9,
10,
11
],
"col_widths": [
10,
10,
10,
10,
10,
10,
10,
10,
10,
185
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"custom_group_rules": [],
"expanded_rows": [],

View File

@@ -51,7 +51,13 @@
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [],
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [],
"meta": {
"version": 2
@@ -130,7 +136,7 @@
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_track_width": 0.16,
"min_via_annular_width": 0.1,
"min_via_diameter": 0.5,
"solder_mask_to_copper_clearance": 0.0,
@@ -180,7 +186,10 @@
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [],
"track_widths": [
0.0,
0.2
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
@@ -207,7 +216,12 @@
"spacing": 0.6
}
},
"via_dimensions": [],
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false
},
"ipc2581": {
@@ -617,6 +631,10 @@
[
"1d905906-6e74-4741-8b2e-53dc470a7c79",
"Numpad Matrix + Rotary Encoder"
],
[
"ead3be26-7f43-4289-81f3-aae72a11e5f1",
"RGB Matrix"
]
],
"text_variables": {}

File diff suppressed because it is too large Load Diff

View File

@@ -2,4 +2,5 @@
(version 7)
(lib (name "stm32f446ret6")(type "KiCad")(uri "/home/kymkim/Projects/modular-kbd/hardware/symbols/stm32f446ret6/stm32f446ret6.kicad_sym")(options "")(descr ""))
(lib (name "Type-C")(type "Legacy")(uri "/home/kymkim/Projects/modular-kbd/hardware/Type-C.pretty-master/Type-C.lib")(options "")(descr ""))
(lib (name "T36K3BGR-05D000121U1930")(type "KiCad")(uri "/home/ukim/Projects/modular-kbd/hardware/symbols/T36K3BGR-05D000121U1930/T36K3BGR-05D000121U1930.kicad_sym")(options "")(descr ""))
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
{"hostname":"framework16","username":"ukim"}

View File

@@ -0,0 +1,32 @@
(footprint LED_T36K3BGR-05D000121U1930 (layer F.Cu) (tedit 68B7726D)
(descr "")
(attr smd)
(fp_text reference REF** (at -0.825 -2.635 0) (layer F.SilkS)
(effects (font (size 1.0 1.0) (thickness 0.15)))
)
(fp_text value LED_T36K3BGR-05D000121U1930 (at 13.145 2.615 0) (layer F.Fab)
(effects (font (size 1.0 1.0) (thickness 0.15)))
)
(pad 3 smd rect (at 2.75 -0.725) (size 2.0 0.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
(pad 2 smd rect (at 2.75 0.725) (size 2.0 0.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
(pad 1 smd rect (at -2.75 0.725) (size 2.0 0.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
(pad 4 smd rect (at -2.75 -0.725) (size 2.0 0.75) (layers F.Cu F.Mask F.Paste) (solder_mask_margin 0.102))
(fp_line (start -1.6 -1.4) (end 1.6 -1.4) (layer F.Fab) (width 0.127))
(fp_line (start 1.6 -1.4) (end 1.6 1.4) (layer F.Fab) (width 0.127))
(fp_line (start 1.6 1.4) (end -1.6 1.4) (layer F.Fab) (width 0.127))
(fp_line (start -1.6 1.4) (end -1.6 -1.4) (layer F.Fab) (width 0.127))
(fp_line (start -4.0 -1.75) (end 4.0 -1.75) (layer F.CrtYd) (width 0.05))
(fp_line (start 4.0 -1.75) (end 4.0 1.75) (layer F.CrtYd) (width 0.05))
(fp_line (start 4.0 1.75) (end -4.0 1.75) (layer F.CrtYd) (width 0.05))
(fp_line (start -4.0 1.75) (end -4.0 -1.75) (layer F.CrtYd) (width 0.05))
(fp_circle (center -4.5 0.703) (end -4.4 0.703) (layer F.Fab) (width 0.2))
(fp_circle (center -4.5 0.703) (end -4.4 0.703) (layer F.SilkS) (width 0.2))
(fp_line (start -1.7 -1.5) (end -1.7 1.5) (layer Edge.Cuts) (width 0.01))
(fp_line (start -1.7 1.5) (end 1.7 1.5) (layer Edge.Cuts) (width 0.01))
(fp_line (start 1.7 1.5) (end 1.7 -1.5) (layer Edge.Cuts) (width 0.01))
(fp_line (start 1.7 -1.5) (end -1.7 -1.5) (layer Edge.Cuts) (width 0.01))
(fp_text user "The pins are mirrored assuming the LED is facing down on the PCB" (at -3.81 5.08) (layer F.Fab)
(effects (font (size 0.64 0.64) (thickness 0.15)))
)
)

View File

@@ -0,0 +1,228 @@
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
(symbol "T36K3BGR-05D000121U1930" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
(property "Reference" "D" (id 0) (at -10.16 12.7 0)
(effects (font (size 1.27 1.27)) (justify bottom left))
)
(property "Value" "T36K3BGR-05D000121U1930" (id 1) (at -10.16 10.16 0)
(effects (font (size 1.27 1.27)) (justify bottom left))
)
(property "Footprint" "T36K3BGR-05D000121U1930:LED_T36K3BGR-05D000121U1930" (id 2) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MF" "Harvatek Corporation" (id 4) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MAXIMUM_PACKAGE_HEIGHT" "1.0mm" (id 5) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Package" "SMD-4 Harvatek" (id 6) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Price" "None" (id 7) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Check_prices" "https://www.snapeda.com/parts/T36K3BGR-05D000121U1930/Harvatek/view-part/?ref=eda" (id 8) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "STANDARD" "Manufacturer Recommendations" (id 9) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "PARTREV" "1.1" (id 10) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "SnapEDA_Link" "https://www.snapeda.com/parts/T36K3BGR-05D000121U1930/Harvatek/view-part/?ref=snap" (id 11) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MP" "T36K3BGR-05D000121U1930" (id 12) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Description" "\n \n Red, Green, Blue (RGB) - LED Indication - Discrete 2V Red, 2.6V Green, 2.6V Blue 4-SMD, Flat Leads\n \n" (id 13) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "Availability" "In Stock" (id 14) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(property "MANUFACTURER" "Harvatek" (id 15) (at 0 0 0)
(effects (font (size 1.27 1.27)) (justify bottom) hide)
)
(symbol "T36K3BGR-05D000121U1930_0_0"
(polyline
(pts (xy 0.0 9.144) (xy 0.0 7.62)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 7.62) (xy 0.0 6.096)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 6.096) (xy 2.54 7.62)) (stroke (width 0.254))
)
(polyline
(pts (xy 2.54 7.62) (xy 0.0 9.144)) (stroke (width 0.254))
)
(polyline
(pts (xy 2.54 9.144) (xy 2.54 6.096)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 1.524) (xy 0.0 0.0)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 0.0) (xy 0.0 -1.524)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 -1.524) (xy 2.54 0.0)) (stroke (width 0.254))
)
(polyline
(pts (xy 2.54 0.0) (xy 0.0 1.524)) (stroke (width 0.254))
)
(polyline
(pts (xy 2.54 1.524) (xy 2.54 -1.524)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 -6.096) (xy 0.0 -7.62)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 -7.62) (xy 0.0 -9.144)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 -9.144) (xy 2.54 -7.62)) (stroke (width 0.254))
)
(polyline
(pts (xy 2.54 -7.62) (xy 0.0 -6.096)) (stroke (width 0.254))
)
(polyline
(pts (xy 2.54 -6.096) (xy 2.54 -9.144)) (stroke (width 0.254))
)
(polyline
(pts (xy 0.0 7.62) (xy -2.54 7.62)) (stroke (width 0.1524))
)
(polyline
(pts (xy -2.54 7.62) (xy -2.54 0.0)) (stroke (width 0.1524))
)
(polyline
(pts (xy -2.54 0.0) (xy -2.54 -7.62)) (stroke (width 0.1524))
)
(polyline
(pts (xy -2.54 -7.62) (xy 0.0 -7.62)) (stroke (width 0.1524))
)
(polyline
(pts (xy 0.0 0.0) (xy -2.54 0.0)) (stroke (width 0.1524))
)
(circle (center -2.54 0.0) (radius 0.2032)
(stroke (width 0.4064)) (fill (type none))
)
(polyline
(pts (xy 1.27 -4.572) (xy 0.381 -5.588)) (stroke (width 0.1524))
)
(polyline
(pts
(xy 1.016 -4.318)
(xy 1.524 -4.826)
(xy 1.905 -3.81)
(xy 1.016 -4.318)
)
(stroke (width 0.1524)) (fill (type outline))
)
(polyline
(pts (xy 2.159 -5.207) (xy 1.27 -6.223)) (stroke (width 0.1524))
)
(polyline
(pts
(xy 1.905 -4.953)
(xy 2.413 -5.461)
(xy 2.794 -4.445)
(xy 1.905 -4.953)
)
(stroke (width 0.1524)) (fill (type outline))
)
(polyline
(pts (xy 1.27 3.048) (xy 0.381 2.032)) (stroke (width 0.1524))
)
(polyline
(pts
(xy 1.016 3.302)
(xy 1.524 2.794)
(xy 1.905 3.81)
(xy 1.016 3.302)
)
(stroke (width 0.1524)) (fill (type outline))
)
(polyline
(pts (xy 2.159 2.413) (xy 1.27 1.397)) (stroke (width 0.1524))
)
(polyline
(pts
(xy 1.905 2.667)
(xy 2.413 2.159)
(xy 2.794 3.175)
(xy 1.905 2.667)
)
(stroke (width 0.1524)) (fill (type outline))
)
(polyline
(pts (xy 1.27 10.668) (xy 0.381 9.652)) (stroke (width 0.1524))
)
(polyline
(pts
(xy 1.016 10.922)
(xy 1.524 10.414)
(xy 1.905 11.43)
(xy 1.016 10.922)
)
(stroke (width 0.1524)) (fill (type outline))
)
(polyline
(pts (xy 2.159 10.033) (xy 1.27 9.017)) (stroke (width 0.1524))
)
(polyline
(pts
(xy 1.905 10.287)
(xy 2.413 9.779)
(xy 2.794 10.795)
(xy 1.905 10.287)
)
(stroke (width 0.1524)) (fill (type outline))
)
(text "RED" (at 3.81 10.16 0)
(effects (font (size 1.016 1.016)) (justify bottom left))
)
(text "GREEN" (at 3.81 -5.08 0)
(effects (font (size 1.016 1.016)) (justify bottom left))
)
(text "BLUE" (at 3.81 2.54 0)
(effects (font (size 1.016 1.016)) (justify bottom left))
)
(pin passive line (at 7.62 7.62 180.0) (length 5.08)
(name "~"
(effects (font (size 1.016 1.016)))
)
(number "1"
(effects (font (size 1.016 1.016)))
)
)
(pin passive line (at -7.62 0.0 0) (length 5.08)
(name "~"
(effects (font (size 1.016 1.016)))
)
(number "2"
(effects (font (size 1.016 1.016)))
)
)
(pin passive line (at 7.62 -7.62 180.0) (length 5.08)
(name "~"
(effects (font (size 1.016 1.016)))
)
(number "4"
(effects (font (size 1.016 1.016)))
)
)
(pin passive line (at 7.62 0.0 180.0) (length 5.08)
(name "~"
(effects (font (size 1.016 1.016)))
)
(number "3"
(effects (font (size 1.016 1.016)))
)
)
)
)
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
<!DOCTYPE HTML><html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="refresh" content="0; url=https://www.snapeda.com/about/import/#"> <script type="text/javascript">window.location.href="https://www.snapeda.com/about/import/#" </script> <title>Page Redirection</title> </head> <body> If you are not redirected automatically, follow this <a href="https://www.snapeda.com/about/import/#">link to the import guide</a>. </body></html>