add footprints for CUI tb003-500 5mm pitch screw terminal strips
authorBdale Garbee <bdale@gag.com>
Wed, 21 Oct 2020 23:42:32 +0000 (17:42 -0600)
committerBdale Garbee <bdale@gag.com>
Wed, 21 Oct 2020 23:42:32 +0000 (17:42 -0600)
packages/Makefile
packages/cui/Makefile [new file with mode: 0644]
packages/cui/tb003-500-Series.sh [new file with mode: 0755]
packages/cui/tb003-500.py [new file with mode: 0755]

index 245bf4b9315e8c8b6ff22bbbdc4c7bb48c648eab..ac01c52499500cfde21de0a9db382adf27630f4d 100644 (file)
@@ -1,6 +1,7 @@
 .SUFFIXES: .5c .py .fp .lht
 
 DIRS= \
+       cui \
        diodes \
        jst \
        molex \
diff --git a/packages/cui/Makefile b/packages/cui/Makefile
new file mode 100644 (file)
index 0000000..94de05a
--- /dev/null
@@ -0,0 +1,7 @@
+all:   tb003-500-02.fp
+
+tb003-500-02.fp:       tb003-500.py tb003-500-Series.sh
+       ./tb003-500-Series.sh 
+
+clean:
+       rm -f *.fp
diff --git a/packages/cui/tb003-500-Series.sh b/packages/cui/tb003-500-Series.sh
new file mode 100755 (executable)
index 0000000..193ec83
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+do
+       FILE="tb003-500-"$i
+       ./tb003-500.py $i > $FILE.fp
+done
diff --git a/packages/cui/tb003-500.py b/packages/cui/tb003-500.py
new file mode 100755 (executable)
index 0000000..834afd1
--- /dev/null
@@ -0,0 +1,87 @@
+#!/usr/bin/python3
+# Copyright 2020 by Bdale Garbee <bdale@gag.com>.  GPLv3
+#
+# Program to emit PCB footprints for CUI Devices TB003-500 terminal blocks
+#  5mm pitch, 2-24 screws, 10A per contact, 26-14 AWG wires
+#
+# Needs pin count on command line, in range of 2..24
+#
+
+# dimensions in mm
+PinDiam = 1.40
+PinSpacing = 5.00
+RowOffset = 4.00
+BoxHeight = 7.80
+BoxEnd = 2.5
+LineWidth = 600
+Thickness = 2.5
+Clearance = .32
+Mask = Thickness + 0.32
+
+import sys
+
+# 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 )
+
+pins = int(sys.argv[1])
+if pins < 2:
+       sys.stderr.write('Must be at least 2 pins\n')
+       sys.exit(1)
+if pins > 24:
+       sys.stderr.write('Must be no more than 24 pins\n')
+       sys.exit(1)
+
+print('# author: Bdale Garbee')
+print('# email: bdale@gag.com')
+print('# dist-license: GPL 3')
+print('# use-license: unlimited')
+
+print('Element[0x0 "TB003-500-%02i"' % pins,'"" "" 0 0 0 0 0 100 0x0]')
+print("(")
+for pin in range (1,pins+1):
+    pinnum = pins + 1 - pin
+    if pinnum == 1:
+        Flags = '0x0101'
+    else:
+        Flags = '0x0001'
+    print('   Pin[', \
+        mm2mils100(BoxEnd + (pin-1)*PinSpacing), \
+        mm2mils100(RowOffset), \
+        mm2mils100(Thickness), \
+        mm2mils100(Clearance), \
+        mm2mils100(Mask), \
+        mm2mils100(PinDiam), \
+        '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']')
+
+BoxWidth = (BoxEnd * 2) + ((pins - 1) * PinSpacing);
+
+print('   ElementLine[', \
+        mm2mils100(0), \
+        mm2mils100(0), \
+        mm2mils100(0), \
+        mm2mils100(BoxHeight), \
+        LineWidth, ']')
+
+print('   ElementLine[', \
+        mm2mils100(0), \
+        mm2mils100(BoxHeight), \
+        mm2mils100(BoxWidth), \
+        mm2mils100(BoxHeight), \
+        LineWidth, ']')
+
+print('   ElementLine[', \
+        mm2mils100(BoxWidth), \
+        mm2mils100(BoxHeight), \
+        mm2mils100(BoxWidth), \
+        mm2mils100(0), \
+        LineWidth, ']')
+
+print('   ElementLine[', \
+        mm2mils100(BoxWidth), \
+        mm2mils100(0), \
+        mm2mils100(0), \
+        mm2mils100(0), \
+        LineWidth, ']')
+
+print(")")