Sealing an Enclosure

An enclosure that is sealed against water is also sealed against air, and air is the problem. Every time the box warms and cools it tries to change volume; if it cannot, the pressure changes instead, and that pressure works on the gasket, the lid and the cable glands. If any of them leaks even slightly — and one will — the box breathes: it pulls damp air in as it cools, and does it again every day for ten years.

The water gets in as vapour, which no gasket stops. It comes out as liquid on the coldest surface inside, which is usually a heatsink or a connector body. That is why boxes that pass an immersion test still arrive full of water, and why IP rating and dryness are two different problems.

The pressure a temperature swing makes

Hold the volume constant and the ideal gas law gives it straight away: Δp/p = ΔT/T. From 20 °C, a 40 K swing is 40/293 of an atmosphere — about 14 kPa. That is 0.14 bar trying to push the lid off, and on a 200 × 150 mm lid it is 420 N. Solar gain makes swings larger than that routinely; see the sealed-enclosure thermal tool for how hot a box in the sun actually gets.

Now the trade. If the box holds that pressure, the gasket and the lid stiffness have to carry it, and the seal is working hardest exactly when the elastomer is hottest and least able to. If it does not hold it, the box exchanges roughly ΔT/T of its own volume of air every cycle, through whatever the leak path is — and that path is a one-way valve for water, because vapour goes in and liquid stays.

Try it — what a daily cycle moves

If it holds: pressure
—
...force on the lid
—
If it breathes: water in
—

Stop fighting it: vent, do not seal

The fix is a breather vent — a small expanded-PTFE membrane that passes air and vapour but not liquid water. It equalises the pressure so the gasket never sees a differential, and it lets the box dry out as readily as it wetted. A vent does not lower the IP rating: the membrane is what holds the rating, and immersion-rated vents exist.

What a vent does not do is stop moisture coming in — it stops it being trapped. The box still exchanges air, but now it exchanges in both directions, so the average humidity inside tracks outside instead of ratcheting upwards. That is the whole mechanism: a leaky sealed box only breathes in at the cold end, through the lowest leak path, and the water it drops can never evaporate back out through the same route.

Desiccant is a second line, not a first. A sachet holds a fixed mass of water and then stops working, silently; it is a reasonable answer for a box opened at every service interval and a poor one for a ten-year sealed unit. If the number in the widget above is grams and the sachet holds grams, you have bought one season.

Gaskets: squeeze, groove, and the bit people forget

A face seal wants its compression set by metal-to-metal contact, not by bolt torque. Design a groove or a land that bottoms out at the intended squeeze, and the joint is repeatable at every service. Without one the seal depends on whoever last assembled it, which is the same as not having a specification. The O-ring groove tool does the squeeze and gland-fill arithmetic; the numbers that matter are typically 15–30% squeeze for a static face seal and a gland fill left under 90% so the elastomer has somewhere to go when it swells and when it gets hot.

Then the bit people forget: the cable glands and the connectors are the seal, not the lid. A box with a perfect lid gasket and an unsealed backshell is an unsealed box, and the cable itself can wick water along the strands inside the jacket, past every gland you fitted. Potted backshells, blocked-core cable or a deliberate drip loop below the entry are what stop it. Enter the box from below or from the side where you can — a gland on the top face is a funnel with a rating.

Your sealed IP67 box keeps arriving wet inside. What is the most likely cause?

The rating tells you less than you think

An IP rating is a test, not a service life. IPX7 is thirty minutes at a metre in fresh water; IPX6 is a jet from a nozzle. Neither says anything about salt, ultraviolet, five years of thermal cycling, or a pressure differential — and the immersion test is deliberately run at a stable temperature, so the very mechanism above is excluded from it. The full digit tables are on the IP ratings card.

Sea water adds its own problems on top: it wicks further than fresh water, it leaves a conductive salt crust behind when it dries so the failure survives the drying, and it attacks the aluminium around a stainless gland — see dissimilar metals in sea water. A marine enclosure is a corrosion problem and a condensation problem wearing an ingress rating.

A checklist that fits on a sticky note

Fit a breather unless there is a reason not to. Bottom the gasket on metal. Seal the cable, not just the gland. Enter from below. Put the coldest surface where a drip does no harm. Slope any internal ledge so it drains. And design the electronics to survive condensation anyway — conformal coating, no bare high-impedance nodes across a gap, and enough creepage that a film of salt water is an annoyance rather than a short.

Educational overview — verify against the governing standard. Not a substitute for engineering judgment.