Tolerance Stack-Up: Let Flux Check Your PCB and Enclosure
Flux runs the tolerance stack-up for your PCB and enclosure. It finds the dimension chain, calculates worst-case and root sum square (RSS) gap ranges, and proposes tolerance or design changes. Give Flux the board, enclosure, locating dimensions, tolerances, and required clearance. Then ask it to analyze the fit and update the opening or supports.
Analyze the tolerance stack-up from this board-mounted connector to its enclosure opening. Show the dimension chain and each tolerance contribution. Report the worst-case and RSS gap ranges separately. Require at least 0.30 mm on both sides, and propose a design change that meets that target.
This is part of Flux's fit and clearance workflow: analysis and mechanical changes in the same project as your electronics. Explore mechanical design in Flux, or start with your board and enclosure.
The worked example below shows the calculation behind that request. An industrial controller's board-mounted connector has 1.00 mm of nominal clearance per side, but just 0.15 mm at the tightest condition. Follow the worst-case and RSS results, then see how a wider opening meets a 0.30 mm minimum clearance.
Key takeaways
- Start with a functional requirement. This example needs at least 0.30 mm between the connector body and each vertical edge of the opening.
- Include how the board is located. Mounting-hole position, assembly float, component placement, and enclosure dimensions all contribute.
- Keep worst-case and RSS separate. A statistical range answers a different question from a guaranteed geometric clearance within stated bounds.
- Change the design before tightening every tolerance. Increasing the opening from 14.00 mm to 14.40 mm raises the worst-case minimum gap from 0.15 mm to 0.35 mm.
Worst-case vs. RSS tolerance stack-up
A tolerance stack-up calculates how variation in individual dimensions changes the fit of an assembly. For a PCB inside an enclosure, that means tracing the dimensions from the board mounting features to the connector and its opening. Add the tolerance contributions for a worst-case result. Use RSS for a statistical result with defined process assumptions.
For a linear dimension chain, write the output as a signed sum: y = a1x1 + a2x2 + …. Each coefficient describes how an input changes the output. A dimension that is subtracted has a negative coefficient. Half a width has a coefficient of 0.5.
| Method | Calculation | Question it answers |
|---|---|---|
| Worst-case | TWC = Σ abs(ai) ti | What are the limits if every input is anywhere inside its specified range? |
| RSS | σy = √Σ (aiσi)² | What is the output variation for independent input distributions? |
Here, t is a bilateral tolerance's half-width: 25.00 ±0.10 mm means t = 0.10 mm, not 0.20 mm. The symbol σ is a standard deviation. If every input tolerance represents the same statistical coverage, such as ±3σ, the corresponding output half-width is TRSS = √Σ (aiti)².
Use worst-case when every allowed assembly must fit. Use statistical analysis when you have process distributions, correlation information, and an accepted yield target. A drawing tolerance alone does not establish a standard deviation.
1. Define the assembly and its datum chain
Take a controller PCB with a connector that passes through the front enclosure wall. We analyze the horizontal direction, x, parallel to that wall. The required gap is between the connector's outer body and each vertical opening edge, not between the mating contacts.
Set x = 0 at the enclosure's left internal datum surface. A locating feature at the board mount establishes the board's x position. A second locating feature controls rotation. The board seats on supports that establish its height. This example treats horizontal translation; the released mounting scheme must bound rotation separately.
Trace this chain: enclosure datum → board locator → PCB locating hole → connector footprint → actual connector body. Compare the resulting body center with the opening center, measured from the same enclosure datum.
| Input | Nominal, mm | Half-width, mm | Meaning |
|---|---|---|---|
| p | 15.00 | ±0.10 | Datum to board-locator center |
| b | 25.00 | ±0.10 | PCB locating-hole center to footprint center |
| s | 0.00 | ±0.15 | Connector body offset from the footprint, including placement |
| f | 0.00 | ±0.20 | Allowed lateral assembly float at the locator |
| o | 40.00 | ±0.20 | Datum to opening center |
| W | 14.00 | ±0.10 | Opening width |
| C | 12.00 | ±0.10 | Connector body width |
These are example design inputs, not default tolerances for a PCB, connector, or manufacturing process. On a real device, take each bound from the part drawing, board fabrication specification, assembly specification, or supplier agreement. Define the body-to-footprint term so it includes the relevant package and placement variation once.
The ±0.20 mm float is an assembly bound. Derive that bound from the largest permitted hole, smallest locating feature, and locating scheme. Screws in clearance holes can let a board shift and rotate before tightening. Screw torque does not automatically center it.
2. Calculate the connector-to-opening center offset
Define positive offset e as the connector moving to the right of the opening center:
e = p + b + s + f − o
At nominal dimensions, e = 15.00 + 25.00 + 0 + 0 − 40.00 = 0.00 mm. The connector and opening are centered.
The worst-case offset half-width is:
Te,WC = 0.10 + 0.10 + 0.15 + 0.20 + 0.20 = 0.75 mm
The center can therefore move from −0.75 mm to +0.75 mm relative to the opening. An aligned nominal CAD model represents only the middle of this range.
3. Calculate the worst-case edge clearance
The two side gaps are:
- Right gap: gR = (W − C)/2 − e
- Left gap: gL = (W − C)/2 + e
Both nominal gaps are (14.00 − 12.00)/2 = 1.00 mm. Each width contributes half its tolerance to one gap. Each position term contributes its full tolerance.
Tg,WC = 0.10/2 + 0.10/2 + 0.75 = 0.85 mm
Each side gap has a worst-case range of 0.15 mm to 1.85 mm. You can also calculate the minimum directly with the smallest opening, largest connector, and largest offset:
gmin = (13.90 − 12.10)/2 − 0.75 = 0.15 mm
The opposite gap increases when the connector moves toward one edge. The two minimum gaps do not occur together. The design nevertheless fails the requirement: either side can fall below 0.30 mm.
4. Calculate RSS with explicit assumptions
For comparison, assume that all seven input variations are independent, centered, and that their listed half-widths represent the same statistical coverage. The RSS center-offset half-width is:
Te,RSS = √(0.10² + 0.10² + 0.15² + 0.20² + 0.20²) = 0.350 mm
For either side gap, include the half-width sensitivity of W and C:
Tg,RSS = √(0.05² + 0.05² + 0.10² + 0.10² + 0.15² + 0.20² + 0.20²) = 0.357 mm
The comparison range is therefore 1.00 ±0.357 mm, or 0.643 mm to 1.357 mm. If the inputs are normal and each listed half-width is 3σ, this is the output's ±3σ range. It is not a hard minimum or maximum.
For this example's release decision, retain worst-case. Assembly float is a permitted movement, not a measured normal distribution. Establish its distribution and check correlations before using a statistical yield calculation. Dimensions made from the same setup can also be correlated; their covariance belongs in the statistical model.
5. Change the opening, then rerun the stack
The required nominal opening follows directly from the worst-case equation:
Wnom ≥ Cnom + 2(grequired + Te,WC) + tW + tC
Wnom ≥ 12.00 + 2(0.30 + 0.75) + 0.10 + 0.10 = 14.30 mm
Choose 14.40 ±0.10 mm and retain the opening center at 40.00 mm. All other inputs stay the same.
| Result | 14.00 mm opening | 14.40 mm opening |
|---|---|---|
| Nominal side gap | 1.00 mm | 1.20 mm |
| Worst-case side-gap range | 0.15–1.85 mm | 0.35–2.05 mm |
| Illustrative RSS range | 0.643–1.357 mm | 0.843–1.557 mm |
| 0.30 mm minimum requirement | Fails worst-case | Passes worst-case |
The revised design has 0.05 mm of margin above the requirement. Record that margin with the drawing revision. If the opening cannot grow because of sealing, shielding, or appearance, reduce the center-offset stack instead. A positive board locator, a shorter datum chain, or tighter control of the opening's position can be more effective than tightening every dimension.
6. Check height, depth, and rotation
Repeat the analysis in each functional direction. PCB thickness belongs in the vertical chain when the board seats on its bottom surface. A typical height equation is connector center height = support height + PCB thickness + connector center height above the PCB top. Compare that with the opening's center height and include both heights' dimensional variation.
In depth, check connector protrusion, wall thickness, the plug's insertion envelope, and cable access. For rotation, a small board angle θ adds approximately Lθ of lateral error at a connector a distance L from the locator, with θ in radians. Include that contribution when your mounting arrangement permits it.
Use the connector drawing to identify the body envelope, mating face, and plug keepout. Control each relevant relationship on the drawing. Convert a GD&T position or profile tolerance into the actual directional bound for the feature and datum system; do not copy a diametral tolerance into a one-axis ± entry.
Run the tolerance stack-up in Flux
Flux is an AI hardware engineer. It keeps the board, components, and mechanical assembly in one project. Its fit and clearance workflow finds dimension chains, computes worst-case and RSS stack-ups, reports gap ranges, and proposes design or tolerance changes.
Add the PCB, enclosure, connector model, and tolerance specifications to the project. Name the features that locate the board. Give Flux the functional clearance target and the method you want to use:
Analyze the horizontal tolerance stack-up from the PCB locating hole to the connector opening. Use the enclosure's left internal face as the x datum. Use the nominal values and bilateral bounds in the attached table. Show the signed dimension chain, each tolerance contribution, and the worst-case left and right gap ranges. Require at least 0.30 mm on both sides. Also calculate RSS with its statistical assumptions stated separately.
Then connect the result to a design change:
Increase the opening width to 14.40 ±0.10 mm. Keep its center at 40.00 mm from the datum and keep the board mounting scheme unchanged. Recalculate the worst-case gaps, then check the connector and cable access in the assembly.
The ECAD and MCAD co-design workflow lets you update the opening when the connector moves, or update the board when the enclosure changes. In 3D View, press M to measure the nominal gap. Use View → Analysis → Cross Section to inspect the opening and board supports.
Keep the calculation and dimensional requirements with the project. Ask Flux for a dimensioned drawing of the revised enclosure with its datums, opening size, and position controls. Export the full assembly as STEP when your next review uses another CAD tool.
For the broader board-and-assembly workflow, see mechanical design in Flux. For enclosure layout before tolerance analysis, read the PCB enclosure design guide.
Tolerance stack-up release checklist
- State the minimum functional clearance and its direction.
- Use one datum system across the board locating features and enclosure opening.
- Include package variation, placement, assembly float, and rotation once each.
- Use half-width tolerances and the correct sensitivity coefficients.
- Report worst-case limits separately from statistical ranges.
- Recalculate after a board, connector, mounting, or enclosure revision.
- Put the final sizes, positions, datums, and process requirements on the released drawings.
Frequently asked questions
Tolerance stack-up analysis calculates how variation in a chain of dimensions affects a final gap, position, or fit. For a PCB and enclosure, that chain can include mounting features, board hole locations, connector placement, and the enclosure opening.
Write the output as a signed dimension chain. Multiply each input tolerance half-width by the absolute value of its sensitivity coefficient, then add the contributions. Add and subtract that total from the nominal output to get the worst-case limits.
Worst-case combines the extreme allowed inputs to bound the output. RSS combines independent statistical input variation by the square root of the sum of squared contributions. An RSS range needs defined statistical coverage and process assumptions; it is not an absolute clearance bound.
PCB thickness belongs in the height stack when the board seats on its bottom surface and the connector height is measured from its top surface. It does not contribute directly to the horizontal translation stack in this example. Analyze each functional direction separately.
Yes. Give Flux the board, enclosure, locating features, dimensions, tolerances, and required clearance. Ask for the dimension chain, worst-case and RSS gap ranges, and design changes. Flux can update the board or enclosure to address the fit.
Related Content
Let’s start building.
Let’s build your idea together. All you need to do is describe what you want to make, or what problem you want to solve. Flux will work with you to make it a reality.