mini-usb.fpd 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*Mini USB Type B connector*/
  2. frame pad{
  3. set name=i
  4. ur: vec @(0mm,w/2)
  5. ll: vec @(-l,-w/2)
  6. pad "$name" ur ll
  7. }
  8. frame pad_gnd {
  9. set name1=i
  10. set name2=i+2
  11. pos1_ur: vec @(gnd_x/2,gnd_y/2)
  12. pos2_ur: vec .(0mm,-b_y)
  13. pos1_ll: vec @(-gnd_x/2,-gnd_y/2)
  14. pos2_ll: vec .(0mm,-b_y)
  15. center: vec @(0mm,-b_y)
  16. pad "$name1" pos1_ur pos1_ll
  17. pad "$name2" pos2_ur pos2_ll
  18. }
  19. frame pads {
  20. loop i=1,5
  21. pos: vec @(0mm,2*p-(i-1)*p)
  22. frame pad .
  23. }
  24. frame pads_gnd{
  25. loop i=6,7
  26. pos: vec @(-gnd_x/2-a_x*(i-6),b_y/2)
  27. frame pad_gnd .
  28. }
  29. frame holes {
  30. c1: vec @(-f,c/2)
  31. d1: vec .(0mm,d/2)
  32. c2: vec @(-f,-c/2)
  33. d2: vec .(0mm,d/2)
  34. circ c1 d1 0.01mm
  35. circ c2 d2 0.01mm
  36. }
  37. frame outline {
  38. ur: vec @(-f+A1_x,B_y/2)
  39. ll: vec @(-e,-B_y/2)
  40. rect ur ll silk
  41. ur2: vec @(-e,B_y/2)
  42. ll2: vec @(-f-A2_x,-B_y/2)
  43. rect ur2 ll2 silk
  44. }
  45. package "miniUSB_B"
  46. unit mm
  47. /*GND pad size*/
  48. set gnd_y = 2mm
  49. set gnd_x = 2.5mm
  50. /*pad size*/
  51. set w=0.5mm
  52. set l=2.3mm
  53. /*pitch*/
  54. set p = 0.8mm
  55. /*distance center GND pad -> center pin1 */
  56. set a=2.85mm
  57. /*distance GND pad -> GND pad*/
  58. set a_x=5.5mm
  59. set b_y=8.9mm
  60. /*distance between drill holes*/
  61. set c=4.4mm
  62. /*x distance drill hole -> outer edge pin 1*/
  63. set f=3.75mm
  64. /*drill hole diameter*/
  65. set d=0.9mm
  66. /*distance outer edge of pin1 -> PCB edge*/
  67. set e=9mm
  68. /*outline x direction, center holes -> edges*/
  69. set A1_x=3.3mm
  70. set A2_x=5.9mm
  71. /*outline y direction*/
  72. set B_y=7.7mm
  73. set silk=0.1mm
  74. __0: vec @(0mm, 0mm)
  75. frame pads @
  76. frame pads_gnd @
  77. frame holes @
  78. frame outline @
  79. measy pad.ll -> pad.ur -l-2mm
  80. measy pad_gnd.pos2_ll -> pad_gnd.pos2_ur 0.3mm
  81. measx pad_gnd.pos1_ll -> pad_gnd.pos1_ur -1mm
  82. measy __0 -> pads.pos -0.5mm
  83. measy pads.pos >> pads.pos -1.5mm
  84. measx pads_gnd.pos >> pads_gnd.pos 2mm
  85. measx outline.ur2 >> pad.ur 3.5mm
  86. measx outline.ll >> holes.c2 -3mm
  87. measy holes.c2 >> holes.c1 A2_x+1mm
  88. measy outline.ll2 >> outline.ur2 2mm
  89. measx pad.ll -> pads.pos -1mm
  90. measy pads_gnd.pos << pad_gnd.center -5mm