add KF141 spring loaded connector, with generator script

This commit is contained in:
King Kévin 2021-06-01 19:12:21 +02:00
parent 6d9361c1da
commit 5e324b6c39
4 changed files with 590 additions and 0 deletions

48
connector/kf141r-2.54.rb Executable file
View File

@ -0,0 +1,48 @@
#!/usr/bin/env ruby
# encoding: utf-8
# ruby: 3.0.1
# number of possible pins
variations = (2..12).to_a
puts "name: KF141R-2.54"
puts "description: spring loaded terminal, with lever, 0.1 in/2.54 mm pitch"
puts "variations: " + variations.collect{|p| p.to_s+"P"}*", "
puts "datasheet: https://datasheet.lcsc.com/lcsc/2001151504_Cixi-Kefa-Elec-KF141R-2-54-10P_C475132.pdf"
puts ""
variations.each do |v|
puts "pinout@#{v}P: 1-#{v}"
puts ""
puts "schematic@#{v}P:"
puts " suffix: -#{v}P"
puts " symbol: connector"
puts " left: 1-#{v}"
puts ""
puts "housing@#{v}P:"
puts " pattern: custom"
puts " options: polarized"
puts " height: 13.0"
puts " pitch: 2.54"
puts " leadHeight: 3.50"
puts " leadWidth: 0.70"
puts " leadLength: 0.50"
puts " holeDiameter: 1.2"
puts " columnCount: 1"
puts " rowCount: #{v}"
puts " bodyWidth: 13.80"
puts " bodyLength: #{(2.54 * v + 2.54).round(2)}"
#puts " bodyPosition: 0, 0.95" # alternative is to center on the pins section only
puts " numbers: " + (v.times.collect {|i| [i + 1]*2}.flatten * ", ")
print " padPosition: "
positions = []
v.times do |i|
positions << [13.80/2 - 2.85 - 5.08, (2.54 * v + 2.54) / -2 + 0.95 + i * 2.54]
positions << [13.80/2 - 2.85, (2.54 * v + 2.54) / -2 + 0.95 + i * 2.54]
end
positions.flatten!
positions.collect!{|p| p.round(3)}
print positions * ", "
puts ""
end

247
connector/kf141r-2.54.yaml Normal file
View File

@ -0,0 +1,247 @@
name: KF141R-2.54
description: spring loaded terminal, with lever, 0.1 in/2.54 mm pitch
variations: 2P, 3P, 4P, 5P, 6P, 7P, 8P, 9P, 10P, 11P, 12P
datasheet: https://datasheet.lcsc.com/lcsc/2001151504_Cixi-Kefa-Elec-KF141R-2-54-10P_C475132.pdf
pinout@2P: 1-2
schematic@2P:
suffix: -2P
symbol: connector
left: 1-2
housing@2P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 2
bodyWidth: 13.80
bodyLength: 7.62
numbers: 1, 1, 2, 2
padPosition: -1.03, -2.86, 4.05, -2.86, -1.03, -0.32, 4.05, -0.32
pinout@3P: 1-3
schematic@3P:
suffix: -3P
symbol: connector
left: 1-3
housing@3P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 3
bodyWidth: 13.80
bodyLength: 10.16
numbers: 1, 1, 2, 2, 3, 3
padPosition: -1.03, -4.13, 4.05, -4.13, -1.03, -1.59, 4.05, -1.59, -1.03, 0.95, 4.05, 0.95
pinout@4P: 1-4
schematic@4P:
suffix: -4P
symbol: connector
left: 1-4
housing@4P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 4
bodyWidth: 13.80
bodyLength: 12.7
numbers: 1, 1, 2, 2, 3, 3, 4, 4
padPosition: -1.03, -5.4, 4.05, -5.4, -1.03, -2.86, 4.05, -2.86, -1.03, -0.32, 4.05, -0.32, -1.03, 2.22, 4.05, 2.22
pinout@5P: 1-5
schematic@5P:
suffix: -5P
symbol: connector
left: 1-5
housing@5P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 5
bodyWidth: 13.80
bodyLength: 15.24
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5
padPosition: -1.03, -6.67, 4.05, -6.67, -1.03, -4.13, 4.05, -4.13, -1.03, -1.59, 4.05, -1.59, -1.03, 0.95, 4.05, 0.95, -1.03, 3.49, 4.05, 3.49
pinout@6P: 1-6
schematic@6P:
suffix: -6P
symbol: connector
left: 1-6
housing@6P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 6
bodyWidth: 13.80
bodyLength: 17.78
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
padPosition: -1.03, -7.94, 4.05, -7.94, -1.03, -5.4, 4.05, -5.4, -1.03, -2.86, 4.05, -2.86, -1.03, -0.32, 4.05, -0.32, -1.03, 2.22, 4.05, 2.22, -1.03, 4.76, 4.05, 4.76
pinout@7P: 1-7
schematic@7P:
suffix: -7P
symbol: connector
left: 1-7
housing@7P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 7
bodyWidth: 13.80
bodyLength: 20.32
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
padPosition: -1.03, -9.21, 4.05, -9.21, -1.03, -6.67, 4.05, -6.67, -1.03, -4.13, 4.05, -4.13, -1.03, -1.59, 4.05, -1.59, -1.03, 0.95, 4.05, 0.95, -1.03, 3.49, 4.05, 3.49, -1.03, 6.03, 4.05, 6.03
pinout@8P: 1-8
schematic@8P:
suffix: -8P
symbol: connector
left: 1-8
housing@8P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 8
bodyWidth: 13.80
bodyLength: 22.86
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8
padPosition: -1.03, -10.48, 4.05, -10.48, -1.03, -7.94, 4.05, -7.94, -1.03, -5.4, 4.05, -5.4, -1.03, -2.86, 4.05, -2.86, -1.03, -0.32, 4.05, -0.32, -1.03, 2.22, 4.05, 2.22, -1.03, 4.76, 4.05, 4.76, -1.03, 7.3, 4.05, 7.3
pinout@9P: 1-9
schematic@9P:
suffix: -9P
symbol: connector
left: 1-9
housing@9P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 9
bodyWidth: 13.80
bodyLength: 25.4
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9
padPosition: -1.03, -11.75, 4.05, -11.75, -1.03, -9.21, 4.05, -9.21, -1.03, -6.67, 4.05, -6.67, -1.03, -4.13, 4.05, -4.13, -1.03, -1.59, 4.05, -1.59, -1.03, 0.95, 4.05, 0.95, -1.03, 3.49, 4.05, 3.49, -1.03, 6.03, 4.05, 6.03, -1.03, 8.57, 4.05, 8.57
pinout@10P: 1-10
schematic@10P:
suffix: -10P
symbol: connector
left: 1-10
housing@10P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 10
bodyWidth: 13.80
bodyLength: 27.94
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10
padPosition: -1.03, -13.02, 4.05, -13.02, -1.03, -10.48, 4.05, -10.48, -1.03, -7.94, 4.05, -7.94, -1.03, -5.4, 4.05, -5.4, -1.03, -2.86, 4.05, -2.86, -1.03, -0.32, 4.05, -0.32, -1.03, 2.22, 4.05, 2.22, -1.03, 4.76, 4.05, 4.76, -1.03, 7.3, 4.05, 7.3, -1.03, 9.84, 4.05, 9.84
pinout@11P: 1-11
schematic@11P:
suffix: -11P
symbol: connector
left: 1-11
housing@11P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 11
bodyWidth: 13.80
bodyLength: 30.48
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11
padPosition: -1.03, -14.29, 4.05, -14.29, -1.03, -11.75, 4.05, -11.75, -1.03, -9.21, 4.05, -9.21, -1.03, -6.67, 4.05, -6.67, -1.03, -4.13, 4.05, -4.13, -1.03, -1.59, 4.05, -1.59, -1.03, 0.95, 4.05, 0.95, -1.03, 3.49, 4.05, 3.49, -1.03, 6.03, 4.05, 6.03, -1.03, 8.57, 4.05, 8.57, -1.03, 11.11, 4.05, 11.11
pinout@12P: 1-12
schematic@12P:
suffix: -12P
symbol: connector
left: 1-12
housing@12P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 12
bodyWidth: 13.80
bodyLength: 33.02
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12
padPosition: -1.03, -15.56, 4.05, -15.56, -1.03, -13.02, 4.05, -13.02, -1.03, -10.48, 4.05, -10.48, -1.03, -7.94, 4.05, -7.94, -1.03, -5.4, 4.05, -5.4, -1.03, -2.86, 4.05, -2.86, -1.03, -0.32, 4.05, -0.32, -1.03, 2.22, 4.05, 2.22, -1.03, 4.76, 4.05, 4.76, -1.03, 7.3, 4.05, 7.3, -1.03, 9.84, 4.05, 9.84, -1.03, 12.38, 4.05, 12.38

48
connector/kf141v-2.54.rb Executable file
View File

@ -0,0 +1,48 @@
#!/usr/bin/env ruby
# encoding: utf-8
# ruby: 3.0.1
# number of possible pins
variations = (2..12).to_a
puts "name: KF141V-2.54"
puts "description: spring loaded terminal, with lever, 0.1 in/2.54 mm pitch, vertical insertion"
puts "variations: " + variations.collect{|p| p.to_s+"P"}*", "
puts "datasheet: https://datasheet.lcsc.com/lcsc/2001151504_Cixi-Kefa-Elec-KF141V-2-54-10P_C475122.pdf"
puts ""
variations.each do |v|
puts "pinout@#{v}P: 1-#{v}"
puts ""
puts "schematic@#{v}P:"
puts " suffix: -#{v}P"
puts " symbol: connector"
puts " left: 1-#{v}"
puts ""
puts "housing@#{v}P:"
puts " pattern: custom"
puts " options: polarized"
puts " height: 13.0"
puts " pitch: 2.54"
puts " leadHeight: 3.50"
puts " leadWidth: 0.70"
puts " leadLength: 0.50"
puts " holeDiameter: 1.2"
puts " columnCount: 1"
puts " rowCount: #{v}"
puts " bodyWidth: 12.70"
puts " bodyLength: #{(2.54 * v + 2.54).round(2)}"
#puts " bodyPosition: 0, 1.0" # alternative is to center on the pins section only
puts " numbers: " + (v.times.collect {|i| [i + 1]*2}.flatten * ", ")
print " padPosition: "
positions = []
v.times do |i|
positions << [12.70/2 - 3.00 - 5.08, (2.54 * v + 2.54) / -2 + 1.0 + i * 2.54]
positions << [12.70/2 - 3.00, (2.54 * v + 2.54) / -2 + 1.0 + i * 2.54]
end
positions.flatten!
positions.collect!{|p| p.round(3)}
print positions * ", "
puts ""
end

247
connector/kf141v-2.54.yaml Normal file
View File

@ -0,0 +1,247 @@
name: KF141V-2.54
description: spring loaded terminal, with lever, 0.1 in/2.54 mm pitch, vertical insertion
variations: 2P, 3P, 4P, 5P, 6P, 7P, 8P, 9P, 10P, 11P, 12P
datasheet: https://datasheet.lcsc.com/lcsc/2001151504_Cixi-Kefa-Elec-KF141V-2-54-10P_C475122.pdf
pinout@2P: 1-2
schematic@2P:
suffix: -2P
symbol: connector
left: 1-2
housing@2P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 2
bodyWidth: 12.70
bodyLength: 7.62
numbers: 1, 1, 2, 2
padPosition: -1.73, -2.81, 3.35, -2.81, -1.73, -0.27, 3.35, -0.27
pinout@3P: 1-3
schematic@3P:
suffix: -3P
symbol: connector
left: 1-3
housing@3P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 3
bodyWidth: 12.70
bodyLength: 10.16
numbers: 1, 1, 2, 2, 3, 3
padPosition: -1.73, -4.08, 3.35, -4.08, -1.73, -1.54, 3.35, -1.54, -1.73, 1.0, 3.35, 1.0
pinout@4P: 1-4
schematic@4P:
suffix: -4P
symbol: connector
left: 1-4
housing@4P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 4
bodyWidth: 12.70
bodyLength: 12.7
numbers: 1, 1, 2, 2, 3, 3, 4, 4
padPosition: -1.73, -5.35, 3.35, -5.35, -1.73, -2.81, 3.35, -2.81, -1.73, -0.27, 3.35, -0.27, -1.73, 2.27, 3.35, 2.27
pinout@5P: 1-5
schematic@5P:
suffix: -5P
symbol: connector
left: 1-5
housing@5P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 5
bodyWidth: 12.70
bodyLength: 15.24
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5
padPosition: -1.73, -6.62, 3.35, -6.62, -1.73, -4.08, 3.35, -4.08, -1.73, -1.54, 3.35, -1.54, -1.73, 1.0, 3.35, 1.0, -1.73, 3.54, 3.35, 3.54
pinout@6P: 1-6
schematic@6P:
suffix: -6P
symbol: connector
left: 1-6
housing@6P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 6
bodyWidth: 12.70
bodyLength: 17.78
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
padPosition: -1.73, -7.89, 3.35, -7.89, -1.73, -5.35, 3.35, -5.35, -1.73, -2.81, 3.35, -2.81, -1.73, -0.27, 3.35, -0.27, -1.73, 2.27, 3.35, 2.27, -1.73, 4.81, 3.35, 4.81
pinout@7P: 1-7
schematic@7P:
suffix: -7P
symbol: connector
left: 1-7
housing@7P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 7
bodyWidth: 12.70
bodyLength: 20.32
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
padPosition: -1.73, -9.16, 3.35, -9.16, -1.73, -6.62, 3.35, -6.62, -1.73, -4.08, 3.35, -4.08, -1.73, -1.54, 3.35, -1.54, -1.73, 1.0, 3.35, 1.0, -1.73, 3.54, 3.35, 3.54, -1.73, 6.08, 3.35, 6.08
pinout@8P: 1-8
schematic@8P:
suffix: -8P
symbol: connector
left: 1-8
housing@8P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 8
bodyWidth: 12.70
bodyLength: 22.86
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8
padPosition: -1.73, -10.43, 3.35, -10.43, -1.73, -7.89, 3.35, -7.89, -1.73, -5.35, 3.35, -5.35, -1.73, -2.81, 3.35, -2.81, -1.73, -0.27, 3.35, -0.27, -1.73, 2.27, 3.35, 2.27, -1.73, 4.81, 3.35, 4.81, -1.73, 7.35, 3.35, 7.35
pinout@9P: 1-9
schematic@9P:
suffix: -9P
symbol: connector
left: 1-9
housing@9P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 9
bodyWidth: 12.70
bodyLength: 25.4
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9
padPosition: -1.73, -11.7, 3.35, -11.7, -1.73, -9.16, 3.35, -9.16, -1.73, -6.62, 3.35, -6.62, -1.73, -4.08, 3.35, -4.08, -1.73, -1.54, 3.35, -1.54, -1.73, 1.0, 3.35, 1.0, -1.73, 3.54, 3.35, 3.54, -1.73, 6.08, 3.35, 6.08, -1.73, 8.62, 3.35, 8.62
pinout@10P: 1-10
schematic@10P:
suffix: -10P
symbol: connector
left: 1-10
housing@10P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 10
bodyWidth: 12.70
bodyLength: 27.94
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10
padPosition: -1.73, -12.97, 3.35, -12.97, -1.73, -10.43, 3.35, -10.43, -1.73, -7.89, 3.35, -7.89, -1.73, -5.35, 3.35, -5.35, -1.73, -2.81, 3.35, -2.81, -1.73, -0.27, 3.35, -0.27, -1.73, 2.27, 3.35, 2.27, -1.73, 4.81, 3.35, 4.81, -1.73, 7.35, 3.35, 7.35, -1.73, 9.89, 3.35, 9.89
pinout@11P: 1-11
schematic@11P:
suffix: -11P
symbol: connector
left: 1-11
housing@11P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 11
bodyWidth: 12.70
bodyLength: 30.48
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11
padPosition: -1.73, -14.24, 3.35, -14.24, -1.73, -11.7, 3.35, -11.7, -1.73, -9.16, 3.35, -9.16, -1.73, -6.62, 3.35, -6.62, -1.73, -4.08, 3.35, -4.08, -1.73, -1.54, 3.35, -1.54, -1.73, 1.0, 3.35, 1.0, -1.73, 3.54, 3.35, 3.54, -1.73, 6.08, 3.35, 6.08, -1.73, 8.62, 3.35, 8.62, -1.73, 11.16, 3.35, 11.16
pinout@12P: 1-12
schematic@12P:
suffix: -12P
symbol: connector
left: 1-12
housing@12P:
pattern: custom
options: polarized
height: 13.0
pitch: 2.54
leadHeight: 3.50
leadWidth: 0.70
leadLength: 0.50
holeDiameter: 1.2
columnCount: 1
rowCount: 12
bodyWidth: 12.70
bodyLength: 33.02
numbers: 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12
padPosition: -1.73, -15.51, 3.35, -15.51, -1.73, -12.97, 3.35, -12.97, -1.73, -10.43, 3.35, -10.43, -1.73, -7.89, 3.35, -7.89, -1.73, -5.35, 3.35, -5.35, -1.73, -2.81, 3.35, -2.81, -1.73, -0.27, 3.35, -0.27, -1.73, 2.27, 3.35, 2.27, -1.73, 4.81, 3.35, 4.81, -1.73, 7.35, 3.35, 7.35, -1.73, 9.89, 3.35, 9.89, -1.73, 12.43, 3.35, 12.43