Commit 34c3252a authored by Sam Calisch's avatar Sam Calisch
Browse files

added pcb design files

parent 770d09cc
#from koko.lib.sam import *
from koko.lib.pcb import *
from koko.lib.shapes2d import *
class TagConnectPDI(Component):
'''
'''
_pad = s2d.circle(0,0,.5*.031)
_via = s2d.circle(0,0,.5*.039)
pins = [
Pin(-.05,-.025,_pad,'CLK',label_size=.02),
Pin( .00,-.025,_pad,'NC',label_size=.02),
Pin( .05,-.025,_pad,'DAT',label_size=.02),
Pin(-.05,.025,_pad,'VCC',label_size=.02),
Pin( .00,.025,_pad,'NC',label_size=.02),
Pin( .05,.025,_pad,'GND',label_size=.02)
]
vias = [
Via(-.1,0,_via),
Via(.1,0.04,_via),
Via(.1,-.04,_via),
]
class Header_MicroMetalGear(Component):
''' For ftdi cable
'''
_pad_header = chamfered_rectangle(-0.06, 0.06, -0.02, 0.02,.007)
pins = [
Pin(0, -0.25, _pad_header, 'OUTB'),
Pin(0, -0.15, _pad_header, 'OUTA'),
Pin(0, -0.05, _pad_header, 'VCC'),
Pin(0, 0.05, _pad_header, 'GND'),
Pin(0, 0.15, _pad_header, 'M2'),
Pin(0, 0.25, _pad_header, 'M1'),
]
prefix = 'J'
vias = []
shadow = s2d.rectangle(-8/25.4,.06,-.28,.28)
class Header_FTDI(Component):
''' For ftdi cable
'''
_pad_header = chamfered_rectangle(-0.06, 0.06, -0.025, 0.025,.007)
pins = [
#Pin(0, -0.25, _pad_header, 'RTS'),
Pin(0, -0.15, _pad_header, 'RX'),
Pin(0, -0.05, _pad_header, 'TX'),
Pin(0, 0.05, _pad_header, 'VCC'),
Pin(0, 0.15, _pad_header, 'CTS'),
Pin(0, 0.25, _pad_header, 'GND'),
]
prefix = 'J'
vias = []
shadow = s2d.rectangle(-.06,8/25.4,-.18,.28)
class Header_Analog(Component):
_pad_header = chamfered_rectangle(-0.04, 0.04, -0.03, 0.03,.005)
pins = [
Pin(0, -0.1, _pad_header, 'VCC'),
Pin(0, 0.0, _pad_header, 'IN'),
Pin(0, 0.1, _pad_header, 'GND'),
]
prefix = 'J'
vias = []
shadow = s2d.rectangle(-.06,8/25.4,-.18,.28)
class Regulator_SOT23_5(Component):
''' TLV70436DBVT, 160mA, 3.6 V
'''
_pad_SOT23 = chamfered_rectangle(-.0315,.0315,-.011,.011,.006)
pins = [
Pin(-0.053, -0.0375, _pad_SOT23,'OUT'),
Pin(-0.053, 0, _pad_SOT23,'IN'),
Pin(-0.053, 0.0375, _pad_SOT23,'GND'),
Pin(0.053, -0.0375, _pad_SOT23,'NC1'),
Pin(0.053, 0.0375, _pad_SOT23,'NC2'),
]
prefix = 'U'
vias = []
class ATxmega16A4U(Component):
_padh = chamfered_rectangle(-.024,.024,-.007,.007,.003)
_padv = chamfered_rectangle(-.007,.007,-.024,.024,.003)
c= 11/25.4/2.
d = 0.8/25.4
names = [
'PA5','PA6','PA7','PB0','PB1','PB2','PB3','GND','VCC','PC0','PC1',
'PC2','PC3','PC4','PC5','PC6','PC7','GND2','VCC2','PD0','PD1','PD2',
'PD3','PD4','PD5','PD6','PD7','PE0','PE1','GND3','VCC3','PE2','PE3',
'PDI/DATA','RST/CLK','PR0','PR1','GND4','AVCC','PA0','PA1','PA2','PA3','PA4'
]
n_side = 11
pins = [Pin(-c,(5-i)*d,_padh,n,label_size=.025) for i,n in enumerate(names[:n_side])]
pins += [Pin((-5+i)*d,-c,_padv,n,label_size=.025,label_rot=-90) for i,n in enumerate(names[n_side:2*n_side])]
pins += [Pin(c,(-5+i)*d,_padh,n,label_size=.025) for i,n in enumerate(names[2*n_side:3*n_side])]
pins += [Pin((5-i)*d,c,_padv,n,label_size=.025,label_rot=-90) for i,n in enumerate(names[3*n_side:])]
vias = []
shadow = rectangle(-c+d,c-d,-c+d,c-d)
_pad_SOIC = s2d.rectangle(-.041,.041,-.015,.015)
class A4953(Component):
_pad_SOIC = chamfered_rectangle(-.041,.041,-.015,.015,.008)
pins = [
Pin(-.11, .075,_pad_SOIC,"GND"),
Pin(-.11, .025,_pad_SOIC,"IN2"),
Pin(-.11,-.025,_pad_SOIC,"IN1"),
Pin(-.11,-.075,_pad_SOIC,"VREF"),
Pin( .11,-.075,_pad_SOIC,"VBB"),
Pin( .11,-.025,_pad_SOIC,"OUT1"),
Pin( .11, .025,_pad_SOIC,"LSS"),
Pin( .11, .075,_pad_SOIC,"OUT2"),
Pin( 0,0,s2d.rectangle(-.04,.04,-.075,.075),"")
]
prefix = 'U'
vias = []
class DRV8825_CarrierSMD(Component):
''' Stepper driver carrier high current from pololu
Purple, mounted with smd headers (face up)
'''
_pad = chamfered_rectangle(-0.04, 0.04, -0.028, 0.028,.005)
_via = s2d.circle(0,0,.019)
names = ['VMOT','GMOT','B2','B1','A1','A2','FLT','GND','DIR','STEP','SLP','RST','MS3','MS2','MS1','EN']
ys = arange(.4,-.4+.001,-.1)-.05
os = .08*(arange(len(ys))%2-.5)
pts = vstack(( dstack((-.25*ones_like(ys) + os,ys[::-1]))[0], dstack((.25*ones_like(ys) + os,ys))[0] ))
pins = [Pin(p[0],p[1],_pad,n) for n,p in zip(names,pts)]
vias = []#[Via(p[0],p[1],_via) for n,p in zip(names,pts)]
prefix = 'IC'
shadow = rectangle(-.3,.3,-.4,.4)
class StepperHeader(Component):
pitch = .1
_pad = chamfered_rectangle(-0.03, 0.03,-0.06, 0.06,.007)
#_via = s2d.circle(0,0,.025)
pins = [Pin(-1.5*pitch,0,_pad),Pin(-.5*pitch,0,_pad),Pin(.5*pitch,0,_pad),Pin(1.5*pitch,0,_pad)]
vias = []#[Via(p.x,p.y,_via) for p in pins]
shadow = s2d.rectangle(-.2,.2,-.06,8/25.4)
class BarrelJackSMD(Component):
pw = 2.8/25.4
ph = 2.4/25.4
_pad = chamfered_rectangle(-.5*pw,.5*pw,-.5*ph,.5*ph,.01)
_via = s2d.circle(0,0,.065)
pins = [
Pin(.192,.177+.5*ph,_pad,'V'),
Pin(.437,.177+.5*ph,_pad,'V2'),
Pin(.192,-.177-.5*ph,_pad,'GND'),
Pin(.437,-.177-.5*ph,_pad,'GND2'),
]
vias = [Via(.197,0,s2d.circle(0,0,.5*.065)),
Via(.374,0,s2d.circle(0,0,.5*.073))]
shadow = s2d.rectangle(0,.58,-.18,.18)
class Header_Female_R_SMD(Component):
_pad = s2d.rectangle(-.045,.045,-.03,.03)
pins = [Pin(-.178,0,_pad),Pin(.178,0,_pad)]
shadow = s2d.rectangle(-.178,.178,-.05,.05)
vias = []
class Regulator_SOT23(Component):
''' LM3480 100-mA, 3.3V
'''
_pad_SOT23 = s2d.rectangle(-.02,.02,-.012,.012)
pins = [
Pin(-0.045, -0.0375, _pad_SOT23,'IN'),
Pin(-0.045, 0.0375, _pad_SOT23,'OUT'),
Pin(0.045, 0, _pad_SOT23,'GND')
]
prefix = 'U'
vias = []
class R_2010(Component):
_pad_2010 = s2d.rectangle(-0.032, 0.032, -0.045, 0.045)
''' 2010 Resistor
'''
pins = [Pin(-0.096, 0, _pad_2010), Pin(0.096, 0, _pad_2010)]
prefix = 'R'
vias = []
class Header_Encoder(Component):
''' For CUI AMT10-V
'''
_pad_header = chamfered_rectangle(-0.06, 0.06, -0.025, 0.025,.007)
pins = [
Pin(0, 0.2, _pad_header, 'B'),
Pin(0, 0.1, _pad_header, '5V'),
Pin(0, 0.0, _pad_header, 'A'),
Pin(0, -0.1, _pad_header, 'X'),
Pin(0, -0.2, _pad_header, 'GND'),
]
prefix = 'J'
vias = []
shadow = s2d.rectangle(-8/25.4,.06,-.24,.24)
width = 1.29
height = 1.9
pcb = PCB(0,0,width,height,chamfer_distance=.12)
def connectG(pin,dx,dy,width=.014,pts=[]):
'''
Convenience function for connecting to ground plane
'''
sides = [0 for p in pts]+[0,1,1]
pts = [pin] + pts + [[pin.x+dx,pin.y+dy],[pin.x+dx-.0001,pin.y+dy]]
pcb.connectD(*pts,width=width,sides=sides)
def connectGf(pin,dx,dy,width=.014,pts=[]):
sides = [1,0] + [0 for p in pts]+ [1]
pts = [[pin.x+dx,pin.y+dy],[pin.x+dx-.0001,pin.y+dy]] + pts + [pin]
pcb.connectD(*pts,width=width,sides=sides)
def connectS(pin,dx,dy,width=.014):
pcb.connectD(pin,[pin.x+dx+.0001,pin.y+dy],width=width)
def connectM(pin1,pin2,dx,width=.014):
pcb.connectD(pin1,[pin1.x+dx,pin1.y],pin2,width=width)
xmega = ATxmega16A4U(width-.4,.88,-90-45,'Xmega\n16A4U')
pcb += xmega
pdi = TagConnectPDI(xmega.x+.12,xmega.y-.40,180)
pcb += pdi
connectG(xmega['GND4'],.04,-.07)
#connectG(xmega['GND'],.07,.05)
pcb.connectD(xmega['PDI/DATA'],pdi['DAT'])
C1 = C_0805(pdi.x,pdi.y-.08,180,'C1 1uF')
pcb += C1
C2 = C_0805(C1.x,C1.y-.06,180,'C2 .1uF')
pcb += C2
R1 = R_0805(pdi.x+.07,pdi.y+.08,0,'R1\n10k')
pcb += R1
pcb.connectV(pdi['GND'],C1[0])
pcb.connectV(pdi['GND'],C2[0])
pcb.connectV(pdi['VCC'],C1[1])
pcb.connectV(pdi['VCC'],C2[1])
#pcb.connectD(R1[0],C1[1])
pcb.connectD(xmega['RST/CLK'],R1[1],width=.014)
pcb.connectD(xmega['AVCC'],[R1[0].x,R1[0].y+.03],R1[0],width=.014)
pcb.connectD(R1[1],pdi['CLK'],width=.014)
pcb.connectD(xmega['VCC3'],[xmega['AVCC'].x-.0501,xmega['AVCC'].y+.05],xmega['AVCC'],width=.014)
pcb.connectD(xmega['VCC2'],[xmega['VCC'].x-.17,xmega['VCC'].y-.17],xmega['VCC'],width=.014)
ftdi = Header_FTDI(xmega.x-.06,.18,-90,'ftdi')
pcb += ftdi
reg = Regulator_SOT23(ftdi.x+.36,ftdi['GND'].y-.01,-90,'3.3v')
pcb += reg
pcb.connectV(ftdi['VCC'],[reg['IN'].x,reg['IN'].y+.07],reg['IN'],width=.02)
pcb.connectD(reg['OUT'],[reg['OUT'].x,reg['OUT'].y+.08],C1[1],width=.018)
pcb.connectD(xmega['PE3'],[ftdi['RX'].x+.06,ftdi['RX'].y+.1],ftdi['RX'],width=.014)
pcb.connectD(xmega['PE2'],[xmega.x,xmega.y-.2],[xmega.x,xmega.y-.3],ftdi['TX'],width=.012)
connectG(reg['GND'],-.02,-.06)
pcb.connectH(reg['GND'],ftdi['GND'])
pcb.connectH(C1[1],[R1[0].x+.03,R1[0].y],R1[0],width=.02)
C_in = C_0805(ftdi['VCC'].x,ftdi.y+.15,90,'Cin\n.1uF')
pcb += C_in
pcb.connectV(ftdi['VCC'],C_in[1])
pcb.connectV(C2[0],C_in[0])
connectG(C_in[0],-0.03,.05)
#soldering tails
#connectG(xmega['GND'],.09,.05,width=.014)
connectS(xmega['VCC2'],-.04,.04)
connectS(xmega['PD0'],-.04,.04)
connectS(xmega['PE0'],-.032,-.032)
connectS(xmega['PE1'],-.032,-.032)
connectS(xmega['PB3'],.04,.04)
connectS(xmega['PB2'],.04,.04)
connectS(xmega['PB1'],.04,.04)
connectS(xmega['PB0'],.04,.04)
connectS(xmega['PA7'],.04,.04)
connectS(xmega['PA6'],.04,.04)
connectS(xmega['PA5'],.04,.04)
connectS(xmega['PA4'],.04,-.04)
connectS(xmega['PA3'],.04,-.04)
connectS(xmega['PA2'],.04,-.04)
connectS(xmega['PA1'],.04,-.04)
connectS(xmega['PA0'],.04,-.04)
connectS(xmega['PD3'],-.04,-.04)
connectS(xmega['PD4'],-.04,-.04)
connectS(xmega['PD5'],-.04,-.04)
connectS(xmega['PD6'],-.04,-.04)
connectS(xmega['PD7'],-.04,-.04)
connectS(xmega['PD2'],-.04,.04)
#connectS(xmega['PC2'],-.04,.04)
#connectS(xmega['PC3'],-.04,.04)
connectS(xmega['PC6'],-.04,.04)
connectS(xmega['PC7'],-.04,.04)
#connectG(xmega['GND2'],-.06,.09)
pcb.connectD(xmega['VCC'],[xmega['VCC3'].x+.09,xmega['VCC3'].y+.09],xmega['VCC3'],width=.014)
#h bridge
hbridge = A4953(xmega.x+.21,xmega.y+.52,90,'H')
pcb += hbridge
pcb.connectH(hbridge[0],hbridge['GND'])
pcb.connectD(xmega['PC1'],[hbridge['IN2'].x,hbridge['IN2'].y-.065],hbridge['IN2'],width=.014)
pcb.connectD(xmega['PC0'],[hbridge['IN1'].x-.02,hbridge['IN1'].y-.095],hbridge['IN1'],width=.014)
pcb.connectD(xmega['VCC'],[hbridge['VREF'].x-.055,hbridge['VREF'].y-.125],[hbridge['VREF'].x,hbridge['VREF'].y-.03],hbridge['VREF'],width=.014)
C_h1 = C_1206(hbridge.x+.13,hbridge.y+.07,90,'CH1\n.1uF',label_size=.03)
#C_h2 = C_1206(C_h1.x+.08,C_h1.y,90,'CH2\n47uF',label_size=.03)
pcb += C_h1
#pcb += C_h2
pcb.connectH(hbridge[0],C_h1[1],width=.04)
connectG(C_h1[1],0,-.05)
connectG(hbridge['LSS'],0,.08)
#connectG(xmega['GND'],.057,.034,width=.014)
pcb.connectD(xmega['GND'],[C_h1.x-.1,C_h1.y-.34],C_h1[1],width=.014)
#pcb.connectD(xmega['GND'],[C_h1[1].x-.09,hbridge['VREF'].y-.15],C_h1[1],width=.014)
#MOTOR
motor = Header_MicroMetalGear(hbridge.x-.16,hbridge.y+.3,-90,'motor')
pcb += motor
pcb.connectD(hbridge['OUT1'],[hbridge['OUT1'].x+.005,hbridge['OUT1'].y+.09],motor['M1'],width=.02)
pcb.connectD(hbridge['OUT2'],[hbridge['OUT2'].x,hbridge['OUT2'].y+.11],motor['M2'],width=.02)
#connectG(motor['GND'],0.02,.03)
pcb.connectD(motor['GND'],[motor['GND'].x-.01,hbridge.y+.03],hbridge[0])
#MOTOR 2
motor2 = Header_MicroMetalGear(.33,.18,90,'motor2')
pcb += motor2
#pcb.connectD(xmega['PD4'],[motor2['OUTA'].x+.28,motor2['OUTA'].y+.2],motor2['OUTA'],width=.014)
pcb.connectD(motor2['OUTA'],[motor2['OUTA'].x,motor2['OUTA'].y+.03],[xmega['PE0'].x-.18,xmega['PE0'].y-.18],xmega['PE0'],width=.014)
pcb.connectD(motor2['OUTB'],[motor2['OUTB'].x,motor2['OUTB'].y+.07],[xmega['PE1'].x-.16,xmega['PE1'].y-.16],xmega['PE1'],width=.014)
pcb.connectD(motor2['VCC'],[motor2['VCC'].x,motor2['VCC'].y-.1],[motor2['OUTB'].x+.05,motor2['VCC'].y-.1],[motor2['OUTB'].x+.05,motor2['VCC'].y+.07], [xmega['VCC3'].x-.1,xmega['VCC3'].y-.1],xmega['VCC3'],width=.014)
#connectGf(motor2['GND'],.03,-.1)
#pcb.connectV(motor2['GND'],[ftdi['GND'].x,ftdi['GND'].y-.13],ftdi['GND'])
connectG(xmega['GND3'],-.13,-.18)
hbridge2 = A4953(motor2.x-.03,motor2.y+.2,180,'H')
pcb += hbridge2
pcb.connectV(hbridge2[0],hbridge2['GND'])
pcb.connectD(xmega['VCC'],[xmega.x-.3,xmega.y],[hbridge2['VREF'].x+.02,hbridge2['VREF'].y],hbridge2['VREF'],width=.014)
pcb.connectD(xmega['PD4'],[hbridge2['IN1'].x+.07,hbridge2['IN1'].y+.03],hbridge2['IN1'],width=.014)
pcb.connectD(xmega['PD5'],[hbridge2['IN2'].x+.11,hbridge2['IN2'].y+.05],hbridge2['IN2'],width=.014)
pcb.connectD(motor2['M2'],[motor2['M2'].x,motor2['M2'].y+.06],hbridge2['OUT2'],width=.03)
pcb.connectV(motor2['GND'],hbridge2[0])
#connectGf(hbridge2['LSS'],-.09,-.03)
pcb.connectH(hbridge2['OUT1'],[hbridge2.x-.26,motor2['M2'].y],motor2['M1'],width=.03)
#MOTOR 3
motor3 = Header_MicroMetalGear(motor.x-.6,motor.y,-90,'motor3')
pcb += motor3
hbridge3 = A4953(hbridge.x-.34,hbridge.y-.01,90,'H')
pcb += hbridge3
pcb.connectV(hbridge3['GND'],hbridge3[0])
#pcb.connectV(hbridge3['LSS'],[hbridge3['LSS'].x-.12,hbridge3['LSS'].y+.065],[hbridge3['LSS'].x-.12,hbridge3['LSS'].y+.05],[hbridge3['LSS'].x-.12,hbridge3['LSS'].y+.05001],sides=[0,0,1,1])
pcb.connectD(hbridge3['VREF'],[motor['VCC'].x+.015,hbridge3['VREF'].y],[motor['VCC'].x+.05,motor['VCC'].y-.1],motor['VCC'])
pcb.connectD(hbridge3['VREF'],[xmega['VCC'].x-.086,xmega['VCC'].y-.085],xmega['VCC'],width=.012)
pcb.connectD(xmega['PC2'],hbridge3['IN1'],width=.014)
pcb.connectD(xmega['PC3'],hbridge3['IN2'],width=.014)
connectG(hbridge3[0],-.1,0)
#C_h1 = C_1206(hbridge3.x+.13,hbridge3.y+.05,90,'CH1\n.1uF',label_size=.03)
#C_h2 = C_1206(C_h1.x+.08,C_h1.y,90,'CH2\n47uF',label_size=.03)
#pcb += C_h1
#pcb += C_h2
#pcb.connectH(hbridge3[0],C_h2[1],width=.04)
C_h1 = C_1206(hbridge3.x+.12,hbridge3.y+.07,90,'CH1\n.1uF',label_size=.03)
pcb += C_h1
pcb.connectH(hbridge3[0],C_h1[1],width=.04)
#current pins
connectG(xmega['PA5'],.04,-.03,width=.014)
connectG(xmega['PA6'],.1,.12,width=.014)
connectG(xmega['PA7'],.05,.1,width=.014)
pcb.connectD([xmega['PA5'].x+.04,xmega['PA5'].y-.03],[xmega['PA5'].x-.22,xmega['PA5'].y-.03],[hbridge2['LSS'].x-.09,hbridge2['LSS'].y-.03],hbridge2['LSS'],sides=[1,1,0],width=.03)
pcb.connectD([xmega['PA6'].x+.1,xmega['PA6'].y+.12],[xmega['PA6'].x+.1,xmega['PA6'].y+.3], [hbridge['LSS'].x,hbridge['LSS'].y+.08],hbridge['LSS'],sides=[1,1,0,1],width=.03)
pcb.connectD([xmega['PA7'].x+.05,xmega['PA7'].y+.1],[xmega['PA7'].x+.01,xmega['PA7'].y+.2],[hbridge3['LSS'].x-.1,hbridge3['LSS'].y+.065],[hbridge3['LSS'].x,hbridge3['LSS'].y+.073],hbridge3['LSS'],sides=[1,1,0,0],width=.03)
pcb.connectV(hbridge3['OUT1'],[motor3['M1'].x,motor3['M1'].y-.085],motor3['M1'],width=.02).cut_corners([(2,.05)])
pcb.connectH(hbridge3['OUT2'],motor3['M2'],width=.02)
pcb.connectD(xmega['PD0'],motor3['OUTA'],width=.014)
pcb.connectD(xmega['PD1'],motor3['OUTB'],width=.014)
#pcb.connectD(xmega['VCC2'],motor3['VCC'],width=.014)
pcb.connectD(xmega['PC5'],[xmega['PC5'].x-.16,xmega['PC5'].y+.08],[motor3['M2'].x-.05,motor3.y+.1],[motor['OUTA'].x-.05,motor['OUTA'].y+.13],motor['OUTA'],width=.014)
pcb.connectD(xmega['PC4'],[xmega['PC4'].x-.16,xmega['PC4'].y+.1],[motor3['M2'].x+.05,motor3.y+.08],[motor['OUTB'].x-.05,motor['OUTB'].y+.1],motor['OUTB'],width=.014).add_jumper([motor3['M1'].x-.03,hbridge3['OUT2'].y],90)
pcb.connectD(xmega['GND2'],motor3['GND'],width=.014)
#pcb.connectD(xmega['VCC'],[xmega.x-.3,xmega.y],[xmega.x-.35,xmega.y+.12],[motor3['OUTB'].x-.05,motor3.y+.1],[motor3['VCC'].x-.05,motor3['VCC'].y+.1],motor3['VCC'],width=.014)
pcb.connectD(xmega['VCC2'],motor3['VCC'],width=.014)
connectG(motor3['GND'],-.02,-.1)
#pcb.connectD(R1[0], [xmega.x+.35,xmega.y-.05],[xmega.x+.1,xmega.y],[xmega['VCC'].x-.1,xmega['VCC'].y-.101],xmega['VCC'],width=.012)
pow = BarrelJackSMD(-.12,hbridge2.y+.48,0,'pow')
pcb += pow
pcb.connectV(hbridge2[0],pow['GND2'],width=.06)
connectG(pow['GND'],-.01,-.1,width=.04)
pcb.connectV(hbridge2['VBB'],pow['V'],width=.05)
pcb.connectH(pow['V'],pow['V2'],width=.07)
pcb.connectV(hbridge['VBB'],[hbridge['VBB'].x+.08,hbridge['VBB'].y],[pow['V'].x-.04,height-.03],pow['V'],width=.03).cut_corners([(2,.11),(4,.1)])
connectG(pow['GND2'],.04,-.1,width=.04)
C_h3 = C_1206(pow.x+.24,pow.y+.35,90,'C\n47uF')
pcb += C_h3
connectG(C_h3[0],0,.05)
#pcb.connectV(motor3['GND'],C_h3[0],width=.03)
pcb.connectH(hbridge3['VBB'],[motor['OUTA'].x+.05,height-.04],width=.029)
C_h1 = C_1206(pow['GND'].x+.18,pow['GND'].y-.1,0,'CH1 .1uF')
C_h2 = C_1206(C_h1.x,C_h1.y+.1,0,'CH2 47uF')
pcb += C_h1
pcb += C_h2
analog = Header_Analog(xmega.x+.34,xmega.y-.3,0,'analog')
pcb += analog
pcb.connectD(xmega['PA0'],analog['IN'],width=.014)
pcb.connectV(analog['VCC'],reg['OUT'])
connectG(analog['GND'],0,.05)
cad.shapes = pcb.layout
#cad.shape = pcb.traces+(pcb.cutout-pcb.cutout)
#cad.shape = pcb.traces_other_side+(pcb.cutout-pcb.cutout)
#cad.shape = pcb.cutout+(pcb.traces-pcb.traces)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment