|
| 1 | +# This KiBot script generates gerbers, drill, bom, and position files for submitting |
| 2 | +# two layer boards to JLCPCB. |
| 3 | +variants: |
| 4 | + - name: rotated |
| 5 | + comment: "Just a place holder for the rotation filter" |
| 6 | + type: kibom |
| 7 | + variant: rotated |
| 8 | + pre_transform: fix_rotation |
| 9 | + |
| 10 | +filters: |
| 11 | + - name: only_jlc_parts |
| 12 | + comment: "Only parts with JLC code" |
| 13 | + type: generic |
| 14 | + include_only: |
| 15 | + - column: 'LCSC Part#' |
| 16 | + regex: '^C\d+' |
| 17 | + - name: fix_rotation |
| 18 | + comment: "Adjust rotation for JLC" |
| 19 | + type: rot_footprint |
| 20 | + negative_bottom: true |
| 21 | + # Rotation list from https://github.com/matthewlai/JLCKicadTools/blob/master/jlc_kicad_tools/cpl_rotations_db.csv |
| 22 | + rotations: |
| 23 | + - ["^R_Array_Convex_", 90] |
| 24 | + - ["^R_Array_Concave_", 90] |
| 25 | + - ["^SOT-223", 180] |
| 26 | + - ["^SOT-23", 180] |
| 27 | + - ["^SOT-89", 180] |
| 28 | + - ["^TSOT-23", 180] |
| 29 | + - ["^SOT-353", 180] |
| 30 | + - ["^SOT-363", 180] |
| 31 | + - ["^QFN-", 270] |
| 32 | + - ["^LQFP-", 270] |
| 33 | + - ["^TQFP-", 270] |
| 34 | + - ["^SOP-4_", 0] |
| 35 | + - ["^SOP-(?!18_)", 270] |
| 36 | + - ["^TSSOP-", 270] |
| 37 | + - ["^SSOP-", 270] |
| 38 | + - ["^DFN-", 270] |
| 39 | + - ["^SOIC-", 270] |
| 40 | + - ["^SOP-18_", 0] |
| 41 | + - ["^VSSOP-10_", 270] |
| 42 | + - ["^VSSOP-8_", 270] |
| 43 | + - ["^TSOP-6", 270] |
| 44 | + - ["^CP_EIA-", 180] |
| 45 | + - ["^CP_Elec_8x10.5", 180] |
| 46 | + - ["^CP_Elec_6.3x7.7", 180] |
| 47 | + - ["^CP_Elec_8x6.7", 180] |
| 48 | + - ["^CP_Elec_8x10", 180] |
| 49 | + - ["^CP_Elec_10x10", 180] |
| 50 | + - ["^(.*?_|V)?QFN-(16|20|24|28|40)(-|_|$)", 270] |
| 51 | + - ["^Bosch_LGA-8_2x2.5mm_P0.65mm_ClockwisePinNumbering", 90] |
| 52 | + - ["^PowerPAK_SO-8_Single", 270] |
| 53 | + - ["^HTSSOP-28-1EP_4.4x9.7mm*", 270] |
| 54 | + - ["^PUIAudio_SMT_0825_S_4_R*", 270] |
| 55 | + - ["^USB_C_Receptacle_HRO_TYPE-C-31-M-12*", 180] |
| 56 | + - ["ESP32-WROOM-32", 270] |
| 57 | + - ["^SOIC127P798X216-8N", -90] |
| 58 | + - ["^SW_DIP_SPSTx01_Slide_Copal_CHS-01B_W7.62mm_P1.27mm", -180] |
| 59 | + - ["^BatteryHolder_Keystone_1060_1x2032", -180] |
| 60 | + - ["^SO-14", -90] |
| 61 | + - ["^HTSSOP-", 270] |
| 62 | + - ["^USB_C_Receptacle_XKB_U262-16XN-4BVC11", 180] |
| 63 | + - ["^Relay_DPDT_Omron_G6K-2F-Y", 270] |
| 64 | + - ["^RP2040-QFN-56", 270] |
| 65 | + |
| 66 | +outputs: |
| 67 | + - name: gerbers_jlcpcb.gbr |
| 68 | + comment: Gerbers - JLCPCB |
| 69 | + type: gerber |
| 70 | + dir: gerbers/jlcpcb |
| 71 | + options: |
| 72 | + dnf_filter: '' |
| 73 | + gerber_job_file: '%f-%r-%i.%x' |
| 74 | + output: '%f-%r-%i.%x' |
| 75 | + plot_footprint_values: true |
| 76 | + use_aux_axis_as_origin: true |
| 77 | + variant: '' |
| 78 | + exclude_edge_layer: true |
| 79 | + exclude_pads_from_silkscreen: true |
| 80 | + plot_sheet_reference: false |
| 81 | + plot_footprint_refs: true |
| 82 | + plot_footprint_values: false |
| 83 | + force_plot_invisible_refs_vals: false |
| 84 | + tent_vias: true |
| 85 | + use_protel_extensions: false |
| 86 | + create_gerber_job_file: false |
| 87 | + disable_aperture_macros: true |
| 88 | + gerber_precision: 4.6 |
| 89 | + use_gerber_x2_attributes: false |
| 90 | + use_gerber_net_attributes: false |
| 91 | + line_width: 0.1 |
| 92 | + subtract_mask_from_silk: true |
| 93 | + layers: |
| 94 | + - copper |
| 95 | + - F.SilkS |
| 96 | + - B.SilkS |
| 97 | + - F.Mask |
| 98 | + - B.Mask |
| 99 | + - Edge.Cuts |
| 100 | + |
| 101 | + - name: JLCPCB_drill |
| 102 | + comment: Drill - JLCPCB |
| 103 | + type: excellon |
| 104 | + dir: gerbers/jlcpcb |
| 105 | + options: |
| 106 | + pth_and_npth_single_file: false |
| 107 | + pth_id: "PTH" |
| 108 | + npth_id: "NPTH" |
| 109 | + metric_units: false |
| 110 | + |
| 111 | + - name: JLCPCB_cpl |
| 112 | + comment: "Pick and place - JLCPCB" |
| 113 | + type: position |
| 114 | + options: |
| 115 | + variant: rotated |
| 116 | + output: "%f-%r-%i.%x" |
| 117 | + format: CSV |
| 118 | + units: millimeters |
| 119 | + separate_files_for_front_and_back: true |
| 120 | + only_smd: true |
| 121 | + columns: |
| 122 | + - id: Ref |
| 123 | + name: Designator |
| 124 | + - Val |
| 125 | + - Package |
| 126 | + - id: PosX |
| 127 | + name: "Mid X" |
| 128 | + - id: PosY |
| 129 | + name: "Mid Y" |
| 130 | + - id: Rot |
| 131 | + name: Rotation |
| 132 | + - id: Side |
| 133 | + name: Layer |
| 134 | + |
| 135 | + - name: JLCPCB_bom |
| 136 | + comment: "BOM - JLCPCB" |
| 137 | + type: bom |
| 138 | + options: |
| 139 | + output: "%f-%r-bom-jlcpcb.%x" |
| 140 | + exclude_filter: only_jlc_parts |
| 141 | + ref_separator: "," |
| 142 | + columns: |
| 143 | + - field: Value |
| 144 | + name: Comment |
| 145 | + - field: References |
| 146 | + name: Designator |
| 147 | + - Footprint |
| 148 | + - field: "LCSC Part#" |
| 149 | + name: "LCSC Part #" |
| 150 | + csv: |
| 151 | + hide_pcb_info: true |
| 152 | + hide_stats_info: true |
| 153 | + quote_all: true |
0 commit comments