Short answer: mount the sensing element within 10 mm [0.4 in] of a PTFE membrane vent and stand it off the board on standoffs. Keep copper and heat sources away from it, and the box reads the weather instead of its own inside air. With a 1 in [25 mm] vent and a 5 mm diffusion path, a 1 L box follows a step change with a time constant near 7 minutes; a sealed box can sit tens of percent away from the true humidity for a day. Every degree the element runs warm costs about 3% RH at 50% RH, so thermal placement matters as much as sealing. The vent hardware itself is chosen in choosing a pressure equalization membrane vent; this page covers placement, dead volume and self-heating.
Why a sealed box cannot read the weather
A waterproof box is sealed against liquid water. Water vapor is a different matter: it migrates through the gasket line and the housing plastic slowly, so the air inside decouples from the air outside. That is the story behind an IP67 sensor enclosure sealed against water but not vapor. The element ends up reporting the box.
The night cycle makes the error visible. Seal the box at 25 °C [77 °F] and 50% RH, let the inside air follow the wall down 5 °C [9 °F] overnight, and the reading climbs at fixed absolute humidity: 0.50 × 3169 ÷ 2339 ≈ 68% RH, using saturation vapor pressures at 25 °C and 20 °C. Cool a little further and moisture condenses on the walls, which is the classic night-time fogging.
A sealed box also traps pressure. A rigid box closed at one pressure keeps reporting that pressure while the weather swings tens of hectopascals in a day, so a BME280-class part loses half its job. A barometric pressure sensor needs a vent to equalize for exactly this reason.
The membrane vent keeps the water out and the rating on
One part fixes all three problems: a hydrophobic PTFE membrane vent over a panel hole. Vapor molecules pass through the pores and water jets do not, so the inside air tracks outside humidity and pressure while staying dry. Fit a vent rated to the box, because the weakest part sets the assembly rating: an IP54 breather turns a Type 4X box into an IP54 assembly. Our stainless boxes are rated NEMA 4X / IP66 by the manufacturer; not UL listed, and an IP66-rated vent with its gasket keeps the assembly at that level. IP66 means dust-tight plus the powerful-jet test of IEC 60529 — a 12.5 mm nozzle at 100 L/min from 2.5 to 3 m for at least 3 min — which is the washdown duty the box exists for.
Put the hole on the enclosure drawing and let it arrive cut and deburred; custom stainless cutouts are ordered with the box. A flat, deburred 1 in [25 mm] hole gives you a clean seat for the vent gasket. Field drilling works when you debur the edge and seat the gasket on bare metal, but the factory cut is the surer seat. What any new opening does to a Type 4 rating is covered under venting a NEMA 4 enclosure, and the membrane-versus-shield choice for outdoor sensing is a separate question answered in outdoor humidity sensor enclosure: membrane or shield.
How fast the reading follows outside air
Put numbers on the lag with diffusion physics. The time constant is τ = V·L ÷ (D·A), where V is the volume of air to exchange, L the diffusion path from free air to the element, D the diffusivity of water vapor in air and A the vent area.
Worked example: a 1 L stainless wall-mount box, one 1 in [25 mm] vent, a 5 mm path, still air at 25 °C [77 °F], D = 2.5 × 10⁻⁵ m²/s.
A = π × (0.025 m)² ÷ 4 = 4.91 × 10⁻⁴ m² τ = (1.0 × 10⁻³ m³ × 5 × 10⁻³ m) ÷ (2.5 × 10⁻⁵ m²/s × 4.91 × 10⁻⁴ m²) = 407 s ≈ 7 min
The element reaches 63% of a step change in one time constant and 95% at three, about 20 minutes. The membrane's own resistance sits on top of this, so treat the table as the best case; the vent maker's transmission figure covers the rest.
| Air volume to exchange | Vent hole | Diffusion path | Time constant (63%) | Time to 95% |
|---|---|---|---|---|
| 10 mL element pocket | — | 5 mm | ≈ 4 s | ≈ 12 s |
| 0.1 L | 1 in [25 mm] | 5 mm | ≈ 41 s | ≈ 2 min |
| 1 L | 1 in [25 mm] | 5 mm | ≈ 7 min | ≈ 20 min |
| 1 L | 0.47 in [12 mm] | 5 mm | ≈ 29 min | ≈ 1.5 h |
The same box with no vent exchanges only through the gasket line, which takes hours to a day; that tradeoff is laid out in enclosure vent or sealed box: which stays dry outdoors.
What moves the numbers: the lag scales one-to-one with volume, so a 2 L box sits near 14 minutes. Area grows with the square of the hole, so a 0.47 in [12 mm] hole runs about 4.3 times slower. A second vent doubles the area and halves the lag, and lengthening the path from 5 mm to 20 mm quadruples it. Warmer air diffuses a few percent faster, so you can ignore that.
What you need
- One hydrophobic PTFE membrane vent rated IP66 or Type 4X for a 1 in [25 mm] hole, with its gasket and screws
- The sensor on a breakout or pigtail, with 6-10 mm standoffs
- A second humidity sensor as the reference for the step test
- The enclosure drawing with the vent hole marked
- A torque driver and gasket-safe cleaner for the seat
Steps to mount the sensor
- Isolate the box and lock out before opening it if it is already in service.
- Choose the wall: a side face at mid-height, out of the door-gasket crevice and a box-width away from supplies and drivers. Warm air stratifies, so the top of a powered box runs a few degrees warmer than the bottom.
- Mark the vent hole on the drawing at that spot, with a flat flange around it for the gasket seat, and order the box that way.
- Fit the vent with its gasket, screws evenly snug, membrane facing out.
- Stand the element 6-10 mm off the board on standoffs or a short pigtail, sensing window over bare laminate, and place it within 10 mm [0.4 in] of the membrane.
- Sample at the rate the job needs: a BME280-class part reading once per second draws single-digit microamps at 3.3 V, so its own heat is microwatts. Continuous conversion multiplies the die's heat for no accuracy gain.
- Route wiring to the side, keep the air path between vent and element clear, close the door, and check that the gasket seats evenly all round.
Keep self-heating off the element
Relative humidity reads low when the element runs warm: saturation vapor pressure rises about 6% per °C at 25 °C [77 °F], so the error is roughly 6% of the reading per degree of offset — 3% RH per °C at 50% RH. An element 5 °C [9 °F] above box air reads 50% − (50 × 0.06 × 5) ≈ 35% RH. The die's own heat, duty-cycled as in step 6, stays a fraction of a degree; board heat is the term that bites.
The worst case is a powered box. Stainless wall passes heat at k = 3.7 W/m²K (the value behind our enclosure heat calculations), so a sensor box with 0.3 m² of wall carrying a 5 W load settles 5 ÷ (3.7 × 0.3) ≈ 4.5 °C above ambient. An element sitting in that air reads about 13 points low, near 37% RH when the weather is at 50%. For an honest outdoor reading you want a nearly empty box, or the element on the coolest wall with the known offset corrected. Placement around SHT-class parts, including the door-window case, is covered in placing SHT-class humidity sensors.
Checks when done
- Step test: carry the closed box from a conditioned room into open air next to the reference; expect the two readings within 5% RH of each other inside 3τ, about 20 minutes for the 1 L example.
- Temperature: at steady state with the load off, the element reads within 1 °C [1.8 °F] of the outside reference.
- Pressure: the barometric value tracks a local reference through the day's swings.
- Washdown: hose the box at the vent's rating, then open it and find the gasket line and the membrane's inside face dry.
Mistakes that cost the reading or the rating
- An unrated breather or a bare hole: the assembly drops to that part's rating, whatever the box carries.
- A second skin: an element inside its own sealed cap, sleeve or potting pocket recreates the dead-volume lag.
- A copper pour under the sensing window or a converter beside the element: degrees of offset at 3% RH per degree.
- A label, conformal coat or heat-shrink over the membrane's inside face: that rebuilds the sealed box.
- An element at the top of a powered box, parked in the warmest air stratum.
The decision: a near-empty, vented box reads the weather within about 20 minutes per liter and a fraction of a degree of self-heat. A box that also carries electronics reads honestly only with the element on the coolest wall, duty-cycled sampling, and the known offset corrected — about 13% RH low for 5 W in a 0.3 m² stainless box. If the box must stay sealed, accept that it reports inside air, and manage that air with the humidity sensor heater condensation strategy instead of treating it as a weather station.
Catalog dimensions to compare
Compare these catalog dimensions with your component layout. Open each enclosure for its rating, material and usable space, then check those specifications against your application.
| 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 |
| 12 × 10 × 6 in | 316L stainless | 12 x 10 x 6 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 20 × 16 × 8 in | 316L stainless | 20 x 16 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
| 16 × 12 × 8 in | 304 stainless | 16 x 12 x 8 in | Rated NEMA 4X / IP66 by the manufacturer; not UL listed |
Questions
How big can the enclosure get before the sensor lags behind the weather?
The lag scales with volume divided by vent area. One 1 in [25 mm] vent gives about 7 minutes of time constant per liter, so a 10 L cabinet sits near 70 minutes behind a step change. Four of those vents bring a 10 L cabinet back to about 17 minutes, since four times the area divides the lag by four. Spread the vents around the cabinet where you can.
Can I skip the vent and seal the sensor in completely?
Then the element reports the box, not the weather. At fixed absolute humidity, a 5 °C overnight drop moves an inside reading from 50% to about 68% RH, moisture starts to condense below that, and barometric pressure goes stale because nothing equalizes. Vapor still creeps in through the gasket line, so the box is neither dry nor honest. Fit the membrane vent.
How much accuracy does self-heating really cost?
Roughly 6% of the reading per °C of offset at 25 °C [77 °F], so 3% RH per °C at 50% RH. The die itself, sampled once per second, stays a fraction of a degree warm; a 5 W board in a box with 0.3 m² of stainless wall warms the air about 4.5 °C, and that is the term that costs you 13 points of RH.
Does the membrane vent let dust or washdown water reach the sensor?
No. In an IP66 code the first 6 means dust-tight and the second 6 means the powerful-jet test of IEC 60529: a 12.5 mm nozzle at 100 L/min from 2.5 to 3 m for at least 3 min. The hydrophobic PTFE membrane passes vapor while it blocks the jet, and with its gasket seated it holds the assembly at the box's rating.





