]> git.gag.com Git - hw/altusmetrum/commitdiff
add footprint for Pi Zero under QuantiMotor board
authorBdale Garbee <bdale@gag.com>
Sun, 17 Nov 2024 00:02:33 +0000 (17:02 -0700)
committerBdale Garbee <bdale@gag.com>
Sun, 17 Nov 2024 00:02:33 +0000 (17:02 -0700)
packages/.gitignore
packages/Makefile
packages/pizero.py [new file with mode: 0755]

index 45962cb4383d73e856f725381cc23499d439c388..4e2d25e5ce7cd5275775f4b3a6c935370430a1e0 100644 (file)
@@ -157,7 +157,9 @@ PDFN33.fp
 rpsma-th.fp
 NINA-W131.fp
 Omega2S.fp
+cu01sah.fp
 cu01sav.fp
 TSOT26.fp
 NRS50.fp
 ARJM11D7009ABEW2.fp
+pizero.fp
index 547d290016265ffc000d30d796b9eb4dfe8f34ff..f200c5bb552cad5ca8a085532d1c9774eae12462 100644 (file)
@@ -177,7 +177,8 @@ FOOTPRINTS= \
        cu01sav.fp \
        TSOT26.fp \
        NRS50.fp \
-       ARJM11D7009ABEW2.fp
+       ARJM11D7009ABEW2.fp \
+       pizero.fp
 
 .5c.fp:
        nickle $*.5c -o $@
diff --git a/packages/pizero.py b/packages/pizero.py
new file mode 100755 (executable)
index 0000000..a2daf34
--- /dev/null
@@ -0,0 +1,165 @@
+#!/usr/bin/python3
+# Copyright 2024 by Bdale Garbee <bdale@gag.com>.  GPLv3
+#
+# Program to emit PCB footprint for Raspberry Pi Zero 2 W.  Note that this
+# footprint is intended to be used to mount a female header on the bottom
+# of a project board, to allow mounting the Pi right-side up underneath.
+#
+# 40 pin header, 4 mounting holes, outline in silk
+
+# dimensions in mm
+PinSpacing = 2.54
+PinHole = 0.038 * 25.4
+PinCopper = 0.07 * 25.4
+
+rows = 20
+cols = 2
+
+row_off = (rows + 1)/2 * PinSpacing / 2.0 
+col_off = (cols - 1) * PinSpacing / 2.0
+
+BoardLength = 65.0
+BoardWidth = 30.0
+CornerRadius = 2.25
+
+MntOffset = 3.5
+MntDiam = 2.5
+
+# we're going to use the 1/100 of a mil fundamental unit form
+def mm2mils100( mm ):
+       return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 )
+
+print ('# author: Bdale Garbee')
+print ('# email: bdale@gag.com')
+print ('# dist-license: GPL 3')
+print ('# use-license: unlimited')
+
+print ('Element[0x0 "PiZero" "" "" 0 0 0 0 0 100 0x0]')
+print ("(")
+
+for row in range (0,rows):
+    for col in range (0,cols):
+        pin = row * cols + col
+        pinnum = pin + 1
+        if pinnum == 1:
+            Flags = '0x0101'
+        else:
+            Flags = '0x0001'
+        print ('   Pin[', \
+           mm2mils100(((rows-1)/2 - row)*PinSpacing), \
+           mm2mils100(col_off-col*PinSpacing), \
+            mm2mils100(PinCopper),
+            500,
+           mm2mils100(PinCopper) + 500,
+           mm2mils100(PinHole), \
+           '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']')
+
+print( '   Pin[',\
+        mm2mils100(BoardLength/2-MntOffset), \
+        0, \
+        mm2mils100(MntDiam * 1.75), \
+        1200, \
+        mm2mils100(MntDiam * 1.75) + 600, \
+        mm2mils100(MntDiam), \
+        '"G"', '"G"', '0x0001', ']')
+
+print( '   Pin[',\
+        mm2mils100(-BoardLength/2+MntOffset), \
+        0, \
+        mm2mils100(MntDiam * 1.75), \
+        1200, \
+        mm2mils100(MntDiam * 1.75) + 600, \
+        mm2mils100(MntDiam), \
+        '"G"', '"G"', '0x0001', ']')
+
+print( '   Pin[',\
+        mm2mils100(BoardLength/2-MntOffset), \
+        mm2mils100(BoardWidth-2*MntOffset), \
+        mm2mils100(MntDiam * 1.75), \
+        1200, \
+        mm2mils100(MntDiam * 1.75) + 600, \
+        mm2mils100(MntDiam), \
+        '"G"', '"G"', '0x0001', ']')
+
+print( '   Pin[',\
+        mm2mils100(-BoardLength/2+MntOffset), \
+        mm2mils100(BoardWidth-2*MntOffset), \
+        mm2mils100(MntDiam * 1.75), \
+        1200, \
+        mm2mils100(MntDiam * 1.75) + 600, \
+        mm2mils100(MntDiam), \
+        '"G"', '"G"', '0x0001', ']')
+
+print( '   ElementLine[',\
+        mm2mils100(-BoardLength/2+CornerRadius), \
+        mm2mils100(-MntOffset), \
+        mm2mils100(BoardLength/2-CornerRadius), \
+        mm2mils100(-MntOffset), \
+        500, \
+        ']')
+
+print( '   ElementLine[',\
+        mm2mils100(-BoardLength/2+CornerRadius), \
+        mm2mils100(BoardWidth-MntOffset), \
+        mm2mils100(BoardLength/2-CornerRadius), \
+        mm2mils100(BoardWidth-MntOffset), \
+        500, \
+        ']')
+
+print( '   ElementLine[',\
+        mm2mils100(-BoardLength/2), \
+        mm2mils100(-MntOffset+CornerRadius), \
+        mm2mils100(-BoardLength/2), \
+        mm2mils100(BoardWidth-MntOffset-CornerRadius), \
+        500, \
+        ']')
+
+print( '   ElementLine[',\
+        mm2mils100(BoardLength/2), \
+        mm2mils100(-MntOffset+CornerRadius), \
+        mm2mils100(BoardLength/2), \
+        mm2mils100(BoardWidth-MntOffset-CornerRadius), \
+        500, \
+        ']')
+
+print( '   ElementArc[',\
+        mm2mils100(-BoardLength/2+CornerRadius), \
+        mm2mils100(-MntOffset+CornerRadius), \
+        mm2mils100(CornerRadius), \
+        mm2mils100(CornerRadius), \
+       270, \
+       90, \
+        500, \
+        ']')
+
+print( '   ElementArc[',\
+        mm2mils100(BoardLength/2-CornerRadius), \
+        mm2mils100(-MntOffset+CornerRadius), \
+        mm2mils100(CornerRadius), \
+        mm2mils100(CornerRadius), \
+       180, \
+       90, \
+        500, \
+        ']')
+
+print( '   ElementArc[',\
+        mm2mils100(-BoardLength/2+CornerRadius), \
+        mm2mils100(BoardWidth-MntOffset-CornerRadius), \
+        mm2mils100(CornerRadius), \
+        mm2mils100(CornerRadius), \
+       0, \
+       90, \
+        500, \
+        ']')
+
+print( '   ElementArc[',\
+        mm2mils100(BoardLength/2-CornerRadius), \
+        mm2mils100(BoardWidth-MntOffset-CornerRadius), \
+        mm2mils100(CornerRadius), \
+        mm2mils100(CornerRadius), \
+       90, \
+       90, \
+        500, \
+        ']')
+
+print (")")