Browse Source

cleanup pcb

Thomas Buck 9 months ago
parent
commit
5bbf2e0ca2
5 changed files with 151 additions and 14 deletions
  1. 3
    0
      .gitignore
  2. 8
    2
      pcb/drumkit.kicad_pcb
  3. 6
    12
      pcb/drumkit.kicad_sch
  4. 55
    0
      pcb/generate_fab.sh
  5. 79
    0
      pcb/generate_plot.sh

+ 3
- 0
.gitignore View File

@@ -2,3 +2,6 @@ build
2 2
 .directory
3 3
 .DS_Store
4 4
 pcb/drumkit-backups
5
+pcb/plot
6
+pcb/fabrication
7
+pcb/fab.zip

+ 8
- 2
pcb/drumkit.kicad_pcb View File

@@ -5,6 +5,12 @@
5 5
   )
6 6
 
7 7
   (paper "A4")
8
+  (title_block
9
+    (title "Drumkit")
10
+    (date "2024-03-25")
11
+    (rev "1")
12
+  )
13
+
8 14
   (layers
9 15
     (0 "F.Cu" signal)
10 16
     (31 "B.Cu" signal)
@@ -1857,12 +1863,12 @@
1857 1863
     (stroke (width 0.2) (type default)) (fill none) (layer "B.Cu") (tstamp 5ba1d609-5eb5-4b81-9241-5d87d4738412))
1858 1864
   (gr_circle (center 201.93 20.32) (end 203.2 20.32)
1859 1865
     (stroke (width 0.2) (type default)) (fill none) (layer "B.Cu") (tstamp 6c32a74d-8481-4a80-a8d3-f5ade0af6e43))
1860
-  (gr_rect (start 85.09 18.415) (end 203.835 109.22)
1861
-    (stroke (width 0.2) (type default)) (fill none) (layer "B.Cu") (tstamp 79fec591-dd4d-4392-b885-91c11a70f04c))
1862 1866
   (gr_circle (center 201.93 107.315) (end 203.2 106.68)
1863 1867
     (stroke (width 0.2) (type default)) (fill none) (layer "B.Cu") (tstamp 9e16f910-e70f-4590-b3c9-71ed3f00d578))
1864 1868
   (gr_circle (center 86.995 20.32) (end 88.265 20.32)
1865 1869
     (stroke (width 0.2) (type default)) (fill none) (layer "B.Cu") (tstamp dcb896e3-c91a-467f-82c0-e31761a2f45c))
1870
+  (gr_rect (start 85.09 18.415) (end 203.835 109.22)
1871
+    (stroke (width 0.2) (type default)) (fill none) (layer "Edge.Cuts") (tstamp 79fec591-dd4d-4392-b885-91c11a70f04c))
1866 1872
 
1867 1873
   (segment (start 139.065 90.805) (end 142.875 94.615) (width 1) (layer "B.Cu") (net 1) (tstamp d3fec01e-51b7-48bd-a358-0153682a36a7))
1868 1874
   (segment (start 133.35 90.805) (end 139.065 90.805) (width 1) (layer "B.Cu") (net 1) (tstamp dcd90705-bd9c-42f6-87f5-6ba8618a2960))

+ 6
- 12
pcb/drumkit.kicad_sch View File

@@ -4,6 +4,12 @@
4 4
 
5 5
   (paper "A4")
6 6
 
7
+  (title_block
8
+    (title "Drumkit")
9
+    (date "2024-03-25")
10
+    (rev "1")
11
+  )
12
+
7 13
   (lib_symbols
8 14
     (symbol "Connector:Conn_01x04_Female" (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
9 15
       (property "Reference" "J" (at 0 5.08 0)
@@ -1114,10 +1120,6 @@
1114 1120
     (stroke (width 0) (type default))
1115 1121
     (uuid 0fb4ec2d-8cc6-4c40-91f3-ca7d4ee1ecd2)
1116 1122
   )
1117
-  (wire (pts (xy 54.61 38.1) (xy 54.61 78.74))
1118
-    (stroke (width 0) (type default))
1119
-    (uuid 0fd88b82-73bc-47a1-b27d-ceed806130f2)
1120
-  )
1121 1123
   (wire (pts (xy 30.48 127) (xy 27.94 127))
1122 1124
     (stroke (width 0) (type default))
1123 1125
     (uuid 119848d1-52f8-4e7c-9e64-5a7eff48e65f)
@@ -1174,10 +1176,6 @@
1174 1176
     (stroke (width 0) (type default))
1175 1177
     (uuid 2a2b7943-ba73-4eec-9045-d64e67436a5a)
1176 1178
   )
1177
-  (wire (pts (xy 57.15 76.2) (xy 57.15 40.64))
1178
-    (stroke (width 0) (type default))
1179
-    (uuid 34b57771-738c-4259-acb3-ebe1b780162e)
1180
-  )
1181 1179
   (wire (pts (xy 81.28 68.58) (xy 90.17 68.58))
1182 1180
     (stroke (width 0) (type default))
1183 1181
     (uuid 35f7d663-5910-4ebf-a0e1-08f7034d6023)
@@ -1510,10 +1508,6 @@
1510 1508
     (stroke (width 0) (type default))
1511 1509
     (uuid dee665e0-2d2e-42a9-a2b0-d88eac014d81)
1512 1510
   )
1513
-  (wire (pts (xy 59.69 73.66) (xy 59.69 43.18))
1514
-    (stroke (width 0) (type default))
1515
-    (uuid df8f4860-da5d-45b7-8952-2acfad6abb5e)
1516
-  )
1517 1511
   (wire (pts (xy 157.48 127) (xy 162.56 127))
1518 1512
     (stroke (width 0) (type default))
1519 1513
     (uuid dfcd4520-133c-4413-85b2-6d3fca79b77f)

+ 55
- 0
pcb/generate_fab.sh View File

@@ -0,0 +1,55 @@
1
+#!/bin/bash
2
+
3
+# SPDX-FileCopyrightText: 2023 - 2024 Thomas Buck <thomas@xythobuz.de>
4
+# SPDX-License-Identifier: CERN-OHL-S-2.0+
5
+#
6
+#  ------------------------------------------------------------------------------
7
+# | Copyright (c) 2023 - 2024 Thomas Buck <thomas@xythobuz.de>                   |
8
+# |                                                                              |
9
+# | This source describes Open Hardware and is licensed under the CERN-OHL-S v2  |
10
+# | or any later version.                                                        |
11
+# |                                                                              |
12
+# | You may redistribute and modify this source and make products using it under |
13
+# | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt)          |
14
+# | or any later version.                                                        |
15
+# |                                                                              |
16
+# | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY,          |
17
+# | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A         |
18
+# | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 (or any later version)      |
19
+# | for applicable conditions.                                                   |
20
+# |                                                                              |
21
+# | Source location: https://git.xythobuz.de/thomas/drumkit                      |
22
+# |                                                                              |
23
+# | As per CERN-OHL-S v2 section 4, should You produce hardware based on this    |
24
+# | source, You must where practicable maintain the Source Location visible      |
25
+# | on the external case of the Gizmo or other products you make using this      |
26
+# | source.                                                                      |
27
+#  ------------------------------------------------------------------------------
28
+
29
+cd "$(dirname "$0")"
30
+
31
+INFILE="drumkit.kicad_pcb"
32
+INFILE_SCH="drumkit.kicad_sch"
33
+OUTDIR="fabrication"
34
+OUTZIP="fab"
35
+
36
+echo "Creating output directory"
37
+rm -rf $OUTDIR
38
+mkdir -p $OUTDIR
39
+
40
+echo "Exporting drill files"
41
+#kicad-cli pcb export drill -o $OUTDIR/ --format excellon --generate-map --map-format pdf $INFILE
42
+kicad-cli pcb export drill -o $OUTDIR/ --format gerber --generate-map --map-format gerberx2 $INFILE
43
+
44
+echo "Exporting gerber files"
45
+#kicad-cli pcb export gerbers -o $OUTDIR/ $INFILE
46
+kicad-cli pcb export gerbers -o $OUTDIR/ -l F.Cu,B.Cu,F.Mask,B.Mask,F.Paste,B.Paste,F.Silkscreen,B.Silkscreen,Edge.Cuts $INFILE
47
+
48
+echo "Exporting BOM files"
49
+kicad-cli sch export python-bom -o $OUTDIR/bom.xml $INFILE_SCH
50
+
51
+# TODO convert BOM XML to proper format for JLCPCB
52
+
53
+echo "Compressing archive"
54
+rm -rf $OUTZIP.zip
55
+zip -r $OUTZIP fabrication

+ 79
- 0
pcb/generate_plot.sh View File

@@ -0,0 +1,79 @@
1
+#!/bin/bash
2
+
3
+# SPDX-FileCopyrightText: 2023 - 2024 Thomas Buck <thomas@xythobuz.de>
4
+# SPDX-License-Identifier: CERN-OHL-S-2.0+
5
+#
6
+#  ------------------------------------------------------------------------------
7
+# | Copyright (c) 2023 - 2024 Thomas Buck <thomas@xythobuz.de>                   |
8
+# |                                                                              |
9
+# | This source describes Open Hardware and is licensed under the CERN-OHL-S v2  |
10
+# | or any later version.                                                        |
11
+# |                                                                              |
12
+# | You may redistribute and modify this source and make products using it under |
13
+# | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt)          |
14
+# | or any later version.                                                        |
15
+# |                                                                              |
16
+# | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY,          |
17
+# | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A         |
18
+# | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 (or any later version)      |
19
+# | for applicable conditions.                                                   |
20
+# |                                                                              |
21
+# | Source location: https://git.xythobuz.de/thomas/drumkit                      |
22
+# |                                                                              |
23
+# | As per CERN-OHL-S v2 section 4, should You produce hardware based on this    |
24
+# | source, You must where practicable maintain the Source Location visible      |
25
+# | on the external case of the Gizmo or other products you make using this      |
26
+# | source.                                                                      |
27
+#  ------------------------------------------------------------------------------
28
+
29
+INSCH="drumkit.kicad_sch"
30
+INPCB="drumkit.kicad_pcb"
31
+OUTDIR="plot"
32
+LAYER_F="F.Cu,F.Mask,F.Paste,F.Silkscreen,Edge.Cuts,User.Drawings"
33
+LAYER_B="B.Cu,B.Mask,B.Paste,B.Silkscreen,Edge.Cuts,User.Drawings"
34
+
35
+cd "$(dirname "$0")"
36
+rm -rf $OUTDIR
37
+mkdir -p $OUTDIR
38
+
39
+#  --------------
40
+# | 2D Schematic |
41
+#  --------------
42
+
43
+for IN in $INSCH
44
+do
45
+    echo "Exporting schematic $IN"
46
+
47
+    for TYPE in pdf svg
48
+    do
49
+        echo "Exporting schematic $TYPE"
50
+        rm -rf $OUTDIR/$IN.$TYPE
51
+        kicad-cli sch export $TYPE \
52
+            -t "KiCad Default" \
53
+            -o $OUTDIR/$IN.$TYPE \
54
+            $IN
55
+        echo
56
+    done
57
+done
58
+
59
+for IN in $INPCB
60
+do
61
+    echo "Exporting board $IN"
62
+
63
+    #  -----------
64
+    # | 2D Layout |
65
+    #  -----------
66
+
67
+    for TYPE in pdf svg
68
+    do
69
+        rm -rf $OUTDIR/$IN.$TYPE
70
+
71
+        echo "Exporting board $TYPE"
72
+        kicad-cli pcb export $TYPE \
73
+            -t "KiCad Classic"  \
74
+            -l $LAYER_F,$LAYER_B \
75
+            -o $OUTDIR/$IN.$TYPE \
76
+            $IN
77
+        echo
78
+    done
79
+done

Loading…
Cancel
Save