Source code for jitxexamples.components.audio_amps.PAM8302AADCR

from jitx import PadMapping
from jitx.anchor import Anchor
from jitx.component import Component
from jitx.landpattern import Landpattern, Pad
from jitx.layerindex import Side
from jitx.net import Port
from jitx.shapes.composites import rectangle
from jitx.shapes.primitive import Arc, ArcPolyline, Polyline, Text
from jitx.feature import Finish, Paste, Silkscreen, Soldermask
from jitxlib.symbols.box import BoxSymbol, Row, PinGroup


[docs] class OvalSMDPad(Pad): # Using rectangle as approximation for oval/capsule shape rect = rectangle(0.629997, 1.864999) shape = rect layer = Paste(rect) layer = Soldermask(rect)
[docs] class C112137(Landpattern): p = { 1: OvalSMDPad().at(-1.905, -2.682, on=Side.Top), 2: OvalSMDPad().at(-0.635, -2.682, on=Side.Top), 3: OvalSMDPad().at(0.635, -2.682, on=Side.Top), 4: OvalSMDPad().at(1.905, -2.682, on=Side.Top), 5: OvalSMDPad().at(1.905, 2.682, on=Side.Top), 6: OvalSMDPad().at(0.635, 2.682, on=Side.Top), 7: OvalSMDPad().at(-0.635, 2.682, on=Side.Top), 8: OvalSMDPad().at(-1.905, 2.682, on=Side.Top), } ref_text = Silkscreen(Text(">REF", 1.0, Anchor.C).at(0.0, 4.682499)) value_text = Finish(Text(">VALUE", 1.0, Anchor.C).at(0.0, -4.682499)) ref_alt_text = Finish(Text("REF**", 1.0, Anchor.C).at(0.0, -6.682499)) silk_lines = [ Silkscreen(Polyline(0.1524, [(2.576, -1.521), (-2.576, -1.521)])), Silkscreen(Polyline(0.1524, [(2.576, 1.521), (2.576, -1.521)])), Silkscreen(Polyline(0.1524, [(-2.576, -1.521), (-2.576, 1.521)])), Silkscreen(Polyline(0.1524, [(-2.576, 1.521), (2.576, 1.521)])), ] silk_arcs = [ Silkscreen(ArcPolyline(0.3, [Arc((-2.672, -2.682), 0.150, 0.0, 360.0)])), Silkscreen(ArcPolyline(0.059995, [Arc((-2.45, -3.0), 0.03, 0.0, 360.0)])), Silkscreen(ArcPolyline(0.3, [Arc((-1.9, -0.77), 0.150, 0.0, 360.0)])), ] finish_arc = Finish(ArcPolyline(0.3, [Arc((-1.905, -3.40), 0.150114, 0.0, 360.0)]))
# model = Model3D( # "../../3d-models/C112137.wrl", # position=(0, 0, 0), # scale=(1, 1, 1), # rotation=(0, 0, -90) # )
[docs] class PAM8302AADCR(Component): """2.5W Filterless Class-D Mono Audio Amplifier""" mpn = "PAM8302AADCR" reference_designator_prefix = "U" # Audio amplifier pins SD = Port() # Shutdown pin (active low) NC = Port() # No connect IN_plus = Port() # Positive input IN_minus = Port() # Negative input VO_plus = Port() # Positive output VDD = Port() # Power supply GND = Port() # Ground VO_minus = Port() # Negative output landpattern = C112137() symbol = BoxSymbol( rows=[ Row(left=[PinGroup([SD, NC, IN_plus, IN_minus])]), Row(right=[PinGroup([VO_plus, VDD, GND, VO_minus])]), ] ) # Pin mappings based on the pin-properties from the original Stanza file mappings = [ PadMapping( { SD: [landpattern.p[1]], # Shutdown pin to pad 1 NC: [landpattern.p[2]], # No connect to pad 2 IN_plus: [landpattern.p[3]], # Positive input to pad 3 IN_minus: [landpattern.p[4]], # Negative input to pad 4 VO_plus: [landpattern.p[5]], # Positive output to pad 5 VDD: [landpattern.p[6]], # Power supply to pad 6 GND: [landpattern.p[7]], # Ground to pad 7 VO_minus: [landpattern.p[8]], # Negative output to pad 8 } ), ] # Property for datasheet URL datasheet = "https://datasheet.lcsc.com/lcsc/1809192027_Diodes-Incorporated-PAM8302AADCR_C112137.pdf"
Device: type[PAM8302AADCR] = PAM8302AADCR