diff --git a/.github/workflows/ayab-esp32-design.yml b/.github/workflows/ayab-esp32-design.yml index a9dfb09..a67d9aa 100644 --- a/.github/workflows/ayab-esp32-design.yml +++ b/.github/workflows/ayab-esp32-design.yml @@ -1,6 +1,8 @@ -name: Hardware Design +name: AYAB ESP32 Hardware Check on: + workflow_dispatch: + push: branches: - main @@ -19,26 +21,22 @@ env: jobs: buildfiles: - name: Design check & documentation build + name: Design check runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Create output directory - run: mkdir -p ${workflow_project_dir}/outputs/gerbers - - name: Install KiCad run: sudo bash ./scripts/dependencies.sh - name: Verify clean design files run: | - kicad-cli sch erc -o ${workflow_project_dir}/outputs/erc_errors.json --format json --severity-error --exit-code-violations ${workflow_project_dir}/${kicad_project_name}.kicad_sch - kicad-cli pcb drc -o ${workflow_project_dir}/outputs/drc_errors.json --format json --severity-error --exit-code-violations ${workflow_project_dir}/${kicad_project_name}.kicad_pcb + kicad-cli jobset run --file ./ayab-library/ayab-jobset.kicad_jobset --output 546878ce-2bd2-4fb6-b2a1-e67785afa624 ${workflow_project_dir}/${kicad_project_name}.kicad_pro - name: Archive artifacts uses: actions/upload-artifact@v4 if: always() with: - name: design-artifacts - path: ayab-esp32/outputs + name: erc-drc-artifacts + path: DesignChecks diff --git a/.github/workflows/ayab-esp32-documentation.yml b/.github/workflows/ayab-esp32-documentation.yml index 15297a4..2d5bdd3 100644 --- a/.github/workflows/ayab-esp32-documentation.yml +++ b/.github/workflows/ayab-esp32-documentation.yml @@ -1,15 +1,14 @@ -name: Assembly Documentation +name: AYAB ESP32 Fabrication Outputs on: - pull_request: - branches: - - main - types: - - closed + workflow_dispatch: push: branches: - main + paths: + - ayab-esp32/** + - ayab-library/** env: workflow_project_dir: ayab-esp32 @@ -17,59 +16,61 @@ env: jobs: buildfiles: - if: github.event.pull_request.merged == true name: Design check & documentation build runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Create output directory - run: mkdir -p ${workflow_project_dir}/outputs/gerbers - - name: Install KiCad run: sudo bash ./scripts/dependencies.sh - - name: Export design file PDFs + - name: Export reference materials run: | - kicad-cli sch export pdf -o ${workflow_project_dir}/pdf/${kicad_project_name}-sch.pdf ${workflow_project_dir}/${kicad_project_name}.kicad_sch - kicad-cli pcb export pdf -o ${workflow_project_dir}/pdf/${kicad_project_name}-pcb-front.pdf -l "F.Cu,F.Mask,Edge.Cuts" ${workflow_project_dir}/${kicad_project_name}.kicad_pcb - kicad-cli pcb export pdf -o ${workflow_project_dir}/pdf/${kicad_project_name}-pcb-back.pdf --erd --ev --mirror -l "B.Cu,B.Mask,Edge.Cuts" ${workflow_project_dir}/${kicad_project_name}.kicad_pcb + kicad-cli jobset run --file ./ayab-library/ayab-jobset.kicad_jobset --output faf786cb-df2f-40b8-96a2-4a7fc03f48f1 ./${workflow_project_dir}/${kicad_project_name}.kicad_pro - - name: Export assembly documentation - run: | - kicad-cli sch export bom -o ${workflow_project_dir}/outputs/raw-BOM.csv --fields "Reference,Value,Footprint,LCSC ID" --exclude-dnp --group-by "Val" --sort-asc ${workflow_project_dir}/${kicad_project_name}.kicad_sch - kicad-cli pcb export pos -o ${workflow_project_dir}/outputs/raw-CPL.csv --side front --format csv --use-drill-file-origin --exclude-dnp ${workflow_project_dir}/${kicad_project_name}.kicad_pcb + sudo mv Reference/${kicad_project_name}.pdf Reference/${kicad_project_name}-schematic.pdf + + copper_files=$(ls Reference/*Cu.pdf) + gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=Reference/${kicad_project_name}-assembly.pdf ${copper_files} + sudo rm ${copper_files} - - name: Convert BOM & CPL to JLC format + sudo mv Reference ${workflow_project_dir}/Reference + + - name: Export gerbers and assembly documentation run: | - python3 scripts/jlc_bom_formatter.py ${workflow_project_dir}/outputs/raw-BOM.csv ${workflow_project_dir}/outputs/${kicad_project_name}-BOM.csv - python3 scripts/jlc_cpl_formatter.py ${workflow_project_dir}/outputs/raw-CPL.csv ${workflow_project_dir}/outputs/${kicad_project_name}-CPL.csv - sudo rm ${workflow_project_dir}/outputs/raw-BOM.csv ${workflow_project_dir}/outputs/raw-CPL.csv + kicad-cli jobset run --file ./ayab-library/ayab-jobset.kicad_jobset --output aeb40242-edfd-4f73-854b-b9cc9a052a15 ./${workflow_project_dir}/${kicad_project_name}.kicad_pro + kicad-cli jobset run --file ./ayab-library/ayab-jobset.kicad_jobset --output 6ee855ab-9a47-48ef-8c70-9a0d15a3c70a ./${workflow_project_dir}/${kicad_project_name}.kicad_pro - - name: Export mechanical files + - name: Convert BOM & CPL to JLC format run: | - kicad-cli pcb export gerbers -o ${workflow_project_dir}/outputs/gerbers/ -l "F.Cu,F.Mask,F.Silkscreen,F.Paste,In1.Cu,In2.Cu,B.Cu,B.Mask,B.Silkscreen,B.Paste,Edge.Cuts"--erd --ev --use-drill-file-origin --no-protel-ext ${workflow_project_dir}/${kicad_project_name}.kicad_pcb - kicad-cli pcb export drill -o ${workflow_project_dir}/outputs/gerbers/ --drill-origin plot --format gerber ${workflow_project_dir}/${kicad_project_name}.kicad_pcb - cd ${workflow_project_dir}/outputs - zip -r ${kicad_project_name}-gerbers.zip gerbers - sudo rm -r gerbers + sudo mv Outputs/raw-pos-all-pos.csv Outputs/raw-pos.csv + python3 scripts/jlc_bom_formatter.py Outputs/raw-bom.csv Outputs/${kicad_project_name}-BOM-JLC.csv + python3 scripts/jlc_cpl_formatter.py Outputs/raw-pos.csv Outputs/${kicad_project_name}-CPL-JLC.csv + + sudo mv Outputs/raw-bom.csv Outputs/${kicad_project_name}-bom.csv + sudo mv Outputs/raw-pos.csv Outputs/${kicad_project_name}-pos.csv - - name: Add PDFs to repo + - name: Add reference materials to repo env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git config --global user.email "robot@ayab-knitting.com" - git config --global user.name "AYAB Github Action" - git fetch - git checkout documentation - git add ${workflow_project_dir}/pdf/*.pdf + git config --global user.email "robot@ayabknitting.com" + git config --global user.name "robot" + git add ${workflow_project_dir}/Reference/* git commit -m "Add design file PDFs to repo [skip ci]" - gh pr create --head documentation --base main --title "Add design file PDFs to repo" --body "Automated PR from GHA" + git push - name: Archive artifacts uses: actions/upload-artifact@v4 if: always() with: name: documentation-artifacts - path: ayab-esp32/outputs \ No newline at end of file + path: Outputs/ + + - name: Archive artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: reference-artifacts + path: ayab-esp32/Reference/ \ No newline at end of file diff --git a/.github/workflows/ayab-shield-design.yml b/.github/workflows/ayab-shield-design.yml new file mode 100644 index 0000000..a5a02a0 --- /dev/null +++ b/.github/workflows/ayab-shield-design.yml @@ -0,0 +1,42 @@ +name: AYAB Shield Hardware Check + +on: + workflow_dispatch: + + push: + branches: + - main + paths: + - ayab-shield/** + + pull_request: + branches: + - main + paths: + - ayab-shield/** + +env: + workflow_project_dir: ayab-shield + kicad_project_name: arduino_shield + +jobs: + buildfiles: + name: Design check + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install KiCad + run: sudo bash ./scripts/dependencies.sh + + - name: Verify clean design files + run: | + kicad-cli jobset run --file ./ayab-library/ayab-jobset.kicad_jobset --output 546878ce-2bd2-4fb6-b2a1-e67785afa624 ${workflow_project_dir}/${kicad_project_name}.kicad_pro + + - name: Archive artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: erc-drc-artifacts + path: DesignChecks diff --git a/.github/workflows/ayab-shield-documentation.yml b/.github/workflows/ayab-shield-documentation.yml new file mode 100644 index 0000000..7fb137d --- /dev/null +++ b/.github/workflows/ayab-shield-documentation.yml @@ -0,0 +1,74 @@ +name: AYAB Shield Fabrication Outputs + +on: + workflow_dispatch: + + push: + paths: + - ayab-shield/** + - ayab-library/** + +env: + workflow_project_dir: ayab-shield + kicad_project_name: arduino_shield + +jobs: + buildfiles: + name: Design check & documentation build + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install KiCad + run: sudo bash ./scripts/dependencies.sh + + - name: Export reference materials + run: | + kicad-cli jobset run --file ./ayab-library/ayab-jobset.kicad_jobset --output faf786cb-df2f-40b8-96a2-4a7fc03f48f1 ./${workflow_project_dir}/${kicad_project_name}.kicad_pro + + sudo mv Reference/${kicad_project_name}.pdf Reference/${kicad_project_name}-schematic.pdf + + copper_files=$(ls Reference/*Cu.pdf) + gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=Reference/${kicad_project_name}-assembly.pdf ${copper_files} + sudo rm ${copper_files} + + sudo mv Reference ${workflow_project_dir}/Reference + + - name: Export gerbers and assembly documentation + run: | + kicad-cli jobset run --file ./ayab-library/ayab-jobset.kicad_jobset --output aeb40242-edfd-4f73-854b-b9cc9a052a15 ./${workflow_project_dir}/${kicad_project_name}.kicad_pro + kicad-cli jobset run --file ./ayab-library/ayab-jobset.kicad_jobset --output 6ee855ab-9a47-48ef-8c70-9a0d15a3c70a ./${workflow_project_dir}/${kicad_project_name}.kicad_pro + + - name: Convert BOM & CPL to JLC format + run: | + sudo mv Outputs/raw-pos-all-pos.csv Outputs/raw-pos.csv + python3 scripts/jlc_bom_formatter.py Outputs/raw-bom.csv Outputs/${kicad_project_name}-BOM-JLC.csv + python3 scripts/jlc_cpl_formatter.py Outputs/raw-pos.csv Outputs/${kicad_project_name}-CPL-JLC.csv + + sudo mv Outputs/raw-bom.csv Outputs/${kicad_project_name}-bom.csv + sudo mv Outputs/raw-pos.csv Outputs/${kicad_project_name}-pos.csv + + - name: Add reference materials to repo + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.email "robot@ayabknitting.com" + git config --global user.name "robot" + git add ${workflow_project_dir}/Reference/* + git commit -m "Add design file PDFs to repo [skip ci]" + git push + + - name: Archive artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: documentation-artifacts + path: Outputs/ + + - name: Archive artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: reference-artifacts + path: ayab-shield/Reference/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 368ec33..fbdcbe6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store ayab-esp32/datasheets/* -*/Gerbers/* -*gerbers.zip +*/Outputs/* +*/DesignChecks/* +*.zip diff --git a/ayab-esp32/README.md b/ayab-esp32/README.md index 874cca6..03960d3 100644 --- a/ayab-esp32/README.md +++ b/ayab-esp32/README.md @@ -1,5 +1,5 @@ [![Hardware Design](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-esp32-design.yml/badge.svg?branch=main)](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-esp32-design.yml) -[![Assembly Documentation](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-esp32-documentation.yml/badge.svg)](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-esp32-documentation.yml) +[![Fabrication Outputs](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-esp32-documentation.yml/badge.svg)](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-esp32-documentation.yml) # AYAB-ESP32 These are the design files for the latest generation of AYAB hardware, a new, next controller for knitting machines.\ @@ -19,5 +19,6 @@ Based on the ESP32, many new features have been implemented:\ The project was designed using KiCad 8. All symbols, footprints, and models are self contained to this repository so no additional files are required in order to view or modify the design. ![Prototype hardware assembly](images/ayab-esp32.png) +![Live Render](Reference/top.png) Questions? Comments? Great ideas? Talk with us in [#hardware-development on Discord](https://discord.gg/A8KE3jcCn2)! \ No newline at end of file diff --git a/ayab-esp32/board2pdf.config.ini b/ayab-esp32/board2pdf.config.ini deleted file mode 100644 index c8472f5..0000000 --- a/ayab-esp32/board2pdf.config.ini +++ /dev/null @@ -1,9 +0,0 @@ -[main] -output_dest_dir = /Users/mateijordache/Documents/electronics_projects/ayab-hardware/ayab-esp32/pdf -enabled_templates = Black-And-White-TOP,Black-And-White-BOT -disabled_templates = Colored-BOT,Colored-TOP,Light-Colors-PCB-Fabrication-TOP,Light-Colors-PCB-Paste-TOP,Light-Colors-Placement-BOT,Light-Colors-Placement-TOP -settings = {"Black-And-White-BOT": {"mirrored": true, "tented": false, "enabled_layers": "Edge.Cuts,B.Fab,B.Silkscreen,B.Paste,B.Cu", "frame": "B.Fab", "layers": {"B.Cu": "#F0F0F0", "B.Paste": "#C4C4C4", "Edge.Cuts": "#575757", "B.Fab": "#000000"}, "layers_negative": {"B.Fab": "false"}}, "Black-And-White-TOP": {"mirrored": false, "tented": false, "enabled_layers": "User.Eco1,Edge.Cuts,F.Fab,F.Silkscreen,F.Paste,F.Cu", "frame": "F.Fab", "layers": {"F.Cu": "#F0F0F0", "F.Paste": "#C4C4C4", "Edge.Cuts": "#575757", "User.Eco1": "#000000", "F.Silkscreen": "#000000", "F.Fab": "#000000"}, "layers_negative": {"User.Eco1": "false", "Edge.Cuts": "false", "F.Silkscreen": "false", "F.Paste": "false", "F.Cu": "false", "F.Fab": "false"}, "layers_footprint_values": {}, "layers_reference_designators": {}}, "Colored-TOP": {"mirrored": false, "tented": false, "enabled_layers": "User.Eco1,Edge.Cuts,F.Fab,F.Silkscreen,F.Paste,F.Cu", "frame": "F.Fab", "layers": {"F.Cu": "#B3FFB3", "F.Paste": "#FF8A8A", "F.Silkscreen": "#626262", "Edge.Cuts": "#FF8000", "User.Eco1": "#000080", "F.Fab": "#000080"}, "layers_negative": {"Edge.Cuts": "false", "User.Eco1": "false", "F.Fab": "false"}}, "Colored-BOT": {"mirrored": true, "tented": false, "enabled_layers": "Edge.Cuts,B.Fab,B.Silkscreen,B.Paste,B.Cu", "frame": "B.Fab", "layers": {"F.Fab": "#000080", "User.Eco1": "#000080", "Edge.Cuts": "#FF8000", "B.Silkscreen": "#626262", "B.Paste": "#FF8A8A", "B.Cu": "#B3FFB3", "B.Fab": "#000080"}, "layers_negative": {"B.Fab": "false", "B.Cu": "false", "B.Paste": "false", "B.Silkscreen": "false", "Edge.Cuts": "false"}}, "Light-Colors-Placement-TOP": {"mirrored": false, "tented": false, "enabled_layers": "Margin,Edge.Cuts,F.Fab,F.Silkscreen,F.Paste,F.Mask,F.Cu", "frame": "Margin", "layers": {"B.Courtyard": "#000000", "Edge.Cuts": "#804000", "User.Comments": "#0080FF", "F.Fab": "#222222", "F.Cu": "#EEEEEE", "F.Paste": "#A8A8A8", "F.Silkscreen": "#CCCCAA", "Margin": "#000000", "F.Mask": "#C0C0C0", "B.Cu": "#EEEEEE", "B.Fab": "#808080", "B.Silkscreen": "#000000", "B.Paste": "#A8A8A8", "B.Mask": "#C0C0C0"}, "layers_negative": {"B.Courtyard": "false", "Edge.Cuts": "false", "User.Comments": "false", "F.Fab": "false", "F.Cu": "false", "F.Paste": "false", "F.Silkscreen": "false", "Margin": "false", "F.Mask": "false", "B.Cu": "false", "B.Fab": "false", "B.Silkscreen": "false", "B.Paste": "false", "B.Mask": "false"}}, "Light-Colors-PCB-Fabrication-TOP": {"mirrored": false, "tented": false, "enabled_layers": "Margin,User.Comments,User.Drawings,Edge.Cuts,F.Silkscreen,F.Mask,F.Cu", "frame": "Margin", "layers": {"Edge.Cuts": "#804000", "F.Silkscreen": "#DDDDDD", "B.Silkscreen": "#000000", "F.Fab": "#808080", "F.Mask": "#D0D0D0", "User.Comments": "#00008A", "User.Drawings": "#EFEFBA", "F.Cu": "#EEEEEE", "B.Cu": "#C6C6FF", "In30.Cu": "#000000", "Margin": "#830000", "F.Paste": "#400000"}, "layers_negative": {"Edge.Cuts": "false", "F.Silkscreen": "false", "B.Silkscreen": "false", "F.Fab": "false", "F.Mask": "false", "User.Comments": "false", "User.Drawings": "false", "F.Cu": "false", "B.Cu": "false", "In30.Cu": "false", "Margin": "false", "F.Paste": "false"}}, "Light-Colors-PCB-Paste-TOP": {"mirrored": false, "tented": false, "enabled_layers": "Margin,Edge.Cuts,F.Paste,F.Mask,F.Cu", "frame": "Margin", "layers": {"Edge.Cuts": "#635547", "F.Silkscreen": "#DDDDDD", "B.Silkscreen": "#000000", "F.Fab": "#808080", "F.Mask": "#D0D0D0", "User.Comments": "#00008A", "User.Drawings": "#EFEFBA", "F.Cu": "#EEEEEE", "B.Cu": "#C6C6FF", "In30.Cu": "#000000", "Margin": "#830000", "F.Paste": "#400000"}, "layers_negative": {"Edge.Cuts": "false", "F.Silkscreen": "false", "B.Silkscreen": "false", "F.Fab": "false", "F.Mask": "false", "User.Comments": "false", "User.Drawings": "false", "F.Cu": "false", "B.Cu": "false", "In30.Cu": "false", "Margin": "false", "F.Paste": "false"}}, "Light-Colors-Placement-BOT": {"mirrored": true, "tented": false, "enabled_layers": "Margin,Edge.Cuts,B.Fab,B.Silkscreen,B.Paste,B.Mask,B.Cu", "frame": "Margin", "layers": {"B.Courtyard": "#000000", "Edge.Cuts": "#804000", "User.Comments": "#0080FF", "F.Fab": "#808080", "F.Cu": "#EEEEEE", "F.Paste": "#A8A8A8", "F.Silkscreen": "#DDDD00", "Margin": "#000000", "F.Mask": "#C0C0C0", "B.Cu": "#EEEEEE", "B.Fab": "#222222", "B.Silkscreen": "#CCCCAA", "B.Paste": "#A8A8A8", "B.Mask": "#C0C0C0"}, "layers_negative": {"B.Courtyard": "false", "Edge.Cuts": "false", "User.Comments": "false", "F.Fab": "false", "F.Cu": "false", "F.Paste": "false", "F.Silkscreen": "false", "Margin": "false", "F.Mask": "false", "B.Cu": "false", "B.Fab": "false", "B.Silkscreen": "false", "B.Paste": "false", "B.Mask": "false"}}} -del_temp_files = True -create_svg = False -delete_single_page_files = True - diff --git a/ayab-esp32/images/render.png b/ayab-esp32/images/render.png deleted file mode 100644 index 2b1ff24..0000000 Binary files a/ayab-esp32/images/render.png and /dev/null differ diff --git a/ayab-esp32/pdf/ayab-esp32.pdf b/ayab-esp32/pdf/ayab-esp32.pdf deleted file mode 100644 index 3a08ecf..0000000 Binary files a/ayab-esp32/pdf/ayab-esp32.pdf and /dev/null differ diff --git a/ayab-esp32/pdf/ayab-esp32__Assembly.pdf b/ayab-esp32/pdf/ayab-esp32__Assembly.pdf deleted file mode 100644 index cfca4fe..0000000 Binary files a/ayab-esp32/pdf/ayab-esp32__Assembly.pdf and /dev/null differ diff --git a/ayab-library/ayab-jobset.kicad_jobset b/ayab-library/ayab-jobset.kicad_jobset new file mode 100644 index 0000000..733db6c --- /dev/null +++ b/ayab-library/ayab-jobset.kicad_jobset @@ -0,0 +1,550 @@ +{ + "jobs": [ + { + "description": "Create /Outputs/", + "id": "c159b41c-6cbe-4b35-aebd-d2ac9024fcf9", + "settings": { + "command": "mkdir Outputs", + "description": "", + "ignore_exit_code": true, + "output_filename": "/dev/null", + "record_output": true + }, + "type": "special_execute" + }, + { + "description": "", + "id": "e9e82056-af01-41da-9be6-493274655146", + "settings": { + "description": "", + "fail_on_error": true, + "format": "report", + "output_filename": "./erc.rpt", + "severity": 32, + "units": "mm" + }, + "type": "sch_erc" + }, + { + "description": "", + "id": "4e2df5ee-a7a9-49dd-a3b5-c1c2cc44011d", + "settings": { + "description": "", + "fail_on_error": true, + "format": "report", + "output_filename": "./drc.rpt", + "parity": true, + "report_all_track_errors": false, + "severity": 32, + "units": "mm" + }, + "type": "pcb_drc" + }, + { + "description": "", + "id": "eee5477e-0834-44e9-aeb5-bc5e5b05fd69", + "settings": { + "black_and_white": true, + "create_gerber_job_file": true, + "crossout_dnp_footprints_on_fab_layers": true, + "description": "", + "disable_aperture_macros": false, + "drawing_sheet": "", + "drill_shape": 2, + "hide_dnp_footprints_on_fab_layers": false, + "include_netlist_attributes": true, + "layers": [ + "B.Cu", + "B.Mask", + "B.SilkS", + "In30.Cu", + "In29.Cu", + "In28.Cu", + "In27.Cu", + "In26.Cu", + "In25.Cu", + "In24.Cu", + "In23.Cu", + "In22.Cu", + "In21.Cu", + "In20.Cu", + "In19.Cu", + "In18.Cu", + "In17.Cu", + "In16.Cu", + "In15.Cu", + "In14.Cu", + "In13.Cu", + "In12.Cu", + "In11.Cu", + "In10.Cu", + "In9.Cu", + "In8.Cu", + "In7.Cu", + "In6.Cu", + "In5.Cu", + "In4.Cu", + "In3.Cu", + "In2.Cu", + "In1.Cu", + "F.Cu", + "F.Mask", + "F.SilkS", + "Edge.Cuts" + ], + "layers_to_include_on_all_layers": [], + "mirror": false, + "negative": false, + "output_filename": "./Gerbers", + "plot_drawing_sheet": false, + "plot_footprint_values": true, + "plot_pad_numbers": false, + "plot_ref_des": true, + "precision": 5, + "sketch_dnp_footprints_on_fab_layers": true, + "sketch_pads_on_fab_layers": false, + "subtract_solder_mask_from_silk": false, + "use_drill_origin": false, + "use_protel_file_extension": true, + "use_x2_format": true + }, + "type": "pcb_export_gerbers" + }, + { + "description": "", + "id": "e52eb7c5-eee6-47b7-8fff-9789c9bf86c1", + "settings": { + "description": "", + "drill_origin": "abs", + "excellon.combine_pth_npth": true, + "excellon.minimal_header": false, + "excellon.mirror_y": false, + "excellon.oval_drill_route": false, + "format": "excellon", + "generate_map": false, + "gerber_precision": 5, + "map_format": "pdf", + "output_dir": "./Gerbers", + "units": "in", + "zero_format": "decimal" + }, + "type": "pcb_export_drill" + }, + { + "description": "", + "id": "b51f2070-ec57-4018-bc90-f062d4372993", + "settings": { + "bom_format_preset_name": "", + "bom_preset_name": "", + "description": "", + "exclude_dnp": false, + "field_delimiter": ",", + "fields_group_by": [], + "fields_labels": [ + "Reference", + "Value", + "Footprint", + "Datasheet", + "Description", + "Qty", + "#", + "Mfg", + "Mfg P/N", + "LCSC ID" + ], + "fields_ordered": [ + "Reference", + "Value", + "Footprint", + "__Datasheet", + "__Description", + "${QUANTITY}", + "__${ITEM_NUMBER}", + "Mfg", + "Mfg P/N", + "__LCSC ID" + ], + "filter_string": "", + "include_excluded_from_bom": false, + "keep_line_breaks": false, + "keep_tabs": false, + "output_filename": "raw-bom.csv", + "ref_delimiter": "", + "ref_range_delimiter": "", + "sort_asc": true, + "sort_field": "Reference", + "string_delimiter": "" + }, + "type": "sch_export_bom" + }, + { + "description": "", + "id": "f1f039f7-5c50-4fda-80f3-99532da5c93a", + "settings": { + "description": "", + "exclude_dnp": false, + "exclude_footprints_with_th": false, + "format": "csv", + "gerber_board_edge": true, + "negate_bottom_x": false, + "output_filename": "raw-pos.csv", + "side": "both", + "single_file": true, + "smd_only": false, + "units": "mm", + "use_drill_place_file_origin": true + }, + "type": "pcb_export_pos" + }, + { + "description": "Schematic PDF", + "id": "10369bcf-37aa-4b24-9993-fdc451ea5f15", + "settings": { + "black_and_white": false, + "color_theme": "KiCad Classic", + "description": "", + "drawing_sheet": "", + "format": "pdf", + "hpgl_page_size": "default", + "hpgl_pen_size": 1.016, + "hpgl_plot_origin": "A3", + "min_pen_width": 847, + "output_dir": "./", + "page_size": "auto", + "pdf_hierarchical_links": true, + "pdf_metadata": true, + "pdf_property_popups": true, + "plot_all": true, + "plot_drawing_sheet": true, + "use_background_color": true + }, + "type": "sch_export_plot_pdf" + }, + { + "description": "Assembly PDF Top", + "id": "291b575a-4403-4030-9eee-c0d6bab674f9", + "settings": { + "back_fp_property_popups": true, + "black_and_white": false, + "color_theme": "", + "crossout_dnp_footprints_on_fab_layers": true, + "description": "", + "drawing_sheet": "", + "drill_shape": 2, + "front_fp_property_popups": true, + "hide_dnp_footprints_on_fab_layers": false, + "layers": [ + "In30.Cu", + "In29.Cu", + "In28.Cu", + "In27.Cu", + "In26.Cu", + "In25.Cu", + "In24.Cu", + "In23.Cu", + "In22.Cu", + "In21.Cu", + "In20.Cu", + "In19.Cu", + "In18.Cu", + "In17.Cu", + "In16.Cu", + "In15.Cu", + "In14.Cu", + "In13.Cu", + "In12.Cu", + "In11.Cu", + "In10.Cu", + "In9.Cu", + "In8.Cu", + "In7.Cu", + "In6.Cu", + "In5.Cu", + "In4.Cu", + "In3.Cu", + "In2.Cu", + "In1.Cu", + "F.Cu" + ], + "layers_to_include_on_all_layers": [ + "F.Mask", + "F.SilkS", + "Edge.Cuts" + ], + "mirror": false, + "negative": false, + "output_filename": "", + "pdf_gen_mode": "all-layers-separate-files", + "pdf_metadata": true, + "plot_drawing_sheet": false, + "plot_footprint_values": true, + "plot_pad_numbers": false, + "plot_ref_des": true, + "single_document": false, + "sketch_dnp_footprints_on_fab_layers": true, + "sketch_pads_on_fab_layers": false, + "subtract_solder_mask_from_silk": false, + "use_drill_origin": false + }, + "type": "pcb_export_pdf" + }, + { + "description": "Assembly PDF Bottom", + "id": "92011076-efcc-4b95-add4-8df8eea39c72", + "settings": { + "back_fp_property_popups": true, + "black_and_white": false, + "color_theme": "", + "crossout_dnp_footprints_on_fab_layers": true, + "description": "", + "drawing_sheet": "", + "drill_shape": 2, + "front_fp_property_popups": true, + "hide_dnp_footprints_on_fab_layers": false, + "layers": [ + "B.Cu", + "In30.Cu", + "In29.Cu", + "In28.Cu", + "In27.Cu", + "In26.Cu", + "In25.Cu", + "In24.Cu", + "In23.Cu", + "In22.Cu", + "In21.Cu", + "In20.Cu", + "In19.Cu", + "In18.Cu", + "In17.Cu", + "In16.Cu", + "In15.Cu", + "In14.Cu", + "In13.Cu", + "In12.Cu", + "In11.Cu", + "In10.Cu", + "In9.Cu", + "In8.Cu", + "In7.Cu", + "In6.Cu", + "In5.Cu", + "In4.Cu", + "In3.Cu", + "In2.Cu", + "In1.Cu" + ], + "layers_to_include_on_all_layers": [ + "B.Mask", + "B.SilkS", + "Edge.Cuts" + ], + "mirror": false, + "negative": false, + "output_filename": "", + "pdf_gen_mode": "all-layers-separate-files", + "pdf_metadata": true, + "plot_drawing_sheet": false, + "plot_footprint_values": true, + "plot_pad_numbers": false, + "plot_ref_des": true, + "single_document": false, + "sketch_dnp_footprints_on_fab_layers": true, + "sketch_pads_on_fab_layers": false, + "subtract_solder_mask_from_silk": false, + "use_drill_origin": false + }, + "type": "pcb_export_pdf" + }, + { + "description": "", + "id": "40718fbd-4af7-44ae-8d4e-1ea7c2cce5f6", + "settings": { + "board_only": false, + "board_outlines_chaining_epsilon": 0.01, + "cut_vias_in_body": false, + "description": "", + "export_board_body": true, + "export_components": true, + "export_inner_copper": false, + "export_pads": false, + "export_silkscreen": true, + "export_soldermask": false, + "export_tracks": false, + "export_zones": false, + "fill_all_vias": false, + "format": "step", + "fuse_shapes": false, + "include_dnp": true, + "include_unspecified": true, + "occt_format": 0, + "optimize_step": true, + "output_filename": "ayab.step", + "overwrite": false, + "subst_models": true, + "use_drill_origin": false, + "use_grid_origin": false, + "user_origin.x": 146.74, + "user_origin.y": 103.37, + "vrml_model_dir": "", + "vrml_relative_paths": false + }, + "type": "pcb_export_3d" + }, + { + "description": "", + "id": "0dfbbdd3-c356-41e7-bbe0-64a594f23695", + "settings": { + "bg_style": "default", + "description": "", + "floor": false, + "format": "png", + "height": 1440, + "light_bottom_intensity": [ + 0.0, + 0.0, + 0.0 + ], + "light_camera_intensity": [ + 0.0, + 0.0, + 0.0 + ], + "light_side_elevation": 60, + "light_side_intensity": [ + 0.5, + 0.5, + 0.5 + ], + "light_top_intensity": [ + 0.0, + 0.0, + 0.0 + ], + "output_filename": "top.png", + "pan_x": 0.0, + "pan_y": 0.0, + "pan_z": 0.0, + "perspective": false, + "pivot_x": 0.0, + "pivot_y": 0.0, + "pivot_z": 0.0, + "quality": "basic", + "rotation_x": 0.0, + "rotation_y": 0.0, + "rotation_z": 0.0, + "side": "top", + "width": 3440, + "zoom": 1.0 + }, + "type": "pcb_render" + }, + { + "description": "", + "id": "e61afc46-d22c-40d5-931a-b6f7ec98b4c2", + "settings": { + "bg_style": "default", + "description": "", + "floor": false, + "format": "png", + "height": 1440, + "light_bottom_intensity": [ + 0.0, + 0.0, + 0.0 + ], + "light_camera_intensity": [ + 0.0, + 0.0, + 0.0 + ], + "light_side_elevation": 60, + "light_side_intensity": [ + 0.5, + 0.5, + 0.5 + ], + "light_top_intensity": [ + 0.0, + 0.0, + 0.0 + ], + "output_filename": "bottom.png", + "pan_x": 0.0, + "pan_y": 0.0, + "pan_z": 0.0, + "perspective": false, + "pivot_x": 0.0, + "pivot_y": 0.0, + "pivot_z": 0.0, + "quality": "basic", + "rotation_x": 0.0, + "rotation_y": 0.0, + "rotation_z": 0.0, + "side": "bottom", + "width": 3440, + "zoom": 1.0 + }, + "type": "pcb_render" + } + ], + "meta": { + "version": 1 + }, + "outputs": [ + { + "description": "Gerbers", + "id": "aeb40242-edfd-4f73-854b-b9cc9a052a15", + "only": [ + "c159b41c-6cbe-4b35-aebd-d2ac9024fcf9", + "eee5477e-0834-44e9-aeb5-bc5e5b05fd69", + "e52eb7c5-eee6-47b7-8fff-9789c9bf86c1" + ], + "settings": { + "format": "zip", + "output_path": "./Outputs/gerbers.zip" + }, + "type": "archive" + }, + { + "description": "Reference files", + "id": "faf786cb-df2f-40b8-96a2-4a7fc03f48f1", + "only": [ + "10369bcf-37aa-4b24-9993-fdc451ea5f15", + "291b575a-4403-4030-9eee-c0d6bab674f9", + "92011076-efcc-4b95-add4-8df8eea39c72", + "40718fbd-4af7-44ae-8d4e-1ea7c2cce5f6", + "0dfbbdd3-c356-41e7-bbe0-64a594f23695", + "e61afc46-d22c-40d5-931a-b6f7ec98b4c2" + ], + "settings": { + "output_path": "./Reference" + }, + "type": "folder" + }, + { + "description": "Assembly Documentation", + "id": "6ee855ab-9a47-48ef-8c70-9a0d15a3c70a", + "only": [ + "b51f2070-ec57-4018-bc90-f062d4372993", + "f1f039f7-5c50-4fda-80f3-99532da5c93a" + ], + "settings": { + "output_path": "./Outputs/" + }, + "type": "folder" + }, + { + "description": "Validate Design", + "id": "546878ce-2bd2-4fb6-b2a1-e67785afa624", + "only": [ + "e9e82056-af01-41da-9be6-493274655146", + "4e2df5ee-a7a9-49dd-a3b5-c1c2cc44011d" + ], + "settings": { + "output_path": "./DesignChecks" + }, + "type": "folder" + } + ] +} diff --git a/ayab-shield/README.md b/ayab-shield/README.md new file mode 100644 index 0000000..ffebf1d --- /dev/null +++ b/ayab-shield/README.md @@ -0,0 +1,14 @@ +[![Hardware Design](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-esp32-design.yml/badge.svg?branch=main)](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-shield-design.yml) +[![Fabrication Outputs](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-esp32-documentation.yml/badge.svg)](https://github.com/AllYarnsAreBeautiful/ayab-hardware/actions/workflows/ayab-shield-documentation.yml) + +# AYAB Shield +This is the original design for the AYAB hardware. It is a board in a shield form factor intended to be used with Arduino Uno type development boards. It should be compatible with Uno R2, R3, and R4. +This shield can be built in a variety of configurations that allow for compatibility with Brother KH 270, 900, 910, 930, 940, 950, 965. + +The files required to order/build the board can be found in the Releases on the sidebar, but you can also find workflow artifacts for unvalidated hardware based on the state of the repo. + +The project was designed using KiCad 9. All symbols, footprints, and 3D models are self-contained to the repository. + +![Live Render](Reference/top.png) + +Questions? Comments? Great ideas? Talk with us in [#hardware-development on Discord](https://discord.gg/A8KE3jcCn2)! \ No newline at end of file diff --git a/ayab-shield/arduino_shield.kicad_pcb b/ayab-shield/arduino_shield.kicad_pcb index 2c9b53e..d0f7116 100644 --- a/ayab-shield/arduino_shield.kicad_pcb +++ b/ayab-shield/arduino_shield.kicad_pcb @@ -116,7 +116,6 @@ (psnegative no) (psa4output no) (plot_black_and_white yes) - (plotinvisibletext no) (sketchpadsonfab no) (plotpadnumbers no) (hidednponfab no) @@ -5420,18 +5419,6 @@ (layer "F.CrtYd") (uuid "57757070-897d-4053-9d93-4a454f0889d8") ) - (fp_text user "${REFERENCE}" - (at 0.3 0 0) - (layer "F.Fab") - (hide yes) - (uuid "8b4e39c7-0fcb-482f-bf8c-a2fa97dd927e") - (effects - (font - (size 1 1) - (thickness 0.15) - ) - ) - ) (pad "" np_thru_hole circle (at 0 0) (size 3.2 3.2) @@ -5510,18 +5497,6 @@ (layer "F.CrtYd") (uuid "54aae37a-e41c-4a76-9e6a-083222e4890b") ) - (fp_text user "${REFERENCE}" - (at 0.3 0 0) - (layer "F.Fab") - (hide yes) - (uuid "d280c61b-3dcc-44b2-9b2e-7309f098169b") - (effects - (font - (size 1 1) - (thickness 0.15) - ) - ) - ) (pad "" np_thru_hole circle (at 0 0) (size 3.2 3.2) @@ -6886,18 +6861,6 @@ (layer "F.CrtYd") (uuid "f09bfabe-07ae-4c7c-98de-a9a342ef7e04") ) - (fp_text user "${REFERENCE}" - (at 0.3 0 0) - (layer "F.Fab") - (hide yes) - (uuid "c115cf1f-beba-4a2c-af45-f1f5d6378f14") - (effects - (font - (size 1 1) - (thickness 0.15) - ) - ) - ) (pad "" np_thru_hole circle (at 0 0) (size 3.2 3.2) diff --git a/ayab-shield/arduino_shield.kicad_pro b/ayab-shield/arduino_shield.kicad_pro index 6871f28..1814a9d 100644 --- a/ayab-shield/arduino_shield.kicad_pro +++ b/ayab-shield/arduino_shield.kicad_pro @@ -143,6 +143,7 @@ "solder_mask_bridge": "error", "starved_thermal": "error", "text_height": "warning", + "text_on_edge_cuts": "error", "text_thickness": "warning", "through_hole_pad_without_hole": "error", "too_many_vias": "error", @@ -603,10 +604,10 @@ "gencad": "", "idf": "", "netlist": "../../../../../../../../../Applications/KiCad/KiCad.app/Contents/Applications/", - "plot": "./Gerbers", + "plot": "", "pos_files": "", "specctra_dsn": "", - "step": ".step", + "step": "ayab-shield.step", "svg": "", "vrml": "" }, diff --git a/ayab-shield/ayab-shield.kicad_jobset b/ayab-shield/ayab-shield.kicad_jobset deleted file mode 100644 index 832670a..0000000 --- a/ayab-shield/ayab-shield.kicad_jobset +++ /dev/null @@ -1,303 +0,0 @@ -{ - "jobs": [ - { - "description": "", - "id": "10369bcf-37aa-4b24-9993-fdc451ea5f15", - "settings": { - "black_and_white": false, - "color_theme": "KiCad Classic", - "description": "", - "drawing_sheet": "", - "format": "pdf", - "hpgl_page_size": "default", - "hpgl_pen_size": 1.016, - "hpgl_plot_origin": "A3", - "min_pen_width": 847, - "output_filename": "schematic.pdf", - "page_size": "auto", - "pdf_hierarchical_links": true, - "pdf_metadata": true, - "pdf_property_popups": true, - "plot_all": true, - "plot_drawing_sheet": true, - "use_background_color": true - }, - "type": "sch_export_plot_pdf" - }, - { - "description": "", - "id": "40718fbd-4af7-44ae-8d4e-1ea7c2cce5f6", - "settings": { - "board_only": false, - "board_outlines_chaining_epsilon": 0.01, - "cut_vias_in_body": false, - "description": "", - "export_board_body": true, - "export_components": true, - "export_inner_copper": false, - "export_pads": false, - "export_silkscreen": true, - "export_soldermask": false, - "export_tracks": false, - "export_zones": false, - "fill_all_vias": false, - "format": "step", - "fuse_shapes": false, - "include_dnp": true, - "include_unspecified": true, - "occt_format": 0, - "optimize_step": true, - "output_filename": "ayab-shield.step", - "overwrite": false, - "subst_models": true, - "use_drill_origin": false, - "use_grid_origin": false, - "user_origin.x": 146.74, - "user_origin.y": 103.37, - "vrml_model_dir": "", - "vrml_relative_paths": false - }, - "type": "pcb_export_3d" - }, - { - "description": "", - "id": "eee5477e-0834-44e9-aeb5-bc5e5b05fd69", - "settings": { - "description": "", - "disable_aperture_macros": false, - "drawing_sheet": "", - "include_netlist_attributes": true, - "layers": [ - "F.Cu", - "In1.Cu", - "In2.Cu", - "In3.Cu", - "In4.Cu", - "In5.Cu", - "In6.Cu", - "In7.Cu", - "In8.Cu", - "In9.Cu", - "In10.Cu", - "In11.Cu", - "In12.Cu", - "In13.Cu", - "In14.Cu", - "In15.Cu", - "In16.Cu", - "In17.Cu", - "In18.Cu", - "In19.Cu", - "In20.Cu", - "In21.Cu", - "In22.Cu", - "In23.Cu", - "In24.Cu", - "In25.Cu", - "In26.Cu", - "In27.Cu", - "In28.Cu", - "In29.Cu", - "In30.Cu", - "B.Cu", - "F.SilkS", - "B.SilkS", - "F.Mask", - "B.Mask", - "Edge.Cuts" - ], - "layers_include_on_all": [], - "layers_include_on_all_set": false, - "layers_to_include_on_all_layers": [], - "output_filename": "./Gerbers", - "plot_drawing_sheet": false, - "plot_footprint_values": true, - "plot_invisible_text": false, - "plot_pad_numbers": false, - "plot_ref_des": true, - "precision": 5, - "subtract_solder_mask_from_silk": false, - "use_drill_origin": false, - "use_protel_file_extension": true, - "use_x2_format": true - }, - "type": "pcb_export_gerbers" - }, - { - "description": "", - "id": "e52eb7c5-eee6-47b7-8fff-9789c9bf86c1", - "settings": { - "description": "", - "drill_origin": "abs", - "excellon.combine_pth_npth": true, - "excellon.minimal_header": false, - "excellon.mirror_y": false, - "excellon.oval_drill_route": false, - "format": "excellon", - "generate_map": false, - "gerber_precision": 5, - "map_format": "pdf", - "output_dir": "./Gerbers", - "units": "in", - "zero_format": "decimal" - }, - "type": "pcb_export_drill" - }, - { - "description": "", - "id": "e9e82056-af01-41da-9be6-493274655146", - "settings": { - "description": "", - "fail_on_error": false, - "format": "report", - "output_filename": "./erc.txt", - "severity": 48, - "units": "mm" - }, - "type": "sch_erc" - }, - { - "description": "", - "id": "4e2df5ee-a7a9-49dd-a3b5-c1c2cc44011d", - "settings": { - "description": "", - "fail_on_error": false, - "format": "report", - "output_filename": "./drc.txt", - "parity": true, - "report_all_track_errors": false, - "severity": 48, - "units": "mm" - }, - "type": "pcb_drc" - }, - { - "description": "", - "id": "0dfbbdd3-c356-41e7-bbe0-64a594f23695", - "settings": { - "bg_style": "default", - "description": "", - "floor": true, - "format": "png", - "height": 1440, - "light_bottom_intensity": [ - 0.0, - 0.0, - 0.0 - ], - "light_camera_intensity": [ - 0.0, - 0.0, - 0.0 - ], - "light_side_elevation": 60, - "light_side_intensity": [ - 0.5, - 0.5, - 0.5 - ], - "light_top_intensity": [ - 0.0, - 0.0, - 0.0 - ], - "output_filename": "top.png", - "pan_x": 0.0, - "pan_y": 0.0, - "pan_z": 0.0, - "perspective": false, - "pivot_x": 0.0, - "pivot_y": 0.0, - "pivot_z": 0.0, - "quality": "basic", - "rotation_x": 0.0, - "rotation_y": 0.0, - "rotation_z": 0.0, - "side": "top", - "width": 3440, - "zoom": 1.0 - }, - "type": "pcb_render" - }, - { - "description": "", - "id": "e61afc46-d22c-40d5-931a-b6f7ec98b4c2", - "settings": { - "bg_style": "default", - "description": "", - "floor": true, - "format": "png", - "height": 1440, - "light_bottom_intensity": [ - 0.0, - 0.0, - 0.0 - ], - "light_camera_intensity": [ - 0.0, - 0.0, - 0.0 - ], - "light_side_elevation": 60, - "light_side_intensity": [ - 0.5, - 0.5, - 0.5 - ], - "light_top_intensity": [ - 0.0, - 0.0, - 0.0 - ], - "output_filename": "bottom.png", - "pan_x": 0.0, - "pan_y": 0.0, - "pan_z": 0.0, - "perspective": false, - "pivot_x": 0.0, - "pivot_y": 0.0, - "pivot_z": 0.0, - "quality": "basic", - "rotation_x": 0.0, - "rotation_y": 0.0, - "rotation_z": 0.0, - "side": "bottom", - "width": 3440, - "zoom": 1.0 - }, - "type": "pcb_render" - } - ], - "meta": { - "version": 1 - }, - "outputs": [ - { - "description": "Production files", - "id": "aeb40242-edfd-4f73-854b-b9cc9a052a15", - "only": [ - "eee5477e-0834-44e9-aeb5-bc5e5b05fd69", - "e52eb7c5-eee6-47b7-8fff-9789c9bf86c1" - ], - "settings": { - "format": "zip", - "output_path": "ayab-shield-gerbers.zip" - }, - "type": "archive" - }, - { - "description": "Reference files", - "id": "faf786cb-df2f-40b8-96a2-4a7fc03f48f1", - "only": [ - "10369bcf-37aa-4b24-9993-fdc451ea5f15", - "40718fbd-4af7-44ae-8d4e-1ea7c2cce5f6", - "0dfbbdd3-c356-41e7-bbe0-64a594f23695", - "e61afc46-d22c-40d5-931a-b6f7ec98b4c2" - ], - "settings": { - "output_path": "./Reference" - }, - "type": "folder" - } - ] -} diff --git a/scripts/dependencies.sh b/scripts/dependencies.sh index 9a41229..6c73810 100755 --- a/scripts/dependencies.sh +++ b/scripts/dependencies.sh @@ -4,8 +4,9 @@ set -v DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -sudo add-apt-repository --yes ppa:kicad/kicad-8.0-releases +sudo add-apt-repository --yes ppa:kicad/kicad-9.0-releases sudo apt-get update -qq sudo DEBIAN_FRONTEND=noninteractive apt install --install-recommends kicad kicad-packages3d- kicad-demos- +sudo DEBIAN_FRONTEND=noninteractive apt install python3 pip ghostscript sudo python3 -m pip install pandas \ No newline at end of file diff --git a/scripts/jlc_bom_formatter.py b/scripts/jlc_bom_formatter.py index ccf89f5..b5cf62e 100644 --- a/scripts/jlc_bom_formatter.py +++ b/scripts/jlc_bom_formatter.py @@ -14,7 +14,17 @@ def footprintFix(fpName): bom_file = pd.read_csv(sys.argv[1]) -bom_file.columns = ['Designator', 'Value', 'Footprint', 'JLCPCB Part #'] +#Number of columns - ideally this is more unified but I don't want to modify the formatter and the design files in the same PR. +bom_format = bom_file.shape[1] + +match bom_format: + case 4: + bom_file.columns = ['Designator', 'Value', 'Footprint', 'JLCPCB Part #'] + case 5: + bom_file.columns = ['Designator', 'Value', 'Footprint', 'Mfg', 'Mfg P/N'] + case 6: + bom_file.columns = ['Designator', 'Value', 'Footprint', 'Mfg', 'Mfg P/N', 'JLCPCB Part #'] + bom_file['Footprint'] = bom_file['Footprint'].apply(lambda x: footprintFix(x)) bom_file.to_csv(sys.argv[2], index=False) diff --git a/scripts/jlc_cpl_formatter.py b/scripts/jlc_cpl_formatter.py index ab3cb60..d654816 100644 --- a/scripts/jlc_cpl_formatter.py +++ b/scripts/jlc_cpl_formatter.py @@ -1,11 +1,23 @@ import pandas as pd import os, sys, csv -cpl_file = pd.read_csv(sys.argv[1]) +def reduce_layer(layername): + if 'top' in layername: + return 'T' + elif 'bottom' in layername: + return 'B' + else: + return '' -cpl_file.columns = ['Designator', 'Val', 'Package', 'Mid X', 'Mid Y', 'Rotation', 'Layer'] -cpl_file = cpl_file.reindex(columns=['Designator', 'Mid X', 'Mid Y', 'Layer', 'Rotation']) -cpl_file.drop([0,1,2,3,4,5]) -cpl_file['Layer'] = "T" +if __name__ == "__main__": + cpl_file = pd.read_csv(sys.argv[1],skipfooter=1,engine='python') + + # Assign names and sort rows to match JLC format + cpl_file.columns = ['Designator', 'Val', 'Package', 'Mid X', 'Mid Y', 'Rotation', 'Layer'] + cpl_file = cpl_file.reindex(columns=['Designator', 'Mid X', 'Mid Y', 'Layer', 'Rotation']) -cpl_file.to_csv(sys.argv[2], index=False) + # Change top/bottom to T/B + cpl_file['Layer'] = cpl_file['Layer'].apply(reduce_layer) + + # Write file to disk + cpl_file.to_csv(sys.argv[2], index=False) \ No newline at end of file