#import "lib/unify.typ": qty, qtyrange
#import "@preview/cetz:0.5.2"

= Mechanical specifications <mechanical-specifications>

== Modules <modules>

=== Cassette <cassette>

==== Shielding and construction <shielding-and-construction>

To achieve metrologic tier precision, modules must be fully shielded from
external interference. The only entry points for noise are:

- The DB-25 and BNC connectors at the rear, which connects via a shielded cable
  to the power distribution board
- The banana jacks at the front panel, which include input protection circuits.

Modules must also not pollute neighboring modules with internally generated
noise (such as PWAM oscillators). For this reason, all modules are enclosed in
individual steel cassettes.

We chose steel instead of aluminum, as it has better shielding properties,
especially in terms of magnetic shielding.

#include "tables/cassette-construction-parameters.typ"

==== External dimensions <cassette-external-dimensions>

#include "diagrams/cassette-external-dimensions.typ"

#include "tables/cassette-external-dimensions.typ"

The panel lips extend above and below the cassette body to fill the full
$qty(4, "U")$ rack opening while the body fits between the chassis rails.

==== Construction <cassette-construction>

The cassette consists of the front panel, one L-shaped steel channel and one
interlocking U-shaped steel channel:

===== L-channel (chassis) <l-channel-chassis>

#include "diagrams/l-channel-chassis.typ"

/ Role: Structural spine. Holds the PCB and Front Panel.
/ Geometry:
  / Left wall ($qty(165.1, "mm") times qty(152.4, "mm")$): PCB mounts here.
  / Rear closure ($qty(165.1, "mm") times qty(35.7, "mm")$): Includes DB-25 and
    BNC cutouts.
    / DB-25 cutout: Center X: $qty(17.85, "mm")$ (centered). Center Y:
      $qty(55.0, "mm")$ from bottom edge.
    / BNC cutout: Center X: $qty(17.85, "mm")$ (centered). Center Y:
      $qty(130.0, "mm")$ from bottom edge.
      / Facultative: Required only for modules utilizing the Master Oscillator.
        If absent, the steel surface remains solid to maintain maximum shielding
        integrity.
/ Flanges (The Mounting Points):
  - The Left Wall features Top, Bottom and Front flanges folded
    $qty(90, "degree")$ inward.
  - The Rear Wall features Top, Bottom, and Right flanges folded
    $qty(90, "degree")$ inward.
  - The flanges are $qty(8, "mm")$.
/ Threads: These flanges must be fitted with M3 Press-Fit Threaded Inserts (PEM
  Nuts) or similar clinching fasteners.
  / Why: The $qty(1.2, "mm")$ steel is too thin to tap reliably for repeated
    use. Inserts ensure the threads don't strip after years of maintenance.
/ Finish: The outer face of these flanges must be masked (unpainted) to ensure
  electrical contact with the U-Channel and the front panel.

===== U-channel (cover) <u-channel-cover>

#include "diagrams/u-channel-cover.typ"

/ Role: EMI Shielding and Protection.
/ Geometry:
  / Top ($qty(35.7, "mm") times qty(152.4, "mm")$): vented
  / Right side wall ($qty(165.1, "mm") times qty(152.4, "mm")$):
  / Bottom ($qty(35.7, "mm") times qty(152.4, "mm")$): vented
/ Holes: Features Countersunk Through-Holes corresponding to the L-Channel's
  threaded inserts.
/ Finish: The inner face contact area must be masked (unpainted).

===== Front panel <front-panel>

#include "diagrams/front-panel.typ"

/ Geometry: $qty(177.8, "mm") times qty(38.0, "mm")$, body section
  $qty(165.1, "mm")$
/ Holes: Features Countersunk Through-Holes corresponding to the L-Channel's
  threaded inserts.
/ Finish: The inner face contact area must be masked (unpainted).

===== Fasteners <fasteners>

/ Type: M3 Countersunk (Flat Head) Screws (Black Oxide).
/ Flushness: Screw heads must sit flush with the external surface to prevent
  snagging when sliding the module into the rack.
/ Spacing: Screws should be spaced no more than $qty(40, "mm")$ apart along the
  seams to ensure the "slot antenna" effect does not compromise shielding at
  high frequencies ($gt qty(1, "GHz")$). There are $5$ screws per vertical
  flange, seam, and $4$ per horizontal seam.

===== Grounding requirements <cassette-grounding-requirements>

To prevent the cassette from acting as a floating antenna, the enclosure must
maintain a low-impedance electrical connection to the chassis earth. The
connection is made at the DB-25 port and the rear BNC connector shell if
present. The mounting holes must be masked during powder coating, or star
washers be used to screw it in place.

The BNC connector shell must be bonded to the steel cassette (masking required).
The signal carried by the BNC (10MHz) is referenced to the BNC shell (Chassis
Earth/RF Ground), not AGND, to prevent high-frequency injection into the
precision analog ground plane.

To ensure the connections actually block noise (RF), masking is mandatory: The
powder coat is an insulator. There must be masking (no paint) on the outer face
of all L-Channel flanges and the corresponding inner face of the U-Channel and
Panel.

When the screws are tightened, metal-to-metal contact must be achieved around
the entire perimeter of the seam. If paint blocks this contact, the shielding
will fail, degrading the SNR below the $qty(90, "dB")$ target.

==== Internal dimensions <cassette-internal-dimensions>

#include "tables/cassette-internal-dimensions.typ"

==== Ventilation <cassette-ventilation>

Top and bottom faces include ventilation slots for convective cooling while
maintaining EMI shielding.

#include "diagrams/cassette-ventilation.typ"

#include "tables/cassette-ventilation.typ"

==== DB-25 connector cutout <db-25-connector-cutout>

#include "diagrams/db-25-connector-cutout.typ"

#include "tables/db-25-connector-cutout.typ"

==== PCB dimensions <cassette-pcb-dimensions>

The PCB is sized to fit within the L-Channel side wall while leaving clearance
for the interlocking U-Channel flanges and internal cabling.

/ PCB Height: $qty(155.0, "mm")$
/ PCB Depth: $qty(125.0, "mm")$
/ PCB Thickness: $qty(1.6, "mm")$ (Standard FR-4)
/ Orientation: Mounted vertically on the internal Left Wall.

===== PCB mounting geometry <cassette-pcb-mounting-geometry>

The cassette Left Wall shall feature four ($4$) permanently attached female
threaded standoffs (M3) to accept the PCB.

/ Standoff Type: M3 Thread, 6mm Height (swaged or welded to the steel wall).
/ Mounting Pattern: Rectangular, centered on the cassette side wall.
  / Vertical Spacing (Y): $qty(135.0, "mm")$
  / Horizontal Spacing (X): $qty(105.0, "mm")$
/ Origin Reference: Pattern is centered relative to the internal side wall
  dimensions ($qty(165.1, "mm") times qty(150, "mm")$).

===== Keep-out zones <cassette-pcb-keep-out-zones>

To prevent electrical shorts against the steel chassis or mechanical
interference:

/ Perimeter Clearance: A 5mm component-free zone must be maintained along all
  four edges of the PCB.
/ Height Clearance: Components taller than 30mm are prohibited to ensure airflow
  and prevent shorting against the opposing Right Wall (total internal width is
  $qty(35.7, "mm")$. If tall components must be used, they must be assembled
  parallel to the PCB.

===== Interconnect layout (wire harness strategy)
<interconnect-layout-wire-harness-strategy>

Since the DB-25 is panel-mounted with solder cups and controls are on the front
panel, the PCB layout must optimize cable routing to minimize noise pickup and
maximize air flow.

/ Zone A (Rear - power):
  / Function: Connection to the rear DB-25 backplane connector.
  / Location: Rear $qty(20, "mm")$ of the PCB.
  / Connector Type: Pluggable terminal block (e.g., Phoenix Contact
    $qty(3.5, "mm")$) or latching header (e.g., Molex KK $qty(3.96, "mm")$).
    Direct soldering of flying leads to the PCB is discouraged to maintain
    repairability.
  / Pinout: Must match the standard SAME Power Distribution definition.
/ Zone B (Front - I/O):
  / Function: Connection to Front Panel Banana Jacks and Potentiometers.
  / Location: Front $qty(20, "mm")$ of the PCB.
  / Routing: Cables should form a neat loom transitioning from the PCB edge to
    the panel components.
  / Service Loop: All internal cabling must have a service loop of
    $plus qty(20, "mm")$ to allow the PCB to be unscrewed and slightly lifted
    without desoldering.

===== Grounding & Isolation Strategy
<cassette-pcb-grounding-and-isolation-strategy>

To maintain the strict separation of Analog Ground (AGND) and Chassis Earth, the
PCB must be electrically isolated from the steel cassette.

/ PCB Mounting Holes: Must be unplated and isolated from all internal ground
  planes (AGND/DGND). The metal standoffs serve only as mechanical support, not
  electrical conductors for the circuit.
/ Cassette Earth Path: The steel cassette connects to Chassis Earth exclusively
  via the rear DB-25 Connector.
  / Implementation: The DB-25 panel-mount connector must have a conductive metal
    shell. When mounted to the rear steel panel, the connector shell (and Pin
    $25$) creates the bond between the cable shield and the cassette body.
  / Verification: Resistance between the DB-25 Shell and any point on the
    cassette powder-coat-free zones must be $lt qty(0.1, "ohm")$.

=== PCB <pcb>

==== Overview <pcb-overview>

Module PCBs mount vertically within the L-channel, attached to the left side
wall via standoffs. The PCB connects to the front panel (banana jacks, controls)
via wire harnesses and to the power distribution board via the rear DB-25
connector.

==== Standard dimensions <pcb-standard-dimensions>

#include "tables/pcb-standard-dimensions.typ"

==== Board stackup <pcb-board-stackup>

All SAME module PCBs shall use a 4-layer stackup: This allows proper ground
management, while remaining easy to solder with standard equipment.

#include "tables/pcb-board-stackup.typ"

/ Dielectric: FR-4, $"Tg" gt.eq qty(135, "dC")$

==== Surface finish <pcb-surface-finish>

#include "tables/pcb-surface-finish.typ"

===== Rationale <pcb-surface-finish-rationale>

ENIG provides excellent corrosion resistance for the 50-year service life
target. A flat surface ensures reliable soldering of precision components. Gold
does not oxidize, maintaining consistent contact resistance at test points.

Black solder mask reduces light reflectivity (some precision semiconductors are
photosensitive).

==== Earth ring <pcb-earth-ring>

The PCB shall include a Chassis Earth ring around the perimeter of the bottom
layer (L4). This ring provides a defined path for any capacitively-coupled noise
to drain to chassis earth rather than coupling into signal traces.

===== Geometry <pcb-earth-ring-geometry>

#include "tables/pcb-earth-ring-geometry.typ"

===== Connection <pcb-earth-ring-connection>

The earth ring shall not connect to AGND or DGND on the PCB. It connects to
Chassis Earth exclusively through the pin 25 of the DB-25 power distributor via
a trace on L4.

===== Mounting holes details <pcb-earth-ring-mounting-holes-details>

The four mounting holes shall be:

- Unplated, isolated through-holes, $diameter qty(3.2, "mm")$ (M3 clearance).
- Not connected to any layer (no vias to L1, L2, L3, L4).

==== Ground planes <pcb-ground-planes>

===== AGND plane <pcb-ground-planes-agnd-plane>

#include "tables/pcb-ground-planes-agnd-plane.typ"

The AGND plane provides:
- Low-impedance return path for analog signals,
- Shielding between signal layers,
- Thermal spreading.

===== DGND zone (if needed) <pcb-ground-planes-dgnd-zone>

#include "tables/pcb-ground-planes-dgnd-zone.typ"

==== Power planes <pcb-power-planes>

Layer 3 is divided into power distribution zones:

#include "tables/pcb-power-planes.typ"

Design rules:
- Miminum $qty(2, "mm")$ clearance between power zones,
- Star distribution from power enty point,
- Bulk decoupling capacitors from power enty point,
- Local decoupling at each IC.

==== Mounting strategy <pcb-mounting-strategy>

The PCB mounts to the L-channel left wall via four standoffs.

#include "tables/pcb-mounting-strategy.typ"

===== Mounting holes pattern <pcb-mounting-strategy-mounting-holes-pattern>

#include "tables/pcb-mounting-strategy-mounting-holes-pattern.typ"

====== Positions <pcb-mounting-strategy-mounting-holes-positions>

#include "tables/pcb-mounting-strategy-mounting-holes-positions.typ"

==== Keep-out zones <pcb-keep-out-zones>

===== Perimeter keep-out <pcb-keep-out-zones-perimeter-keep-out>

#include "tables/pcb-keep-out-zones-perimeter-keep-out.typ"

===== Mounting holes keep-out <pcb-keep-out-zones-mounting-holes-keep-out>

#include "tables/pcb-keep-out-zones-mounting-holes-keep-out.typ"

==== Interconnect zones <pcb-interconnect-zones>

===== Zone A: power and master oscillator entry (rear) <pcb-interconnect-zones-zone-a>

#include "tables/pcb-interconnect-zones-zone-a.typ"

====== Pin assignment <pcb-interconnect-zones-zone-a-pin-assignment>

The PCB connector shall provide access to all power rails in a logical grouping:

#include "tables/pcb-interconnect-zones-zone-a-pin-assignment.typ"

Not all modules require all signals. Unused positions may be omitted from the
harness.

===== Zone B: front panel I/O <pcb-interconnect-zones-zone-b>

#include "tables/pcb-interconnect-zones-zone-b.typ"

Design guidelines:
- Group outputs on one side, inputs on the other,
- Maintain signal flow from right to left (input #sym.arrow.r processing
  #sym.arrow.r output),
- Include test points for each signal node.

===== Service loop requirements <pcb-interconnect-zones-zone-b-service-loop-requirements>

All internal wiring shall include a service loop of minimum $qty(20, "mm")$
additional length. This allows the PCB to be:
- Unscrewed from standoffs,
- Tilted or lifted for inspection,
- Accessed for rework.

Without disconnecting the wire harnesses.

==== Silkscreen requirements <pcb-silkscreen-requirements>

===== Component side (L1 - top) <pcb-silkscreen-requirements-l1>

#include "tables/pcb-silkscreen-requirements-l1.typ"

Labels should be functional if possible, defaults to $R_1$, $C_1$, $U_1$, etc.
if there are space constraints.

===== Solder side (L4 - bottom) <pcb-silkscreen-requirements-l4>

#include "tables/pcb-silkscreen-requirements-l4.typ"

==== Electrical testing <pcb-electrical-testing>

All PCBs shall pass the following tests before assembly:

#include "tables/pcb-electrical-testing-requirements.typ"

=== Panels <panels>

==== Geometry <panels-geometry>

The front panel is a separate piece that attaches to the L-channel via countersunk screws.

#include "tables/panels-geometry.typ"

===== Panels zones <panels-zones>

#include "tables/panels-zones.typ"

==== Grid <panels-grid>

All panel-mounted components follow a $qty(0.75, "inch")$ ($qty(19.05, "mm")$)
grid for compatibility with standard banana jack spacing and shorting bars.

#include "diagrams/panels-grid.typ"

===== Origin <panels-grid-origin>

#include "tables/panels-grid-origin.typ"

===== Positions <panels-grid-positions>

#include "tables/panels-grid-positions.typ"

===== Component placement rules <panels-grid-component-placement-rules>

#include "tables/panels-grid-component-placement-rules.typ"

====== Off-grid placements

+ Small indicators (LEDs) and labels may be placed between grid positions.
+ Non-specified components (controls, interface ports, etc.) should be centered
  on grid positions if possible, or centered on the panel.
+ Mounting screws for the panel (into L-channel flanges) are outside the grid
  area.

==== Labelling <panels-labelling>

All panels shall include clear, permanent labelling for user operation.

#include "tables/panels-labbeling.typ"

===== Jacks color coding <panels-jacks-color-coding>

#include "tables/panels-jacks-color-coding.typ"

===== Use of colors in labels <panels-use-of-colors-in-labels>

The panel has a matte black background. To maintain legibility, all labels
should be white or off-white, with the following exceptions:
- For the designer or builder name or logo.
- When justified by the mathematical operation performed.

In any case, colors should be designed to offer sufficient contrast, and not
impact module usability by people suffering from color blindness.

===== Use of graphism and symbols in labels
<panels-use-of-graphism-and-symbols-in-labels>

We recommend the use of mathematical symbols and graphism when they illustrate
the functionality of the module. However, text labels should always be present
to express the jack functions.

===== Label method <panels-label-method>

Commercial, reference implementation or metrologic builds should always use
laser engraving or screen printing methods. Those have excellent durability and
legibility.

DIY builds can use UV-printed vinyl overlay method: it maintains good durability
and legibility while being more accessible.

===== Typography

Labels should be printed in a sans-serif typeface (DIN 1451, Eurostile,
Helvetica, etc.), except mathematical formulas. Module name size should be at
least $qty(4, "mm")$ height. Jack labels should be at least $qty(2, "mm")$
height.

== Chassis <chassis>

=== Overview <chassis-overview>

The chassis provides the mechanical and electrical infrastructure for housing
modules. It includes:
- Structural enclosure with EMI shielding,
- Cassette rail system for module installation and removal,
- Power distribution board with backplane connectors,
- Front panel with reference outputs and system controls,
- Thermal management provisions.

This specification defines interface requirements that any compliant chassis
must meet. Chassis may vary in capacity (number of module positions), form
factor (rack-mount, desktop, portable), and mounting style. The reference
implementation (@reference-implementation-chassis) describes a
$qty(19, "inch")$ $qty(4, "U")$ rack-mount chassis with $8$ module positions.

=== Dimensional requirements <chassis-dimensional-requirements>

#include "diagrams/chassis-dimensional-requirements.typ"

==== Module interface dimensions <chassis-module-interface-dimensions>

All chassis must accommodate standard SAME cassettes. The following dimensions
are mandatory:

#include "tables/chassis-module-interface-dimensions.typ"

==== Capacity <chassis-capacity>

Chassis capacity is defined by the number of module positions. There is no
minimum or maximum, but the following constraints apply:

#include "tables/chassis-capacity.typ"

Designers should consider thermal dissipation when determining maximum capacity.

==== Clearances

The rear clearance (behind cassette) should be at least $qty(25, "mm")$, to
account for the DB-25 connector and cable bend radius.

=== Structural requirements <chassis-structural-requirements>

==== Material <chassis-material>

#include "tables/chassis-material.typ"

Steel is preferred for magnetic shielding. Aluminum may be used where weight is
critical, with reduced magnetic shielding performance.

==== EMI shielding <chassis-emi-shielding>

A fully loaded chassis must form a continuous shielded enclosure:

#include "tables/chassis-emi-shielding.typ"

==== Grounding <chassis-grounding>

#include "tables/chassis-grounding.typ"

=== Cassette rails <chassis-cassette-rails>

The rail system guides cassette insertion and provides retention.

==== Geometry <chassis-cassette-rails-geometry>

#include "tables/chassis-cassette-rails-geometry.typ"

==== Retention <chassis-cassette-rails-retention>

Cassettes must be retained to prevent accidental ejection during operation or
transport.

#include "tables/chassis-cassette-rails-retention.typ"

Positive retention may be achieved via:
- Spring clips engaging cassette lips,
- Latching mechanisms.

==== Material <chassis-cassette-rails-material>

The rails must be of the same metal as the chassis, with a smooth, burr-free
finish; and bond to chassis earth.

They contribute to EMI shielding by closing the gap between cassette lips and
chassis structure.

=== Thermal management <chassis-thermal-management>

==== Cooling method <chassis-cooling-method>

Passive convection cooling is the baseline requirement. Forced-air cooling may
be added for high-density configurations.

#include "tables/chassis-cooling-method.typ"

==== Ventilation <chassis-ventilation>

Chassis ventilation must align with cassette ventilation slots to enable
chimney-effect airflow.

#include "tables/chassis-ventilation.typ"

==== Thermal limits <chassis-thermal-limits>

Inside the chassis cassette chamber, internal ambient temperature must not go
over $qty(50, "dC")$. If passive cooling cannot maintain thermal limits at full
capacity, forced-air cooling or reduced capacity is required.

=== Power distribution board <chassis-power-distribution-board>

The power distribution board generates and distributes all power rails to
module positions.

==== Functions <power-distribution-board-functions>

#include "tables/power-distribution-board-functions.typ"

==== Power entry <power-distribution-board-power-entry>

#include "tables/power-distribution-board-power-entry.typ"

==== Master oscillator <power-distribution-board-master-oscillator>

To support the metrologic tier time-domain computations, the chassis must
include a precision clock source.

/ Oscillator: Oven Controlled Crystal Oscillator (OCXO).
  / Recommended part: AOCJY4A-10.0000MHZ-SW (or equivalent with
    $plus.minus qty(10, "ppb")$ stability).
/ Buffering: The oscillator output must be filtered to remove harmonics and
  buffered to drive the $qty(50, "ohm")$ distribution network.
  / Metrologic tier buffer: LM7171 (high speed, high voltage operational
    amplifier) or equivalent, configured to drive $qty(50, "ohm")$ loads with
    high slew rate and low distortion.
/ Signal level: $qty(1.0, "Vpp") plus.minus qty(10, "percent")$ into
  $qty(50, "ohm")$.
/ Waveform: Sine wave.
/ Fan-out: The oscillator distribution network must ensure port-to-port
  isolation $gt qty(40, "dB")$ to prevent oscillator line crosstalk between
  modules.

=== Front panel <chassis-front-panel>

The chassis front panel provides system-level controls and reference inputs and
outputs.

==== Elements <chassis-front-panel-elements>

#include "tables/chassis-front-panel-elements.typ"

- Case designers may add other elements as they see fit (fuse holders, voltage
  selectors, sensors, etc.),
- Reference jacks should be grouped together, on a $qty(0.75, "inch")$ grid,
- All controls and jacks must have an associated label.

=== Electrical safety <chassis-electrical-safety>

==== Mains isolation <chassis-mains-isolation>

#include "tables/chassis-mains-isolation.typ"

==== SELV circuits <selv-circuits>

All module-facing voltages ($plus.minus qty(15, "V")$, $plus.minus qty(10, "V")$, $plus.minus qty(5, "V")$) are Safety Extra-Low Voltage (SELV):

#include "tables/selv-circuits.typ"

==== Protective earth <protective-earth>

#include "tables/protective-earth.typ"

=== Compliance <chassis-compliance>

Chassis must comply with applicable safety and EMS standards for the target
market:

#include "tables/chassis-compliance.typ"

Compliance testing and certification are the responsibility of the chassis
manufacturer.
