From 18ed84d8318543385b7db15b115dfef8fd715fb6 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 16 Sep 2013 06:45:21 -0300 Subject: [PATCH] add C&K JS102011SAQN SPDT SMT switch (symbol and footprint) --- AUTHORS | 1 + components/HIERARCHY | 1 + components/switch.dcm | 2 +- components/switch.lib | 21 ++++++++++- modules/HIERARCHY | 1 + modules/Makefile | 2 +- modules/sw-spdt-smt.fpd | 78 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 modules/sw-spdt-smt.fpd diff --git a/AUTHORS b/AUTHORS index 28acece..c935b41 100644 --- a/AUTHORS +++ b/AUTHORS @@ -106,6 +106,7 @@ Werner Almesberger modules/er-oled-fpc30.fpd modules/memcard8-amp-10100660.fpd modules/tswa.fpd + modules/sw-spdt-smt.fpd Xiangfu diff --git a/components/HIERARCHY b/components/HIERARCHY index 9fca119..cd7f901 100644 --- a/components/HIERARCHY +++ b/components/HIERARCHY @@ -145,6 +145,7 @@ Electromechanical Switch FSMRA2JH SW_PUSH + SW-SPDT EVQQ7 TSWA Case diff --git a/components/switch.dcm b/components/switch.dcm index 417a684..b69bbf1 100644 --- a/components/switch.dcm +++ b/components/switch.dcm @@ -1,4 +1,4 @@ -EESchema-DOCLIB Version 2.0 Date: Wed 04 Apr 2012 09:09:37 CST +EESchema-DOCLIB Version 2.0 Date: Mon Sep 16 06:18:01 2013 # $CMP FSMRA2JH D FSMRA2JH, SWITCH, TACTILE, SPNO, R/A, THROUGH HOLE diff --git a/components/switch.lib b/components/switch.lib index 799df32..3fe204d 100644 --- a/components/switch.lib +++ b/components/switch.lib @@ -1,4 +1,4 @@ -EESchema-LIBRARY Version 2.3 Date: 2012年04月27日 (週五) 17時05分56秒 +EESchema-LIBRARY Version 2.3 Date: Mon Sep 16 06:18:01 2013 #encoding utf-8 # # FSMRA2JH @@ -6,6 +6,8 @@ EESchema-LIBRARY Version 2.3 Date: 2012年04月27日 (週五) 17時05分56秒 DEF FSMRA2JH SW 0 40 N N 1 F N F0 "SW" -184 300 60 H V C CNN F1 "FSMRA2JH" -370 -168 60 H V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN DRAW S -250 200 250 -100 0 1 0 N S -170 50 170 60 0 1 0 N @@ -17,11 +19,28 @@ X SHIELD 4 100 -200 100 U 50 50 1 1 P ENDDRAW ENDDEF # +# SW-SPDT +# +DEF SW-SPDT SW 0 40 Y N 1 F N +F0 "SW" 50 200 60 H V C CNN +F1 "SW-SPDT" 0 -200 60 H V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN +DRAW +P 2 0 1 0 -150 0 100 100 N +X 3 3 450 -100 300 L 50 50 0 1 P +X 1 1 450 100 300 L 50 50 1 1 P +X 2 2 -450 0 300 R 50 50 1 1 P +ENDDRAW +ENDDEF +# # SW_PUSH # DEF SW_PUSH SW 0 40 N N 1 F N F0 "SW" 150 110 60 H V C CNN F1 "SW_PUSH" 0 -80 60 H V C CNN +F2 "~" 0 0 60 H V C CNN +F3 "~" 0 0 60 H V C CNN DRAW S -170 50 170 60 0 1 0 N P 4 0 1 0 -40 60 -30 90 30 90 40 60 N diff --git a/modules/HIERARCHY b/modules/HIERARCHY index f0a66d7..7665221 100644 --- a/modules/HIERARCHY +++ b/modules/HIERARCHY @@ -402,4 +402,5 @@ Mechanical TACTIL-SW-SPST-RA-13.26mm-15.85mm E-SWITCH_320 EVQQ7 + SW-JS102011SAQN TSWA-22mm diff --git a/modules/Makefile b/modules/Makefile index d029a97..25ec136 100644 --- a/modules/Makefile +++ b/modules/Makefile @@ -11,7 +11,7 @@ MODULES=8_10-card 8_10-socket-ra 8_10-socket-ra-push-pull \ pads pads-array phonejack \ qfn qfp \ rca-3-ra rj45 \ - soic sot23 spacer sot sot-323 ssop stdpass \ + soic sot23 spacer sot sot-323 ssop stdpass sw-spdt-smt \ tactile-sw-spst-ra-dip to tsop tssop5 tswa \ usb-a-dual-recept-r usb-a-pcb usb_a_plug_smt \ xlr-plug xlr-socket \ diff --git a/modules/sw-spdt-smt.fpd b/modules/sw-spdt-smt.fpd new file mode 100644 index 0000000..1bc756c --- /dev/null +++ b/modules/sw-spdt-smt.fpd @@ -0,0 +1,78 @@ +/* MACHINE-GENERATED ! */ + +frame knob { + table + { x } + { -tx/2 } + { tx/2 } + + __0: vec @(x, -oy/2) + __1: vec .(0mm, -ky) + __2: vec .(-kx/2, 0mm) + __3: vec .(0mm, ky*0.75) + line . __2 w + __4: vec __1(kx/2, 0mm) + line __2 . w + __5: vec .(0mm, ky*0.75) + line . __4 w +} + +frame holes { + table + { x } + { -hx/2 } + { hx/2 } + + __0: vec @(x, 0mm) + __1: vec .(hr, hr) + __2: vec __0(-hr, -hr) + hole . __1 +} + +frame pads { + set x = e*(i-2) + + loop i = 1, 3 + + __0: vec @(x, hy) + __1: vec .(-px/2, 0mm) + __2: vec .(px, py) + pad "$i" __1 . +} + +frame outline { + table + { x } + { -ox/2 } + { ox/2 } + + __0: vec @(x, -oy/2) + __1: vec .(0mm, oy) + line __0 . w +} + +package "SW-${type}" +unit mm + +table + { type, px, py, e, hx, hy, hr, ox, oy, kx, ky, tx } + { "JS102011SAQN", 1.2mm, 2.5mm, 2.5mm, 6.8mm, 4mm-py, 0.9mm/2, 9mm, 3.6mm, 1.5mm, 2mm, 2mm } + +set w = 5mil + +frame outline @ +frame pads @ +frame holes @ +frame knob @ +measx outline.__0 >> outline.__0 -2.5mm-ky +measx holes.__0 >> holes.__0 -3.5mm-ky +measx holes.__2 -> holes.__1 2*hr+0.5mm +measy pads.__1 -> pads.__2 0.5mm +measx pads.__1 -> pads.__2 py+0.5mm +measy outline.__0 -> outline.__1 1mm +measx pads.__0 -> pads.__0 -0.5mm +measy pads.__0 << holes.__0 -2mm +measy pads.__2 << holes.__0 -3mm +measx knob.__1 >> knob.__1 ky +measy knob.__2 -> knob.__0 0.5mm +measx knob.__2 -> knob.__4 -0.7mm