diff --git a/python/pcb.py b/python/pcb.py index 2eef4e3253459facb2ba565d55be4841fc09e69f..ef900eeae38d9b2018a9d2efc8848fd12ce6b60a 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -1319,7 +1319,69 @@ class header_IMU_2472(part): self.pad.append(point(0,-0.25,0)) self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'RST')) -class micro_USB(part): +class USB_micro_Elektronik(part): + # + # micro USB + # Elektronik 629105136821 + # + def __init__(self,value='',zb=-0.06,zt=0): + w = 0.0049 # pad half width + h = 1.35/25.4/2 # pad half height + p = 1.3/25.4/2 # pad pitch + y = (3.55-1.35/2)/25.4 # pad y + l = 0.006 # text + pad_header = cube(-w,w,-h,h,0,0) + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + # + # pin 1 + # + self.shape = translate(pad_header,-2*p,y,0) + self.pad.append(point(-2*p,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'V',line=l)) + # + # pin 2 + # + self.shape = add(self.shape,translate(pad_header,-p,y,0)) + self.pad.append(point(-p,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'-',line=l)) + # + # pin 3 + # + self.shape = add(self.shape,translate(pad_header,0,y,0)) + self.pad.append(point(0,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'+',line=l)) + # + # pin 4 + # + self.shape = add(self.shape,translate(pad_header,p,y,0)) + self.pad.append(point(p,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'I',line=l)) + # + # pin 5 + # + self.shape = add(self.shape,translate(pad_header,2*p,y,0)) + self.pad.append(point(2*p,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'G',line=l)) + # + # feet + # + x = (9.8+6.2)/2/25.4/2 + w = (9.8-6.2)/25.4/2/2 + h = 1.9/25.4/2 + pad_feet = cube(-w,w,-h,h,0,0) + self.shape = add(self.shape,translate(pad_feet,-x,0,0)) + self.shape = add(self.shape,translate(pad_feet,x,0,0)) + # + # holes + # + y = 2.45/25.4 + x = 4.15/2/25.4 + self.holes = cylinder(-x,y,zb,zt,0.016) + self.holes = add(self.holes,cylinder(x,y,zb,zt,0.016)) + +class USB_micro_AMP(part): # # micro USB # AMP/FCI 10118194-0001LF @@ -1373,7 +1435,7 @@ class micro_USB(part): self.holes = add(self.holes,cylinder(3.5/25.4,-2.7/25.4,zb,zt,.9/25.4/2)) self.shape= add(self.shape,cylinder(3.5/25.4,-2.7/25.4,zb,zt,2/25.4/2)) -class micro_USB_nopad(part): +class USB_micro_AMP_nopad(part): # # micro USB, no pad # AMP/FCI 10118194-0001LF @@ -2656,10 +2718,73 @@ class microSD(part): self.shape = add(self.shape,translate(cube(-.028,.028,-.019,.019,0,0),-.221,.059,0)) self.shape = add(self.shape,translate(cube(-.019,.019,-.030,.030,0,0),.222,.121,0)) -pad_USB_trace = cube(-.0075,.0075,-.04,.04,0,0) -pad_USB_feet = cube(-.049,.049,-.043,.043,0,0) +class USB_mini_CUI(part): + # + # USB mini + # CUI UJ2-MBH-1-SMT-TR + # + def __init__(self,value=''): + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + p = 0.8/25.4 # pad pitch + h = 2.5/25.4/2 # pad half height + w = 0.5/25.4/2 # pad half width + y = 5.48/25.4 # pad position + pad = cube(-w,w,-h,h,0,0) + l = 0.006 # text + # + # pin 1 + # + self.shape = translate(pad,-2*p,y,0) + self.pad.append(point(-2*p,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'V',line=l)) + # + # pin 2 + # + self.shape = add(self.shape,translate(pad,-p,y,0)) + self.pad.append(point(-p,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'-',line=l)) + # + # pin 3 + # + self.shape = add(self.shape,translate(pad,0,y,0)) + self.pad.append(point(0,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'+',line=l)) + # + # pin 4 + # + self.shape = add(self.shape,translate(pad,p,y,0)) + self.pad.append(point(p,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'I',line=l)) + # + # pin 5 + # + self.shape = add(self.shape,translate(pad,2*p,y,0)) + self.pad.append(point(2*p,y,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'G',line=l)) + # + # feet + # + w = 2/25.4/2 + h = 2.5/25.4/2 + x = (7.72/2+2/2)/25.4 + pad = cube(-w,w,-h,h,0,0) + self.shape = add(self.shape,translate(pad,-x,0,0)) + self.shape = add(self.shape,translate(pad,x,0,0)) + self.shape = add(self.shape,translate(pad,-x,y,0)) + self.shape = add(self.shape,translate(pad,x,y,0)) + # + # holes + # + y = (5.94-2.97)/25.4 + x = 4.4/2/25.4 + self.holes = cylinder(-x,0,zb,zt,0.016) + self.holes = add(self.holes,cylinder(x,0,zb,zt,0.016)) + self.holes = cylinder(-x,y,zb,zt,0.016) + self.holes = add(self.holes,cylinder(x,y,zb,zt,0.016)) -class USB_mini_B(part): +class USB_mini_Hirose(part): # # USB mini B # Hirose UX60-MB-5ST @@ -2668,18 +2793,20 @@ class USB_mini_B(part): self.value = value self.pad = [point(0,0,0)] self.labels = [] + pad_USB_trace = cube(-.0075,.0075,-.04,.04,0,0) + pad_USB_feet = cube(-.049,.049,-.043,.043,0,0) # # pin 1 # - self.shape = translate(pad_USB_trace,.063,.36,0) - self.pad.append(point(.063,.36,0)) - self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'G')) + self.shape = translate(pad_USB_trace,-.063,.36,0) + self.pad.append(point(-.063,.36,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'V')) # # pin 2 # - self.shape = add(self.shape,translate(pad_USB_trace,.0315,.36,0)) - self.pad.append(point(.0315,.36,0)) - self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'')) + self.shape = add(self.shape,translate(pad_USB_trace,-.0315,.36,0)) + self.pad.append(point(-.0315,.36,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'-')) # # pin 3 # @@ -2689,15 +2816,15 @@ class USB_mini_B(part): # # pin 4 # - self.shape = add(self.shape,translate(pad_USB_trace,-.0315,.36,0)) - self.pad.append(point(-.0315,.36,0)) - self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'-')) + self.shape = add(self.shape,translate(pad_USB_trace,.0315,.36,0)) + self.pad.append(point(.0315,.36,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'')) # # pin 5 # - self.shape = add(self.shape,translate(pad_USB_trace,-.063,.36,0)) - self.pad.append(point(-.063,.36,0)) - self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'V')) + self.shape = add(self.shape,translate(pad_USB_trace,.063,.36,0)) + self.pad.append(point(.063,.36,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'G')) # # feet #