Source code for jitxexamples.components.fets_n_ch.BSS138

from jitx.anchor import Anchor
from jitx.feature import Courtyard, Custom, Paste, Silkscreen, Soldermask
from jitx.landpattern import Landpattern, Pad, PadMapping
from jitx.model3d import Model3D
from jitx.net import Port
from jitx.shapes.composites import rectangle
from jitx.shapes.primitive import Arc, ArcPolyline, Polygon, Polyline, Text
from jitx.symbol import Direction, Pin, Symbol, SymbolMapping
from jitx.component import Component as JITXComponent


[docs] class RectangleSmdPad(Pad): shape = rectangle(1.25, 0.7) solder_mask = [Soldermask(rectangle(1.352, 0.802))] paste = [Paste(rectangle(1.352, 0.802))]
[docs] class LandpatternSOT_23_3_L2_9_W1_3_P1_90_LS2_4_BR(Landpattern): name = "SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR" p = { 1: RectangleSmdPad().at((1, -0.9495)), 2: RectangleSmdPad().at((1, 0.9495)), 3: RectangleSmdPad().at((-1, -0.0005)), } pcb_layer_reference = Silkscreen(Text(">REF", 0.5, Anchor.W).at((-0.75, 3.3081))) pcb_layer_value = Custom( Text(">VALUE", 0.5, Anchor.W).at((-0.75, 2.3081)), name="Fab" ) silkscreen = [ Silkscreen( Polyline(0.152, [(0.726, 1.5265), (-0.726, 1.5265), (-0.726, 0.4945)]) ), Silkscreen( Polyline(0.152, [(0.726, -1.5265), (-0.726, -1.5265), (-0.726, -0.4945)]) ), Silkscreen(Polyline(0.152, [(0.726, 0.4555), (0.726, -0.4555)])), ] custom_layer = [ Custom(ArcPolyline(0.06, [Arc((1.2, -1.4505), 0.03, 0, -360)]), name="Fab"), Custom(ArcPolyline(0.2, [Arc((1.46, -1.1005), 0.1, 0, -360)]), name="Fab"), ] courtyard = [Courtyard(rectangle(3.352, 3.205))] model3ds = [ Model3D( "BSS138.stp", position=(0.0, 0.0, 0.0), scale=(1.0, 1.0, 1.0), rotation=(0.0, 0.0, 0.0), ) ]
[docs] class SymbolBSS138_C713688(Symbol): pin_name_size = 0.7874 pad_name_size = 0.7874 D = Pin((0, 2), 2, Direction.Up) G = Pin((-4, 0), 2, Direction.Left) S = Pin((0, -2), 2, Direction.Down) layer_reference = Text(">REF", 0.55559, Anchor.C).at((0, 3.57481)) layer_value = Text(">VALUE", 0.55559, Anchor.C).at((0, 2.78741)) draws = [ Polyline(0.254, [(-2, 1.4), (0, 1.4), (0, 2), (2, 2), (2, 0.4)]), Polyline(0.254, [(-2, 0), (0, 0), (0, -2), (2, -2), (2, -0.6)]), Polyline(0.254, [(0, -1.4), (-2, -1.4)]), Polyline(0.254, [(-2.4, 1.8), (-2.4, -1.8)]), Polyline(0.254, [(-2, 1.8), (-2, 1)]), Polyline(0.254, [(-2, -0.4), (-2, 0.4)]), Polyline(0.254, [(-2, -1.8), (-2, -1)]), Polyline(0.254, [(-4.00001, 0), (-2.4, 0)]), Polyline(0.254, [(2.80001, 0.4), (2.4, 0.4), (1.6, 0.4), (1.2, 0.4)]), Polygon([(-2, 0), (-0.8, 0.4), (-0.8, -0.4)]), Polygon([(2, 0.4), (1.4, -0.6), (2.60001, -0.6)]), ]
[docs] class BSS138(JITXComponent): manufacturer = "LGE" mpn = "BSS138" reference_designator_prefix = "Q" datasheet = "https://www.lcsc.com/datasheet/lcsc_datasheet_2008011839_LGE-BSS138_C713688.pdf" D = Port() G = Port() S = Port() landpattern = LandpatternSOT_23_3_L2_9_W1_3_P1_90_LS2_4_BR() symbol = SymbolBSS138_C713688() cmappings = [ SymbolMapping({D: symbol.D, G: symbol.G, S: symbol.S}), PadMapping({D: landpattern.p[3], G: landpattern.p[1], S: landpattern.p[2]}), ]
Device: type[BSS138] = BSS138