Commit 72a9f303 authored by Sam Calisch's avatar Sam Calisch
Browse files

added nrf52 stepper driver with drv8825

parent 01b2b132
from koko.lib.sam import *
from koko.lib.pcb import *
from koko.lib.shapes2d import *
class R_0805(Component):
''' 0805 Resistor
'''
pins = [
Pin(-0.04, 0, s2d.rectangle(-.023,.017, -.027, .027)),
Pin(0.04, 0, s2d.rectangle(-.017,.023, -.027, .027))
]
prefix = 'R'
vias = []
class R_1206(Component):
''' 1206 Resistor
'''
pins = [
Pin(-0.06, 0, s2d.rectangle(-0.032, 0.03, -0.034, 0.034)),
Pin(0.06, 0, s2d.rectangle(-0.03, 0.032, -0.034, 0.034))]
prefix = 'R'
vias = []
def bot_chamfered_rectangle(x0,x1,y0,y1,c):
r = rectangle(x0,x1,y0,y1)
c1 = triangle(x0,y0,x0,y0+c,x0+c,y0)
c2 = triangle(x1,y1, x1, y1-c, x1-c, y1)
c3 = triangle(x0,y1, x0+c, y1, x0, y1-c)
c4 = triangle(x1,y0, x1-c, y0, x1, y0+c)
return r-c2-c3
class cap_UWT(Component):
'''UWT series aluminum smd cap
http://nichicon-us.com/english/products/pdfs/e-uwt.pdf
'''
_d = 8 #mm, diameter
_h = 10.5 #mm, height
_a = 2.9/25.4
_e = 3.1/25.4
_h = 1./25.4 + 2/25.4
_pad = rectangle(-_h/2,_h/2,-_a/2-.03,_a/2+.03)
pins = [Pin(0,-(_e+_a)/2-.01,_pad,'-'),Pin(0,(_e+_a)/2+.01,_pad,'+')]
vias = []
shadow = bot_chamfered_rectangle(-4/25.4,4/25.4,-4/25.4,4/25.4,1/25.4)
class Pheonix_WTB(Component):
_pad = rectangle(-.4*1.2/25.4,.4*1.2/25.4, -.5*3.4/25.4,.5*3.4/25.4)
_pad_big = chamfered_rectangle(-1.15/25.4,1.15/25.4,-2.8/25.4,2.8/25.4,.01)
pins = [
Pin(-1.5*2.5/25.4, -6.6/25.4,_pad,'1'),
Pin(- .5*2.5/25.4, -6.6/25.4,_pad,'2'),
Pin( .5*2.5/25.4, -6.6/25.4,_pad,'3'),
Pin( 1.5*2.5/25.4, -6.6/25.4,_pad,'4'),
Pin( -12.7/25.4/2, 0, _pad_big),
Pin( 12.7/25.4/2, 0, _pad_big),
]
vias = []
shadow = rectangle(-6/25.4,6/25.4,-8.3/25.4,2.8/25.4)
class DRV8825(Component):
'''Stepper driver'''
_pad = rectangle(-.8/25.4,.8/25.4,-.17/25.4,.17/25.4)
p = .65/25.4
w = 5.6/25.4
labels = ["CP1","CP2",'VCP','VMA','AOUT1','ISENA','AOUT2','BOUT2','ISENB','BOUT1','VMB','AVREF','BVREF','GND',
"V3OUT",'nRST','nSLP','nFLT','DECAY','DIR','nEBL','STEP','NC','MODE0','MODE1','MODE2','nHOME','GND2']
pins = [Pin(-.5*w,(6.5-i)*p,_pad,l,label_size=.02) for i,l in enumerate(labels[:14])]
pins += [Pin(.5*w,(-6.5+i)*p,_pad,l,label_size=.02) for i,l in enumerate(labels[14:])]
pins += [Pin(0,0,rectangle(-1.5/25.4,1.5/25.4,-4/25.4,4/25.4),'GND3',label_size=.02)]
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 AS5047D(Component):
_pad_TSSOP = rectangle(-.7/25.4,.7/25.4, -.2/25.4,.2/25.4)
hw = 5.55/25.4/2
pitch = .65/25.4
pins = [
Pin(-hw, 3*pitch,_pad_TSSOP,'CSn',label_size=.02),
Pin(-hw, 2*pitch,_pad_TSSOP,'CLK',label_size=.02),
Pin(-hw, 1*pitch,_pad_TSSOP,'MISO',label_size=.02),
Pin(-hw, 0*pitch,_pad_TSSOP,'MOSI',label_size=.02),
Pin(-hw,-1*pitch,_pad_TSSOP,'TEST',label_size=.02),
Pin(-hw,-2*pitch,_pad_TSSOP,'B',label_size=.02),
Pin(-hw,-3*pitch,_pad_TSSOP,'A',label_size=.02),
Pin( hw,-3*pitch,_pad_TSSOP,'W/PWM',label_size=.02),
Pin( hw,-2*pitch,_pad_TSSOP,'V',label_size=.02),
Pin( hw,-1*pitch,_pad_TSSOP,'U',label_size=.02),
Pin( hw, 0*pitch,_pad_TSSOP,'VDD',label_size=.02),
Pin( hw, 1*pitch,_pad_TSSOP,'VDD3V',label_size=.02),
Pin( hw, 2*pitch,_pad_TSSOP,'GND',label_size=.02),
Pin( hw, 3*pitch,_pad_TSSOP,'I/PWM',label_size=.02),
]
vias = []
prefix='IC'
shadow = s2d.rectangle(-2.25/25.4,2.25/25.4, -2.95/25.4,2.95/25.4)
class AS5047D_FLIP(Component):
_pad_TSSOP = rectangle(-.9/25.4,.9/25.4, -.2/25.4,.2/25.4)
hw = 5.55/25.4/2
pitch = .65/25.4
pins = [
Pin( hw, 3*pitch,_pad_TSSOP,'CSn',label_size=.02),
Pin( hw, 2*pitch,_pad_TSSOP,'CLK',label_size=.02),
Pin( hw, 1*pitch,_pad_TSSOP,'MISO',label_size=.02),
Pin( hw, 0*pitch,_pad_TSSOP,'MOSI',label_size=.02),
Pin( hw,-1*pitch,_pad_TSSOP,'TEST',label_size=.02),
Pin( hw,-2*pitch,_pad_TSSOP,'B',label_size=.02),
Pin( hw,-3*pitch,_pad_TSSOP,'A',label_size=.02),
Pin(-hw,-3*pitch,_pad_TSSOP,'W/PWM',label_size=.02),
Pin(-hw,-2*pitch,_pad_TSSOP,'V',label_size=.02),
Pin(-hw,-1*pitch,_pad_TSSOP,'U',label_size=.02),
Pin(-hw, 0*pitch,_pad_TSSOP,'VDD',label_size=.02),
Pin(-hw, 1*pitch,_pad_TSSOP,'VDD3V',label_size=.02),
Pin(-hw, 2*pitch,_pad_TSSOP,'GND',label_size=.02),
Pin(-hw, 3*pitch,_pad_TSSOP,'I/PWM',label_size=.02),
]
vias = [ Via(0,0, dogboned_rectangle( -2.75/25.4,2.75/25.4, -2.95/25.4,2.95/25.4, .017 ) ) ]
prefix='IC'
shadow = s2d.rectangle(-2.25/25.4,2.25/25.4, -2.95/25.4,2.95/25.4)
class Header_Stepper(Component):
''' For bipolar stepper
'''
_pad_header = chamfered_rectangle(-0.06, 0.06, -0.022, 0.022,.007)
pins = [
Pin(0, -0.15, _pad_header, 'A1'),
Pin(0, -0.05, _pad_header, 'A2'),
Pin(0, 0.05, _pad_header, 'B1'),
Pin(0, 0.15, _pad_header, 'B2'),
]
prefix = 'J'
vias = []
shadow = s2d.rectangle(-.06,8/25.4,-.18,.18)
class Button(Component):
''' SW262CT-ND
'''
rect = rectangle(-.75/25.4,.75/25.4,-.5/25.4,.5/25.4)
pins = [
Pin(-2/25.4,.8/25.4,rect),
Pin( 2/25.4,.8/25.4,rect),
Pin(-2/25.4,-.8/25.4,rect),
Pin( 2/25.4,-.8/25.4,rect)
]
prefix = 'button'
vias = []
shadow = rectangle(-2.1/25.4,2.1/25.4,-1.4/25.4,1.4/25.4)
class TagConnectSWD(Component):
'''
'''
_pad = s2d.circle(0,0,.5*.031)
_via = s2d.circle(0,0,.5*.039)
pins = [
Pin(-.05,-.025,_pad,'VCC',label_size=.012),
Pin( .00,-.025,_pad,'TX',label_size=.012),
Pin( .05,-.025,_pad,'RX',label_size=.012),
Pin(-.05,.025,_pad,'GND',label_size=.012),
Pin( .00,.025,_pad,'SWDIO',label_size=.012),
Pin( .05,.025,_pad,'SWDCLK',label_size=.012)
]
vias = [
Via(-.1,0,_via),
Via(.1,0.04,_via),
Via(.1,-.04,_via),
]
class BC832(Component):
#Fanstel BC832 micro nrf52 module
p = 1.1/25.4
pad_hw = .7/25.4
pad_hh = .34/25.4
_pad_lga = circle(0,0,.32/25.4)
_pad = rectangle(-pad_hw,pad_hw,-pad_hh,pad_hh)
c= 3.9/25.4
start_y = .618/25.4
y_os = .18
names = [
'GND','DFU','SWDIO','SWDCLK','P18','P13','P11','P12',
'A1','RESET','XL1','XL2','A0','P27','P26','VDD',
]
pins = [Pin(-c,start_y+i*p-y_os,_pad,n,label_size=.018) for i,n in enumerate(names[:8][::-1])]
pins += [Pin(c,start_y+i*p-y_os,_pad,n,label_size=.018) for i,n in enumerate(names[8:16])]
pins += [
Pin(-c+2.15/25.4,-y_os+.519/25.4,_pad_lga,'P8',label_size=.01),
Pin(-c+2.15/25.4,-y_os+(1.2+.519)/25.4,_pad_lga,'P6',label_size=.01),
#Pin(-c+2.15/25.4,-y_os+(2*1.2+.519)/25.4,_pad_lga,'A2',label_size=.01),
#Pin(-c+2.15/25.4,-y_os+(4*1.2+.519)/25.4,_pad_lga,'A4',label_size=.01),
#Pin(-c+2.15/25.4,-y_os+(3*1.2+.519)/25.4,_pad_lga,'',label_size=.01),
#Pin(-c+2.15/25.4+1.2/25.4,-y_os+(2*1.2+.519)/25.4,_pad_lga,'',label_size=.01),
#Pin(-c+2.15/25.4+1.2/25.4,-y_os+(3*1.2+.519)/25.4,_pad_lga,'',label_size=.01),
#Pin(-c+2.15/25.4+1.2/25.4,-y_os+(4*1.2+.519)/25.4,_pad_lga,'',label_size=.01),
#Pin(-c+2.15/25.4+2*1.2/25.4,-y_os+(3*1.2+.519)/25.4,_pad_lga,'',label_size=.01),
#Pin(-c+2.15/25.4+3*1.2/25.4,-y_os+(3*1.2+.519)/25.4,_pad_lga,'',label_size=.01)
]
vias = []
shadow = rectangle(-c,c,-y_os,8.8/25.4-y_os)
_pad_SOIC = s2d.rectangle(-.041,.041,-.015,.015)
class A4950(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 Regulator_SOT23(Component):
''' SOT23 voltage regulator
'''
_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 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 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 R_2512(Component):
_pad_2010 = chamfered_rectangle(-0.032, 0.032, -0.0625, 0.0625, .01)
''' 2010 Resistor
'''
pins = [Pin(-0.125, 0, _pad_2010), Pin(0.125, 0, _pad_2010)]
prefix = 'R'
vias = []
class M3_Hole(Component):
pins = [Pin(0,0,circle(0,0,.001))]
prefix='V'
vias = [Via(0,0,circle(0,0,1.55/25.4))]
shadow = circle(0,0,5.5/25.4/2)
class Hole(Component):
pins = [Pin(0,0,circle(0,0,0.01))]
vias = [Via(0,0,circle(0,0,.5*2.1/25.4))]
tap = circle(0,0,.5*1.9/25.5)
width = 42.3/25.4
height = 42.3/25.4
mid = width/2.
pcb = PCB(0,0,width,height,chamfer_distance=.12)
hole = M3_Hole(mid-15.5/25.4, mid-15.5/25.4)
pcb += hole
hole = M3_Hole(mid+15.5/25.4, mid-15.5/25.4)
pcb += hole
hole = M3_Hole(mid-15.5/25.4, mid+15.5/25.4)
pcb += hole
hole = M3_Hole(mid+15.5/25.4, mid+15.5/25.4)
pcb += hole
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)
step = Pheonix_WTB(.11,.66,90,'step')
pcb += step
pow = BarrelJackSMD(.63,height+.1,-90,'12V')
pcb += pow
#connectG(pow['GND'],-.1,0.01,width=.06)
pcb.connectV(pow['GND'],pow['GND2'],width=.09)
C_bulk = cap_UWT(pow.x-.4, pow.y-.63,-90,'100uF')
pcb += C_bulk
connectG(C_bulk['-'],-.02,.18,width=.05)
pcb.connectV(pow['V2'],pow['V'],width=.05)
pcb.connectD(pow['V2'],C_bulk['+'],width=.05)
pcb.connectV(C_bulk['-'],[pow['GND2'].x,pow['GND2'].y-.04],pow['GND2'],width=.06)
bc = BC832(width-.2,height-.62,-90,'Fanstel\nBC832\nNRF52')
pcb += bc
#reg = Regulator_SOT23(bc.x-.465,bc.y-.09,-180,'3.3v')
reg = Regulator_SOT23(pow.x+.39,pow.y-.28,-90,'3.3v')
pcb += reg
pcb.connectV(pow['V'],reg['IN'],width=.05)
connectG(reg['GND'],-.07,-.02,width=.03)
#pcb.connectD(reg['IN'],[reg['IN'].x-.09,reg['IN'].y+.02],pow['VCC'],width=.02)
C_in = C_1206(reg.x-.01,reg.y+.13,180,'Cin\n.1uF',label_size=.02)
pcb += C_in
C_out = C_1206(reg.x+.0,reg.y-.12,0,'Cout\n.1uF',label_size=.02)
pcb += C_out
pcb.connectD(C_in[1],[C_in[1].x,C_in[1].y+.01],reg['GND'])
pcb.connectV(reg['IN'],C_in[0],width=.02)
pcb.connectH(reg['OUT'],C_out[0],width=.02)
pcb.connectD(reg['GND'],C_out[1],width=.02)
swd = TagConnectSWD(bc.x-.27,bc.y+.25,-90,'swd')
pcb += swd
pcb.connectD(swd['SWDCLK'],[swd['SWDCLK'].x+.02,swd['SWDCLK'].y],[bc['SWDCLK'].x-.02,bc['SWDCLK'].y+.05],bc['SWDCLK'],width=.012)
pcb.connectD(swd['SWDIO'],[swd['SWDIO'].x+.02,swd['SWDIO'].y],[bc['SWDIO'].x-.03,bc['SWDIO'].y+.079],bc['SWDIO'],width=.012)
pcb.connectD(swd['GND'],[bc['GND'].x-.06,bc['GND'].y+.11],bc['GND'],width=.012)
pcb.connectD(bc['P6'],[bc['P6'].x,bc['P6'].y+.02],[swd['RX'].x+.05,swd['RX'].y-.1],[swd['RX'].x+.02,swd['RX'].y-.03],swd['RX'],width=.012)
pcb.connectD(bc['P8'],[swd['TX'].x+.02,bc['P8'].y-.0],[swd['TX'].x-.05,swd['TX'].y-.02],swd['TX'],width=.012)
connectG(swd['GND'],.05,.03)
button = Button(bc.x-.33,bc.y-.02,0)
pcb += button
#pcb.connectH(pow['GND'],[button[1].x-.06,button[1].y],button[1])
pcb.connectV(button[3],button[0])
pcb.connectV(button[1],button[2])
C2 = C_1206(reg.x+.12,reg.y+.07,-90,'C2\n10uF',label_size=.02)
pcb += C2
pcb.connectV(C2[1],C_in[1],width=.02)
pcb.connectH(C2[0],C_out[0],width=.02)
pcb.connectD(C2[0],[C2[0].x+.05,C2[0].y],[width-.1,height-.08],[bc['VDD'].x+.04,bc['VDD'].y+.03],bc['VDD'])
R1 = R_1206(button.x-.08,button[1].y+.18,90,'10k',label_size=.03)
pcb += R1
pcb.connectH(bc['RESET'],[bc['RESET'].x,bc['RESET'].y+.05],[button[2].x+.06,button[2].y],button[2],width=.012)
pcb.connectD(swd['VCC'],[swd['VCC'].x-.03,swd['VCC'].y],R1[0])
pcb.connectD(swd['VCC'],[swd['VCC'].x-.03,swd['VCC'].y],C_out[0])
pcb.connectD(R1[1],button[1])
pcb.connectD(button[3],[button[3].x-.04,button[3].y],C_out[1],width=.03)
#stepper
drv = DRV8825(step.x+.88,step.y-.02,0)
pcb += drv
pcb.connectD(drv['AOUT1'],[drv['AOUT1'].x-.15,drv['AOUT1'].y],step[4],width=.014)
pcb.connectD(drv['AOUT2'],[step.x+.33,drv['AOUT2'].y],step[3],width=.014)
pcb.connectD(drv['BOUT2'],[step.x+.33,drv['BOUT2'].y],step[2],width=.014)
pcb.connectD(drv['BOUT1'],[drv['BOUT1'].x-.06,drv['BOUT1'].y],step[1],width=.014)
RA = R_2512(drv['ISENA'].x-.34,drv['ISENA'].y-.1,90,'RA\n200mOhm',label_size=.03)
pcb += RA
RB = R_2512(drv['ISENB'].x-.20,drv['ISENB'].y-.15,90,'RB\n200mOhm',label_size=.03)
pcb += RB
pcb.connectD(drv['ISENA'],[drv['ISENA'].x-.2,drv['ISENA'].y],RA[0],width=.014)
pcb.connectD(drv['ISENB'],[drv['ISENB'].x-.2,drv['ISENB'].y],RB[0],width=.014)
pcb.connectV(RA[1],RB[1],width=.06)
connectG(RA[1],-.05,-.06)
pcb.connectH(drv['GND'],drv['GND3'],width=.014)
pcb.connectH(drv['GND2'],drv['GND3'],width=.014)
pcb.connectH(drv['MODE2'],drv['GND3'],width=.014)
CP = C_1206(drv['CP1'].x-.015,drv['CP1'].y+.12,0,'.01uF')
pcb += CP
pcb.connectD(drv['CP2'],[drv['CP2'].x-.05,drv['CP2'].y],CP[1],width=.014)
pcb.connectD(drv['CP1'],CP[0],width=.014)
pcb.connectD(drv['VMA'],[drv['VMA'].x-.12,drv['VMA'].y],[C_bulk['+'].x+.2,C_bulk['+'].y],C_bulk['+'],width=.014)
RCP = R_1206(C_bulk['+'].x+.25,C_bulk['+'].y-.1,0,'1MOhm')
pcb += RCP
CCP = R_1206(RCP.x,RCP.y-.1,0,'.1uF')
pcb += CCP
pcb.connectV(RCP[0],CCP[0],width=.05)
pcb.connectV(CCP[1],C_bulk['+'],width=.05)
pcb.connectD(drv['VCP'],[drv['VCP'].x-.08,drv['VCP'].y],CCP[0],width=.014)
pcb.connectD(drv['MODE1'],[drv['MODE1'].x+.05,drv['MODE1'].y],[bc['A1'].x-.02,bc['A1'].y-.05],bc['A1'],width=.014)
pcb.connectD(drv['MODE0'],[drv['MODE0'].x+.08,drv['MODE0'].y],[bc['XL1'].x-.03,bc['XL1'].y-.09],bc['XL1'],width=.014)
pcb.connectD(drv['STEP'],[drv['STEP'].x+.11,drv['STEP'].y],[bc['XL2'].x-.05,bc['XL2'].y-.13],bc['XL2'],width=.014)
pcb.connectD(drv['DIR'],[drv['DIR'].x+.11,drv['DIR'].y],[bc['A0'].x-.07,bc['A0'].y-.17],bc['A0'],width=.014)
pcb.connectD(drv['nSLP'],[drv['nSLP'].x+.11,drv['nSLP'].y],[bc['P27'].x-.09,bc['P27'].y-.21],bc['P27'],width=.014)
pcb.connectV(drv['nSLP'],drv['nRST'],width=.014)
pcb.connectV(drv['AVREF'],drv['BVREF'],width=.014)
pcb.connectD(drv['VMB'],[drv['VMB'].x-.04,drv['VMB'].y],[RB.x+.1,RB.y-.2],[step.x+.3,RB.y-.2],[step.x+.15,step.y+.25],C_bulk['+'],width=.014)
pcb.connectD([RB.x+.1,RB.y-.18],[step.x+.3,RB.y-.2],[step.x+.15,step.y+.25],C_bulk['+'],width=.04)
R_lp = R_1206(bc['P26'].x+.02,bc['P26'].y-.2,90,'Rlp')
pcb += R_lp
C_lp = R_1206(R_lp.x-.06,R_lp.y-.15,0,'Clp')
pcb += C_lp
pcb.connectV(R_lp[1],C_lp[0])
pcb.connectV(bc['P26'],R_lp[0])
pcb.connectD(drv['BVREF'],[drv['BVREF'].x-.05,drv['BVREF'].y],[drv['BVREF'].x-.07,drv.y-.2],[C_lp.x-.02,drv.y-.25],C_lp[0],width=.014)
pcb.connectD(drv['GND3'],[drv.x,drv.y-.15],[drv.x+.2,drv.y-.21],C_lp[1])
connectG(drv['GND3'],0,.2,width=.05)
pcb.connectD(button[3],[button[3].x,button[3].y-.1],drv['GND3'],width=.04)
cad.shapes = pcb.layout()
cad.shape = pcb.traces+(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