Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/ayab-esp32-design.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Hardware Design
name: AYAB ESP32 Hardware Check

on:
workflow_dispatch:

push:
branches:
- main
Expand All @@ -25,20 +27,16 @@ jobs:
- 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
70 changes: 32 additions & 38 deletions .github/workflows/ayab-esp32-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,69 @@
name: Assembly Documentation
name: AYAB ESP32 Fabrication Outputs

on:
workflow_dispatch:

pull_request:
branches:
- main
types:
- closed
paths:
- ayab-esp32/**

push:
branches:
- main
paths:
- ayab-esp32/**

env:
workflow_project_dir: ayab-esp32
kicad_project_name: ayab-esp32

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
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

- name: Export assembly documentation
- name: Export reference materials
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
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: Convert BOM & CPL to JLC format
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
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: Export mechanical files
- name: Export gerbers and assembly documentation
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
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: Add PDFs to repo
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Convert BOM & CPL to JLC format
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 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"
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: Archive artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: documentation-artifacts
path: ayab-esp32/outputs
path: Outputs/

- name: Archive artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: reference-artifacts
path: Reference/
42 changes: 42 additions & 0 deletions .github/workflows/ayab-shield-design.yml
Original file line number Diff line number Diff line change
@@ -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 & documentation build
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
69 changes: 69 additions & 0 deletions .github/workflows/ayab-shield-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: AYAB Shield Fabrication Outputs

on:
workflow_dispatch:

pull_request:
branches:
- main
paths:
- ayab-shield/**

push:
branches:
- main
paths:
- ayab-shield/**

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}

- 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: 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: Reference/
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
ayab-esp32/datasheets/*
*/Gerbers/*
*gerbers.zip
*/Outputs/*
*/DesignChecks/*
*.zip
3 changes: 2 additions & 1 deletion ayab-esp32/README.md
Original file line number Diff line number Diff line change
@@ -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.\
Expand All @@ -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)!
9 changes: 0 additions & 9 deletions ayab-esp32/board2pdf.config.ini

This file was deleted.

Binary file removed ayab-esp32/images/render.png
Binary file not shown.
Binary file removed ayab-esp32/pdf/ayab-esp32.pdf
Binary file not shown.
Binary file removed ayab-esp32/pdf/ayab-esp32__Assembly.pdf
Binary file not shown.
Loading