diff --git a/python/pcb.py b/python/pcb.py index 8a9bbe62a1da06a4f00708a315ac6bd22475abbc..0d1a038685e7941503a0b6b9373fe63f8c627f32 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -1147,6 +1147,73 @@ class choke(part): # connectors # +class microSD(part): + # + # microSD + # Amphenol 114-00841-68 + # + def __init__(self,value=''): + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + # + # pin 1 + # + self.shape = translate(cube(-.0138,.0138,-.034,.034,0,0),-.177+7*.0433,-.304,0) + self.pad.append(point(-.177+7*.0433,-.304,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'1NC',angle=90)) + # + # pin 2 + # + self.shape = add(self.shape,translate(cube(-.0138,.0138,-.034,.034,0,0),-.177+6*.0433,-.304,0)) + self.pad.append(point(-.177+6*.0433,-.304,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'/CS',angle=90)) + # + # pin 3 + # + self.shape = add(self.shape,translate(cube(-.0138,.0138,-.034,.034,0,0),-.177+5*.0433,-.304,0)) + self.pad.append(point(-.177+5*.0433,-.304,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'MOSI',angle=90)) + # + # pin 4 + # + self.shape = add(self.shape,translate(cube(-.0138,.0138,-.034,.034,0,0),-.177+4*.0433,-.304,0)) + self.pad.append(point(-.177+4*.0433,-.304,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'V',angle=90)) + # + # pin 5 + # + self.shape = add(self.shape,translate(cube(-.0138,.0138,-.034,.034,0,0),-.177+3*.0433,-.304,0)) + self.pad.append(point(-.177+3*.0433,-.304,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'CLK',angle=90)) + # + # pin 6 + # + self.shape = add(self.shape,translate(cube(-.0138,.0138,-.034,.034,0,0),-.177+2*.0433,-.304,0)) + self.pad.append(point(-.177+2*.0433,-.304,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND',angle=90)) + # + # pin 7 + # + self.shape = add(self.shape,translate(cube(-.0138,.0138,-.034,.034,0,0),-.177+1*.0433,-.304,0)) + self.pad.append(point(-.177+1*.0433,-.304,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'MISO',angle=90)) + # + # pin 8 + # + self.shape = add(self.shape,translate(cube(-.0138,.0138,-.034,.034,0,0),-.177+0*.0433,-.304,0)) + self.pad.append(point(-.177+0*.0433,-.304,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'NC',angle=90)) + # + # feet + # + self.shape = add(self.shape,translate(cube(-.021,.021,-.029,.029,0,0),-.228,-.299,0)) # leave extra space for 1/64 milling + self.shape = add(self.shape,translate(cube(-.029,.029,-.029,.029,0,0),.222,-.299,0)) + self.shape = add(self.shape,translate(cube(-.015,.015,-.029,.025,0,0),-.232,0,0)) # leave extra space for 1/64 milling + self.shape = add(self.shape,translate(cube(-.015,.015,-.029,.029,0,0),-.232+.47,.025,0)) + 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)