-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
702374d
commit 6bed8fc
Showing
12 changed files
with
936 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: build-pcb | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
build-pcb: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
- name: Checkout LFS objects | ||
run: git lfs checkout | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
poetry --version | ||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Create mechanical files | ||
run: poetry run make pcb-mech | ||
|
||
- name: Build PCBs | ||
# TODO docker image expects atopile project to be at root of project | ||
uses: docker://ghcr.io/atopile/atopile-kicad | ||
|
||
- name: Upload PCB artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pcb-build | ||
path: pcb/build/ | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
.mypy_cache | ||
.pytest_cache | ||
.venv | ||
.vscode/ | ||
/_build | ||
/dist | ||
/docs/_build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# For PCBs designed using KiCad: https://www.kicad.org/ | ||
# Format documentation: https://kicad.org/help/file-formats/ | ||
|
||
# Temporary files | ||
*.000 | ||
*.bak | ||
*.bck | ||
*.kicad_pcb-bak | ||
*.kicad_sch-bak | ||
*-backups | ||
*.kicad_prl | ||
*.sch-bak | ||
*~ | ||
_autosave-* | ||
*.tmp | ||
*-save.pro | ||
*-save.kicad_pcb | ||
*.kicad_pcb.lck | ||
fp-info-cache | ||
|
||
# Netlist files (exported from Eeschema) | ||
*.net | ||
|
||
# Autorouter files (exported from Pcbnew) | ||
*.dsn | ||
*.ses | ||
|
||
# Exported BOM files | ||
*.xml | ||
*.csv | ||
|
||
build/ | ||
|
||
# .ato directory | ||
.ato/ | ||
|
||
# Mechanical files built from source | ||
mech/** | ||
!mech/README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ato-version: ^0.2.0 | ||
builds: | ||
default: | ||
entry: elec/src/rpi_hat.ato:RpiHat | ||
dependencies: | ||
- generics | ||
- rpi-header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
component CAT24C32WI_GT3: | ||
# component CAT24C32WI-GT3 | ||
footprint = "SOIC-8_L5.0-W4.0-P1.27-LS6.0-BL" | ||
lcsc_id = "C81193" | ||
mpn = "C81193" | ||
# pins | ||
signal A0 ~ pin 1 | ||
signal A1 ~ pin 2 | ||
signal A2 ~ pin 3 | ||
signal VSS ~ pin 4 | ||
signal SDA ~ pin 5 | ||
signal SCL ~ pin 6 | ||
signal WP ~ pin 7 | ||
signal VCC ~ pin 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
from "generics/capacitors.ato" import Capacitor | ||
# from "generics/connectors.ato" import Header2Pin # TODO: ImportNotFoundError | ||
from "generics/interfaces.ato" import I2C # TODO: is this needed? | ||
from "generics/resistors.ato" import I2CPullup, Resistor | ||
|
||
from "rpi-header/elec/src/rpi.ato" import ConnectorRaspberryPi | ||
|
||
from "elec/src/components/CAT24C32WI-GT3.ato" import CAT24C32WI_GT3 | ||
|
||
|
||
module RpiHat: | ||
""" | ||
Raspberry Pi HAT | ||
|
||
Conforming with the HAT+ specification dated 2023-12-20. | ||
|
||
Raspberry Pi HAT EEPROM circuit diagram | ||
https://github.com/raspberrypi/hats/blob/5f2058bf8eebf43dd19d7218f1e38d14a9835231/eeprom-circuit.png | ||
""" | ||
signal gnd | ||
|
||
i2c = new I2C # TODO: is this needed? | ||
|
||
# EEPROM write protect pull-down header | ||
# eeprom_wp_header = new Header2Pin # TODO: import Header2Pin results in ImportNotFoundError | ||
# eeprom_wp_header.p2 ~ gnd | ||
|
||
# EEPROM write protect pull-up resistor | ||
eeprom_wp_pullup = new Resistor | ||
eeprom_wp_pullup.value = 1kohm +/- 5% | ||
eeprom_wp_pullup.footprint = "R0402" | ||
|
||
# EEPROM decoupling capacitor | ||
eeprom_capacitor = new Capacitor | ||
eeprom_capacitor.value = 100nF +/- 20% | ||
eeprom_capacitor.footprint = "C0402" | ||
|
||
# I2C pull-up resistors | ||
i2c_pullup = new I2CPullup | ||
i2c_pullup.r_sda.value = 3.9kohm +/- 20% | ||
i2c_pullup.r_scl.value = 3.9kohm +/- 20% | ||
|
||
# EEPROM | ||
eeprom = new CAT24C32WI_GT3 | ||
eeprom.VSS ~ gnd | ||
eeprom.A0 ~ gnd | ||
eeprom.A1 ~ gnd | ||
eeprom.A2 ~ gnd | ||
|
||
# Raspberry Pi GPIO stacking header | ||
rpi_header = new ConnectorRaspberryPi | ||
rpi_header.gnd ~ gnd | ||
rpi_header.i2c.scl ~ eeprom.SCL # TODO: should be rpi_header.GPIO1 (not available in ConnectorRaspberryPi) | ||
rpi_header.i2c.sda ~ eeprom.SDA # TODO: should be rpi_header.GPIO0 (not available in ConnectorRaspberryPi) | ||
rpi_header.power3v3.vcc ~ eeprom.VCC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
============================ | ||
Atopile mechanical directory | ||
============================ | ||
|
||
Files for this directory can be generated with: | ||
|
||
``` | ||
make pcb-mech | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Designator,Value,Package,Mid X,Mid Y,Rotation,Layer |
Oops, something went wrong.