Short answer: give every stacked expansion board 0.5 in [13 mm] between its tallest connector and the lid, keep 1 in [25 mm] of clear floor around your board for cable bend and gland reach, and bring the cables in through an end wall so a gland body never reaches over the stack. Added up part by part — a 6 mm standoff, a 1.6 mm main board, an 8.5 mm header, a 1.6 mm expansion board and a 13.5 mm jack — the assembly reaches 31.2 mm, and the 0.5 in service gap lifts the lid line to 43.9 mm [1.73 in], which a 60 mm [2.4 in] deep enclosure covers with room for the gasket. The failure that bites most small builds is a gland body landing on the expansion board, so the gland wall earns its own clearance budget below.
How much clearance does a stacked expansion board need above its connectors?
Plan on 0.5 in [13 mm] from the top of the tallest connector on the top board to the inside of the lid, and budget for the RJ45 jack as that tallest part at about 13.5 mm [0.53 in] above the PCB until your calipers say otherwise.
That 0.5 in is a finger's worth: enough to press an Ethernet latch, seat an angled USB plug, or lift a dust cap without levering the jack off its pads. It also absorbs cover flatness and any stiffener rib running under the lid. Typical part heights, measured from the surface each part sits on:
| Part of the stack | Typical height |
|---|---|
| Main board PCB | 1.6 mm [0.063 in] |
| GPIO header, 2 x 23 pin | 8.5 mm [0.33 in], ranges 7-11 mm |
| Expansion board PCB | 1.6 mm [0.063 in] |
| RJ45 jack | 13.5 mm [0.53 in] |
| Single USB-A receptacle | 6.5 mm [0.26 in] |
| Barrel power jack | 11 mm [0.43 in] |
If the expansion board carries its own upright module — a radio or a display — add that module's full measured height, not another flat 0.5 in. And if your build puts two boards face to face on posts rather than stacked on headers, the fit checks differ; see the article on enclosures for stacked circuit boards.
How much cable room does the enclosure need around the board?
Keep 1 in [25 mm] of clear floor on every side of the board, and let a Cat5e cable hold a 22 mm [0.9 in] bend radius — four times its 5.5 mm outside diameter — between gland and connector.
Structured cabling practice sets the minimum bend for Cat5e and Cat6 at four times the cable's outside diameter, which for a 5.5 mm [0.22 in] Ethernet lead is 22 mm. USB and shielded power leads behave better at six to eight diameters, so a 5 mm [0.2 in] USB cable wants a 30-40 mm [1.2-1.6 in] radius. Give every cable a straight 25 mm [1 in] run out of the gland before its first bend; that keeps the clamp seated and the twist in the pairs intact.
A molded RJ45 plug is about 12 mm [0.47 in] wide, so it will not pass the 3-8 mm clamp of an M16 gland. Plan a removable dome or a blanking plug you can open for rework, as covered in sizing a cable gland for an RJ45 plug and in passing a connector through a cable gland.
Where should the cable glands go so they clear the expansion board?
Through the end wall beside the board, with 15 mm [0.6 in] of inside clearance behind every hole for the gland body and its locknut, and with the lid and the wall directly above the stacked boards left untouched.
A standard M16 or M20 gland reaches 10-15 mm [0.4-0.6 in] into the box, and its locknut adds another 3-4 mm [0.12-0.16 in]; that reach is exactly what lands on a stacked expansion board in a shallow case. Three fixes, in order of preference: move the entry to the end wall, fit a shorter low profile cable entry seal, or specify a short-body gland.
Spacing and hole sizes for that wall: 30 mm [1.2 in] between gland centres so a 27 mm [1.06 in] locknut and a socket turn freely; a plain hole for a locknut wants +0.2 mm on the thread diameter, so 16.2 mm [0.64 in] for an M16 and 20.2 mm [0.80 in] for an M20; and keep each hole edge 10 mm [0.4 in] clear of wall bends and the gasket path. More on hole tolerances is in M20 cable gland hole size. If the box goes to a washdown area, order it rated NEMA 4X / IP66 by the manufacturer; not UL listed.
How much internal depth does the full stack-up need?
With a 6 mm standoff under the main board, the stack runs 6.0 + 1.6 + 8.5 + 1.6 + 13.5 = 31.2 mm to the top of the jack, and the 12.7 mm [0.5 in] service gap lifts the lid line to 43.9 mm [1.73 in].
| Stack item | Height | Running total |
|---|---|---|
| Standoff | 6.0 mm [0.24 in] | 6.0 mm |
| Main board PCB | 1.6 mm | 7.6 mm |
| GPIO header | 8.5 mm | 16.1 mm |
| Expansion board PCB | 1.6 mm | 17.7 mm |
| RJ45 jack | 13.5 mm | 31.2 mm |
| Service gap | 12.7 mm | 43.9 mm |
Specify 60 mm [2.4 in] of depth: the 16 mm left over the 43.9 mm covers the gasket seat, a stiffened door, and the gland dome standing outside. Every further expansion board you stack adds 10.1 mm — a 1.6 mm PCB plus an 8.5 mm header — so a third level pushes the requirement to 54.0 mm [2.13 in]. If the board dissipates 5 W or more, give the heat rise its own pass through conduction cooled sealed enclosures; for panels carrying power wiring, the enclosure sizing guide adds the wire-bending and working-space rules a 5 V board never triggers.
What footprint does the board need on the enclosure wall?
Add 1 in [25 mm] to the board outline on all four sides, so a 90 x 55 mm [3.5 x 2.2 in] single board computer wants about 140 x 105 mm [5.5 x 4.1 in] of clear inside wall.
On the gland end, three cables at 30 mm centres span 60 mm [2.4 in] and sit inside that 105 mm wall with over 20 mm to spare at each corner. Keep the same reserve along one long side if a second sensor board may join later, and decide the case before the layout hardens — the argument for that order is made in choosing the case before the board layout.
How do I lay out the cutouts for a single board computer enclosure?
Work the numbers in order — tallest part, stack-up, footprint, gland wall — and draw every hole in the cutout designer before the box is built, because a hole cut into a finished enclosure disturbs the gasket line.
You need calipers, the expansion board itself, a spare header, and the real cables. Then:
- Measure the tallest part on the expansion board; expect about 13.5 mm for an RJ45 and 11 mm for a barrel jack.
- Stack board, header and expansion board, measure the total height above the mounting face, and add 12.7 mm.
- Add the standoff length and write the internal depth — 43.9 mm in this example — then specify 60 mm of box depth.
- Trace the board footprint, add 25 mm margins on all four sides, and mark the connector edge.
- Place the glands on the end wall, 30 mm apart, each hole +0.2 mm over the thread diameter, 10 mm clear of bends and gasket.
- Check each gland's 15 mm inside reach against the board edge; shift the hole or switch to a low-profile entry where they meet.
- Draw every cable's path: 25 mm straight out of the gland, then a bend at four diameters for data and six to eight for power.
- If the board carries wireless, settle the antenna plan now rather than after the metal is cut.
- Export the layout, send it with your quote request, and approve the drawing that comes back; delivery is 10 business days from that approval.
The enclosure builder takes the same layout in 3D if you want to see door, rails and glands together before quoting, and custom enclosures cover stainless, coated steel and aluminum in any size, built from one piece from a single unit upward.
Does a metal enclosure block the board's wireless?
Yes — a stainless lid works like a shield can around a 2.4 GHz radio, and the link drops from full strength to nothing, so settle the antenna plan while the cutouts are still open.
Many current boards ship the radio under its own shielded can on the PCB, and that pre-certified module still loses its path through a metal wall. Put the antenna outside: a bulkhead antenna on the gland wall needs about a 6.5 mm [0.26 in] hole, or mount it on the machine beside the box. Wireless-first builds do better in nonmetallic enclosure materials, which pass radio and still hold molded IP66 sizes.
What mistakes cost the fit or the seal?
Four mistakes account for nearly every rework on these builds: a gland body reaching over the expansion board, a lid that touches the RJ45 latch, a cable bent tighter than four diameters, and a hole drilled into a finished box across the gasket line.
Fix each at the drawing stage:
- Gland over the board — end-wall entry, 15 mm of inside clearance, or a low-profile gland; the approved drawing shows the reach.
- Lid on the latch — re-run the stack-up; 0.5 in above the jack keeps a finger on the latch.
- Tight bends — 22 mm radius for Cat5e, 30-40 mm for USB or shielded leads; clip cables to the wall, never to the board.
- Field-cut holes — every hole belongs on the approved drawing, because one through the gasket path drops a washdown rating to splash; installing a cable gland without losing the rating covers torque and seat prep.
Prove the layout before power-up: a 12 mm [0.47 in] block passes over the jack with the door closed, every cable turns at four diameters or more, and you can see 15 mm of daylight behind each gland body with the door open.
Enclosures for this job
Catalog sizes that suit the job this article answers, picked from its subject; open one for its full specifications.
| Enclosure | Material | Outside H x W x D / display | Rating |
|---|---|---|---|
| 12 × 10 × 6 in | 304 stainless | 12 x 10 x 6 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 16 × 14 × 8 in | 304 stainless | 16 x 14 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 20 × 16 × 8 in | 304 stainless | 20 x 16 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
Questions
Can I add a second expansion board later without changing the enclosure?
Yes, if you order the depth now. Each extra stacked board and header adds 10.1 mm [0.4 in], so a second expansion board pushes the 43.9 mm stack-up to 54.0 mm and the enclosure to 70 mm [2.8 in] deep. A 60 mm box takes the second board only with 5 mm standoffs, which cuts the air gap under the main board.
What size cable gland fits an Ethernet or USB cable?
Use one gland per cable: an M16 gland clamps a 3-8 mm [0.12-0.31 in] cable, covering a 5.5 mm Ethernet lead and most USB cables, in a 16.2 mm [0.64 in] hole. Two cables through one gland give up the seal; a two-cable gland keeps it only when both leads sit inside its stated clamp range, typically 2 x 4-7 mm.
How much does a taller standoff change the enclosure depth?
Standoffs from 5 mm to 11 mm all work on a single board computer, and every millimetre you add lifts the stack one for one. Moving from 6 mm to 11 mm standoffs takes the worked example from 43.9 mm to 48.9 mm of needed depth, still inside a 60 mm [2.4 in] enclosure. Taller standoffs also open a 5 mm air channel under a board that runs warm.
Will the board overheat in a sealed enclosure this size?
A board drawing 5 W warms a 150 x 120 x 60 mm stainless box about 9 C [16 F]: the box has roughly 0.07 m2 of surface, bright stainless sheds about 8 W per square metre per kelvin, and 5 / (0.07 x 8) gives 9. Stay under about 10 W at this size, or give the processor a conduction path to the wall.





