main module#

The diplexer board: outline, holes, placement, code routes and copper.

Every coordinate below is the board frame: origin at the board centre, +x right, +y up, mm. The element order is the approved rough path’s. Nothing is left to a placer: every part, route, via and pour is fixed in code.

Layout, from J1 (COMMON) to the junction tee and out along the two arms:

  • COMMON: an RS_50 line from J1’s launch point along y = -0.125 to the tee.

  • HIGH arm, along +x from the tee: C1 (series), node C with the C5 branch, C2 (series), node D with the C6 branch, then an RS_50 line to J3’s launch point. HIGH branches leave toward +y.

  • LOW arm, along -y from the tee: L1 (series), node A with the C3 branch, L2 (series), node B with the C4 branch, then an RS_50 line to J2’s launch point. LOW branches leave toward -x.

Geometry is derived from a small set of named constants (*_CENTRE for the series parts, NODE_* for the take-off points, *_LINE for the branch lengths). Those are the numbers the run’s HFSS campaign tuned.

Rules (one ladder, priorities in brackets; the line’s four are lines’):

  • [2] RFLineTag on the five signal nets applies a copy of the substrate’s RS_50 with a one-row via fence on each side (the substrate class is not ours to edit). The copy keeps RS_50’s width, velocity and loss.

  • [2] (RFLineTag, CoplanarGroundTag) sets the coplanar gap to the top pour. The runtime stands a pour POUR_GAP_OFFSET (0.01 mm, measured in layout_cpwg_two_row_fence) past the winning clearance, so the copy and this rule ask for 0.12 mm and the realized gap is RS_50’s 0.13 mm. No board-wide clearance above it exists, so nothing widens the gap (substrate docstring).

  • [3] (LaunchPadTag, CoplanarGroundTag): the pour stands lines.LAUNCH_PAD_GAP (the line’s 0.13 mm) off each jack’s centre pad.

  • [4] ExitNeckTag on each exit’s neck: the neck structure and its gap (lines, the run’s launch tuning). The net’s pair rule did not reach the pad: the pour stood at the 0.10 mm floor (0.11 realized) beside it.

  • [4] BranchTag on each branch Route applies the 0.20 mm branch structure, beating the net’s RS_50.

  • [5] (BranchTag, CoplanarGroundTag) at 0.8 mm holds the top pour off each branch line and each branch capacitor (the tag is on the part, so on its hot pad; its ground pad is on the pour’s own net).

  • The node A stub is node copper, not a branch line: it carries no BranchTag, so its net’s (RFLineTag, CoplanarGroundTag) rule holds the pour RS_50’s coplanar gap off it, and its via keepout is that gap.

  • StitchTag on the top pour: a StdVia grid stitching it to the bottom plane.

The branch keep-off rule measures from the whole branch route, which starts at its node on the arm line’s centreline, so on its own it pulls the top pour back across the arm line too. Below node B the LOW line’s far side (+x, away from the C4 branch) carries its own GND pour (low_line_ground), untagged for the branch rule, so RS_50’s clearance alone sets its edge: the realized gap is the line’s 0.13 mm from node B to LOW_GAP_END_Y. On the branch side the 0.8 mm band under the C4 branch line reaches that same y, so the gap there resumes at the band’s end.

Via keepouts (via=True only) cover each line’s path and gap from the board edge, each branch and its 0.8 mm keep-off, each jack ground pad (the stitch grid’s StdVia is not a via-in-pad via), and a disc round every code-placed via, so no generated via lands where a line will route, in a solder pad, or nearer a drill than min_hole_to_hole.

Body keepouts (pour=True, via=True, top copper) sit under each of the eight 0402 parts: its vendor body at the drawing’s largest size (bodies) grown by BODY_CLEARANCE, in the part’s own frame. Without them the ground pour, held off the signal pads only by the 0.12 mm coplanar rule, filled the 0.54 mm gap between each series part’s lands: a ground strip under the body between two signal lands, a defect on a real board (bridging risk under the part, a shunt path across it) and in the run’s solves (one of them shorted C2 and L2).

Each port is a Würth 60312202114514 edge-launch jack on its board edge, launched as rf_connector_launch (jitxexamples.patterns) does: the jack’s origin on the edge with its +x into the board, a straight RS_50 exit from the centre pad to a launch point on the pad’s axis, and a pour-and-via keepout cutting the bottom ground under the centre pad and the start of the exit. Each jack’s top and bottom ground pads (the part straddles the edge) are joined by a row of open in-pad vias, plated but not filled or capped, since JLCPCB fills no via on its Rogers boards, and each pad lies in its layer’s pour. The launch geometry and its objects are launch’s.

Top soldermask (rf_mask_openings): open over every signal conductor and its coplanar slot. Each 50 ohm path, board edge to tee (the jack’s centre pad, exit and neck, the line, the series parts’ lands, the node copper), opens rf_slot_half_width() either side of its axis: the widest signal copper on it plus the coplanar gap, plus mask_reach() onto the ground beyond. Each branch line opens from its node to its capacitor’s hot pad at its own half width plus mask_reach(); its 0.8 mm keep-off stays under mask. The node A stub on C3’s hot land opens at its own outline plus its coplanar gap plus mask_reach(). The lands keep their own openings.

Fabrication: the jacks’ pads run to the board edge as the data sheet draws them, an exemption from the 0.20 mm edge floor for those pads only, which the runbook grants. The fab notes (fab/fab-notes.txt beside this module) go to JLCPCB with the exported packet.

BOARD_SIZE = 31.75#

the ZDPLX-592-S+ case outline (runbook requirements).

Type:

Board outline, a square centred on the origin

MOUNTING_HOLE_DIAMETER = 3.18#

Non-plated mounting holes (runbook requirements).

MOUNTING_HOLES = ((-12.7, 12.7), (12.7, -12.7))#

top-left and bottom-right, 25.40 mm apart each way (runbook requirements).

Type:

Mounting hole centres

J1_AT = JackPlacement(x=-15.875, y=-0.125, rotate=0)#

origin on the left edge, 16.00 mm from the top edge, +x into the board (runbook requirements).

Type:

COMMON jack

J2_AT = JackPlacement(x=0.125, y=-15.875, rotate=90)#

origin on the bottom edge, 16.00 mm from the left edge, +x (into the board) along board +y.

Type:

LOW jack

J3_AT = JackPlacement(x=15.875, y=-0.125, rotate=180)#

origin on the right edge, 16.00 mm from the top edge.

Type:

HIGH jack

TEE = (0.125, -0.125)#

where the COMMON line meets the LOW arm’s axis.

Type:

The junction tee

PAD_OUTER = 0.75#

each pad’s outer edge, from the part centre along its axis, mm.

Type:

0402 land pattern (jitxlib SMT("0402"), as the passives resolve)

PAD_INNER = 0.27#

each pad’s inner edge, from the part centre, mm.

Type:

0402 land pattern

PAD_HALF_WIDTH = 0.3#

each pad’s half width across the part axis, mm.

Type:

0402 land pattern

MIN_BRANCH_SPACING = 3.0#

Least distance between the two take-off points on one arm (the run’s layout assumption).

C3_LINE = 0.65#

Branch line length at node A, arm-line copper edge to C3’s pad edge, mm.

C4_LINE = 2.4#

Branch line length at node B, to C4, mm.

C5_LINE = 2.92#

Branch line length at node C, to C5, mm.

C6_LINE = 6.76#

Branch line length at node D, to C6, mm.

L1_CENTRE = 1.125#

L1 centre, from the tee along the LOW arm.

NODE_A = 1.975#

Node A take-off, from the tee along the LOW arm.

L2_CENTRE = 3.475#

L2 centre, from the tee along the LOW arm.

NODE_B = 4.975#

Node B take-off, from the tee along the LOW arm.

C1_CENTRE = 1.125#

C1 centre, from the tee along the HIGH arm.

NODE_C = 1.975#

Node C take-off, from the tee along the HIGH arm.

C2_CENTRE = 3.475#

C2 centre, from the tee along the HIGH arm.

NODE_D = 4.975#

Node D take-off, from the tee along the HIGH arm.

BRANCH_WIDTH = 0.2#

0.20 mm printed line).

Type:

Branch line width (the approved rough path

BRANCH_EEFF = 2.55#

128 ohm, eeff 2.55).

Type:

Branch line effective permittivity (the approved rough path

BRANCH_IMPEDANCE = 128#

Branch line impedance (the approved rough path), a label on the width.

BRANCH_POUR_CLEARANCE = 0.8#

at least 0.8 mm, so the branch matches the microstrip model the rough path sized it with.

Type:

Top pour to each branch line and branch capacitor

NODE_A_STUB_LENGTH = 0.7#

how far it runs past C3’s hot land, across the land’s axis toward L2 (board -y), mm. Its width is the land’s length along the axis (PAD_OUTER - PAD_INNER).

Type:

Node A shunt stub

LOW_GAP_END_Y = -5.999999999999999#

Board y where the C4 branch line’s 0.8 mm band ends below the LOW line, mm: node B less the branch half width and the keep-off (-6.0).

TIP_VIA_HALF_PITCH = 0.4#

Each branch capacitor’s two ground vias sit this far either side of its axis: centres 0.80 apart, so the 0.3 drills keep 0.50 apart, over the substrate’s 0.45 min_hole_to_hole.

TIP_VIA_SETBACK = 0.35#

the 0.4 via pad stands 0.15 off the pad (StdVia is not for via-in-pad).

Type:

From the ground pad’s outer edge to the tip vias’ centres

TIP_COPPER_HALF_WIDTH = 0.6#

it covers the via pads (0.40 + 0.20).

Type:

Half width of the ground copper joining the pad to its vias

BODY_CLEARANCE = 0.1#

the fabricator’s least copper-to-copper space (JLCPCB HF, 0.10 mm, jitxlib.jlcpcb.rules.JLCPCBRogersRules), so no pour or via comes nearer the body than the board lets any two foreign coppers stand.

Type:

Body keepout margin past each chip body’s largest outline, mm

class ArmGeometry(direction, branch_direction, series_1, node_1, series_2, node_2, line_1, line_2)[source]#

Bases: object

One arm’s layout from the tee: a unit direction along the arm, a unit direction for its branches, and distances along it.

Parameters:
direction: tuple[float, float]#
branch_direction: tuple[float, float]#
series_1: float#
node_1: float#
series_2: float#
node_2: float#
line_1: float#
line_2: float#
point(s)[source]#

The arm’s centreline point s from the tee.

Return type:

tuple[float, float]

Parameters:

s (float)

series_rotation()[source]#

Rotation putting a two-pin part’s p1 (its +y) toward the tee.

Return type:

float

tip_rotation()[source]#

Rotation putting a branch capacitor’s p1 (its +y) toward the arm.

Return type:

float

offset(node, reach)[source]#

The point reach from the arm’s centreline at node, along the branch direction.

Return type:

tuple[float, float]

Parameters:
tip_centre(node, line, arm_half_width)[source]#

Centre of the branch capacitor at node: past the arm copper edge by line, then the hot pad’s outer edge to the part centre.

Return type:

tuple[float, float]

Parameters:
HIGH_ARM = ArmGeometry(direction=(1.0, 0.0), branch_direction=(0.0, 1.0), series_1=1.125, node_1=1.975, series_2=3.475, node_2=4.975, line_1=2.92, line_2=6.76)#

along +x, branches toward +y.

Type:

HIGH arm

LOW_ARM = ArmGeometry(direction=(0.0, -1.0), branch_direction=(-1.0, 0.0), series_1=1.125, node_1=1.975, series_2=3.475, node_2=4.975, line_1=0.65, line_2=2.4)#

along -y, branches toward -x.

Type:

LOW arm

class BranchTag[source]#

Bases: Tag

Branch line routes and branch capacitors: 0.8 mm off the pour; the routes 0.20 mm.

node_bridge(arm, line_width)[source]#

The copper joining an arm’s first series part to its first node, board frame: from the far pad’s centre to the node, on the half of the line away from the branch. The router treats this copper as an obstacle, so any of it on the branch’s side bends the branch round its corner.

Return type:

Shape

Parameters:
mask_reach()[source]#

How far a top-mask opening runs past the edge of the copper or slot it exposes, mm: the fabricator’s mask expansion (solder_mask_registration, 0 on JLCPCB’s Rogers process, “Soldermask Expansion 1:1”) plus FLOOR_MARGIN, so the opening’s edge never coincides with the slot’s ground edge.

Return type:

float

rf_slot_half_width()[source]#

Half width of the top-mask opening along each 50 ohm path, mm: the widest signal copper on it (the jack’s centre pad, the RS_50 trace or a 0402 land) plus the larger coplanar gap (line or launch pad), plus mask_reach().

Return type:

float

node_a_stub(grow=0.0)[source]#

The node A stub in a branch capacitor’s land-pattern frame (lands’ axis along y, hot land p1 at +y, width along x), grown by grow on every side. It covers the hot land from its centreline out to NODE_A_STUB_LENGTH past its +x edge (board -y once C3 is placed), so the copper beyond the land is PAD_OUTER - PAD_INNER by NODE_A_STUB_LENGTH and fused to the land.

Return type:

Shape

Parameters:

grow (float)

placed_at(xform, shape)[source]#

shape moved into the frame xform.

Return type:

Shape

Parameters:
class TipGround(start)[source]#

Bases: Circuit

A branch capacitor’s ground: two StdVia beyond its ground pad (p2, the part’s -y pad) and copper joining them to the pad. Placed with the capacitor’s own transform.

The copper starts start from the part centre, the end of the part’s body keepout: it is wider than the pad, so nearer in it would lie beside the land under the body. It overlaps the pad’s outer end from there.

Parameters:

start (float)

gnd = Port()#
class DiplexerBoardCircuit[source]#

Bases: Circuit

The network placed, routed and poured.

class DiplexerBoard[source]#

Bases: Board

31.75 mm square, centred on the origin.

shape: Shape = Polygon(elements=((15.875, 15.875), (-15.875, 15.875), (-15.875, -15.875), (15.875, -15.875)), holes=())#

The board outline shape.

class Diplexer(*args, **kwargs)[source]#

Bases: Design

The ZDPLX-592-S+ beater diplexer board.

substrate: Substrate = DiplexerSubstrate()#
board: Board = DiplexerBoard()#
circuit: Circuit = DiplexerBoardCircuit()#