diff --git a/python/pcb.py b/python/pcb.py index 0137778c05440c75beb5978d25f21c0086885f0a..93a96df2db7615bce926b531f5669cc168c4746d 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -5960,6 +5960,41 @@ class LED_RGB(part): self.pad.append(point(-dx,dy,0)) self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'G')) +class WS2812B_vinyl(part): + # + # WS2812B RGB LED vinyl cutter larger pads + # + def __init__(self,value=''): + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + padl = cube(-0.08,0,-0.04,0.04,0,0) + padr = cube(0,0.08,-0.04,0.04,0,0) + # + # pin 1 + # + self.shape = translate(padl,-0.067,0.065,0) + self.pad.append(point(-0.096,0.065,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(padl,-0.067,-0.065,0)) + self.pad.append(point(-0.096,-0.065,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'DOUT')) + # + # pin 3 + # + self.shape = add(self.shape,translate(padr,0.067,-0.065,0)) + self.pad.append(point(0.096,-0.065,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND')) + # + # pin 4 + # + self.shape = add(self.shape,translate(padr,0.067,0.065,0)) + self.pad.append(point(0.096,0.065,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'DIN')) + class phototransistor_1206(part): # # 1206 phototransistor @@ -7706,6 +7741,179 @@ class XIAO_RP2040(part): length/2-.161-(.209-.161)/2, 0)) +class XIAO_RP2040_vinyl(part): + # + # XIAO RP2040 vinyl cutter larger pads + # + def __init__(self,value=''): + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + padl = cube(-0.06,0.081,-0.070/2,0.070/2,0,0) + padr = cube(-0.081,0.06,-0.070/2,0.070/2,0,0) + pitch = 0.1 + dx = 0.035 + width = 0.699 + length = 0.818 + d = 0.015 + # + # pin 1 + # + self.shape = translate(padl,-width/2,3*pitch,0) + self.pad.append(point(-width/2,3*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'D0')) + # + # pin 2 + # + self.shape = add(self.shape,translate(padl,-width/2,2*pitch,0)) + self.pad.append(point(-width/2,2*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'D1')) + # + # pin 3 + # + self.shape = add(self.shape,translate(padl,-width/2,1*pitch,0)) + self.pad.append(point(-width/2,1*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'D2')) + # + # pin 4 + # + self.shape = add(self.shape,translate(padl,-width/2,0*pitch,0)) + self.pad.append(point(-width/2,0*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'D3')) + # + # pin 5 + # + self.shape = add(self.shape,translate(padl,-width/2,-1*pitch,0)) + self.pad.append(point(-width/2,-1*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'SDA')) + # + # pin 6 + # + self.shape = add(self.shape,translate(padl,-width/2,-2*pitch,0)) + self.pad.append(point(-width/2,-2*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'SCL')) + # + # pin 7 + # + self.shape = add(self.shape,translate(padl,-width/2,-3*pitch,0)) + self.pad.append(point(-width/2,-3*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'TX')) + # + # pin 8 + # + self.shape = add(self.shape,translate(padr,width/2,-3*pitch,0)) + self.pad.append(point(width/2,-3*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'RX')) + # + # pin 9 + # + self.shape = add(self.shape,translate(padr,width/2,-2*pitch,0)) + self.pad.append(point(width/2,-2*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'SCK')) + # + # pin 10 + # + self.shape = add(self.shape,translate(padr,width/2,-1*pitch,0)) + self.pad.append(point(width/2,-1*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'SDI')) + # + # pin 11 + # + self.shape = add(self.shape,translate(padr,width/2,0*pitch,0)) + self.pad.append(point(width/2,0*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'SDO')) + # + # pin 12 + # + self.shape = add(self.shape,translate(padr,width/2,1*pitch,0)) + self.pad.append(point(width/2,1*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'3V3')) + # + # pin 13 + # + self.shape = add(self.shape,translate(padr,width/2,2*pitch,0)) + self.pad.append(point(width/2,2*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'G')) + # + # pin 14 + # + self.shape = add(self.shape,translate(padr,width/2,3*pitch,0)) + self.pad.append(point(width/2,3*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'5V')) + # + # VIN + # + self.shape = add(self.shape,cube( + width/2-.418-d, + width/2-.376+d, + length/2-.798-d, + length/2-.714+d, + 0,0)) + self.pad.append(point( + width/2-.376-(.418-.376)/2, + length/2-.714-(.798-.714)/2, + 0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'VIN')) + # + # GND + # + self.shape = add(self.shape,cube( + width/2-.317-d, + width/2-.275+d, + length/2-.798-d, + length/2-.714+d, + 0,0)) + self.pad.append(point( + width/2-.275-(.317-.275)/2, + length/2-.714-(.798-.714)/2, + 0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND')) + # + # prog + # + self.shape = add(self.shape,cube( + width/2-.320-d, + width/2-.276+d, + length/2-.107-d, + length/2-.060+d, + 0,0)) + self.pad.append(point( + width/2-.276-(.320-.276)/2, + length/2-.060-(.107-.060)/2, + 0)) + # + self.shape = add(self.shape,cube( + width/2-.424-d, + width/2-.376+d, + length/2-.107-d, + length/2-.060+d, + 0,0)) + self.pad.append(point( + width/2-.376-(.424-.376)/2, + length/2-.060-(.107-.060)/2, + 0)) + self.shape = add(self.shape,cube( + width/2-.424-d, + width/2-.376+d, + length/2-.209-d, + length/2-.161+d, + 0,0)) + self.pad.append(point( + width/2-.376-(.424-.376)/2, + length/2-.161-(.209-.161)/2, + 0)) + # + self.shape = add(self.shape,cube( + width/2-.320-d, + width/2-.276+d, + length/2-.209-d, + length/2-.161+d, + 0,0)) + self.pad.append(point( + width/2-.276-(.320-.276)/2, + length/2-.161-(.209-.161)/2, + 0)) + class AVRDB28(part): # # AVR*DB28