---
title: "Weatherproof 3D printed enclosure for an outdoor sensor: gasket, gland, vents and a prompt"
description: "Design an outdoor sensor box that keeps rain out and lets air in: O-ring groove, PG7 gland, louvres, screwed lid, PETG. With a prompt for an ESP32 weather node."
canonical: https://speakcad.com/blog/outdoor-sensor-enclosure-3d-print
published: 2026-09-08
updated: 2026-09-08
publisher: SpeakCAD
---

# Weatherproof 3D printed enclosure for an outdoor sensor: gasket, gland, vents and a prompt

> Design an outdoor sensor box that keeps rain out and lets air in: O-ring groove, PG7 gland, louvres, screwed lid, PETG. With a prompt for an ESP32 weather node.

## Two different boxes

An outdoor enclosure is either **sealed** (a relay, a power supply, a GPS tracker) or **ventilated** (a temperature and humidity node). Sealed boxes want a gasket and a gland. Ventilated boxes want louvres that shed water and a sensor that breathes. Mixing them up gives you a fogged-up sensor or a wet relay.

## The sealed box

- **Screwed lid.** Four M3 screws into heat-set inserts or captive nuts in corner pillars. Snap fits creep in the sun.
- **O-ring groove.** A 2 mm section cord in a 1.6 mm deep, 2.6 mm wide groove around the lid compresses to seal. Ask for the groove and the AI computes it from the cord size.
- **Cable gland.** PG7 (12.5 mm hole) for cables up to 6 mm, PG9 (15.2 mm) up to 8 mm. Put it on the bottom face so water runs away from it.
- **Drain.** A 2 mm weep hole at the lowest point lets condensation out. Counter-intuitive, but it is what commercial boxes do.
- **Material.** PETG or ASA. PLA softens above 55 °C, which a box in the sun reaches.

## The ventilated box

Louvred slots angled 45° downward on the sides let air through and rain off. For a temperature sensor, put the sensor in a separate compartment with slots on three sides and the radio module on the other end, behind a wall; the ESP32 heats its own compartment by several degrees.

## The prompt

> **Prompt** An outdoor sensor enclosure for an ESP32 DevKit (55 x 28 mm, no holes) and a BME280 breakout (15 x 12 mm), internal 70 x 45 x 30 mm. 2.4 mm walls in PETG, edge rails for the ESP32, a separate 20 x 45 mm compartment for the BME280 with 45° downward louvres on three sides and an internal wall. Screwed lid with four M3 heat-set insert pillars, a groove for a 2 mm O-ring, a PG7 gland hole on the bottom face, a 2 mm weep hole, and two 5 mm wall-mount holes on a rear flange.

## Solar and battery

An 18650 in a holder needs 77 x 21 x 21 mm; a 6 V solar panel needs a bracket or a lid recess. "Add an 18650 holder pocket beside the ESP32" and "a 20° tilted bracket on top for a 110 x 60 mm solar panel" both work as follow-ups.

## Printing outdoor parts

- PETG or ASA, 0.2 mm layers, four perimeters, 25 percent infill for stiffness
- Print the base open side up; the O-ring groove is on the top rim and prints clean
- Louvres are 45° overhangs by design and need no supports
- Sand nothing: layer lines are fine, but drill the gland hole to size if it printed tight

The library has a [waterproof junction box with a gasket](/library/waterproof-junction-box-gasket) and a [vented temperature sensor housing](/library/temperature-sensor-housing-vented) as starting points.

## Prompts to try

- An outdoor sensor enclosure for an ESP32 DevKit (55 x 28 mm, no holes) and a BME280 breakout (15 x 12 mm), internal 70 x 45 x 30 mm. 2.4 mm walls in PETG, edge rails for the ESP32, a separate 20 x 45 mm compartment for the BME280 with 45° downward louvres on three sides and an internal wall. Screwed lid with four M3 heat-set insert pillars, a groove for a 2 mm O-ring, a PG7 gland hole on the bottom face, a 2 mm weep hole, and two 5 mm wall-mount holes on a rear flange. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DAn%2520outdoor%2520sensor%2520enclosure%2520for%2520an%2520ESP32%2520DevKit%2520(55%2520x%252028%2520mm%252C%2520no%2520holes)%2520and%2520a%2520BME280%2520breakout%2520(15%2520x%252012%2520mm)%252C%2520internal%252070%2520x%252045%2520x%252030%2520mm.%25202.4%2520mm%2520walls%2520in%2520PETG%252C%2520edge%2520rails%2520for%2520the%2520ESP32%252C%2520a%2520separate%252020%2520x%252045%2520mm%2520compartment%2520for%2520the%2520BME280%2520with%252045%25C2%25B0%2520downward%2520louvres%2520on%2520three%2520sides%2520and%2520an%2520internal%2520wall.%2520Screwed%2520lid%2520with%2520four%2520M3%2520heat-set%2520insert%2520pillars%252C%2520a%2520groove%2520for%2520a%25202%2520mm%2520O-ring%252C%2520a%2520PG7%2520gland%2520hole%2520on%2520the%2520bottom%2520face%252C%2520a%25202%2520mm%2520weep%2520hole%252C%2520and%2520two%25205%2520mm%2520wall-mount%2520holes%2520on%2520a%2520rear%2520flange.))
- A sealed outdoor box for a 60 x 40 mm relay board with 3 mm corner holes, internal 70 x 50 x 35 mm, 2.4 mm walls, screwed lid with M3 heat-set pillars and a 2 mm O-ring groove, two PG9 gland holes on the bottom face 30 mm apart, and a 2 mm weep hole. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520sealed%2520outdoor%2520box%2520for%2520a%252060%2520x%252040%2520mm%2520relay%2520board%2520with%25203%2520mm%2520corner%2520holes%252C%2520internal%252070%2520x%252050%2520x%252035%2520mm%252C%25202.4%2520mm%2520walls%252C%2520screwed%2520lid%2520with%2520M3%2520heat-set%2520pillars%2520and%2520a%25202%2520mm%2520O-ring%2520groove%252C%2520two%2520PG9%2520gland%2520holes%2520on%2520the%2520bottom%2520face%252030%2520mm%2520apart%252C%2520and%2520a%25202%2520mm%2520weep%2520hole.))
- A Stevenson-screen style radiation shield for a DHT22 on a Wemos D1 mini: a stack of five 90 mm diameter louvred rings 8 mm apart on three 4 mm posts, a top cap, and a 40 x 30 x 20 mm sealed pod under the stack for the D1 mini with a micro USB gland hole. ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520Stevenson-screen%2520style%2520radiation%2520shield%2520for%2520a%2520DHT22%2520on%2520a%2520Wemos%2520D1%2520mini%253A%2520a%2520stack%2520of%2520five%252090%2520mm%2520diameter%2520louvred%2520rings%25208%2520mm%2520apart%2520on%2520three%25204%2520mm%2520posts%252C%2520a%2520top%2520cap%252C%2520and%2520a%252040%2520x%252030%2520x%252020%2520mm%2520sealed%2520pod%2520under%2520the%2520stack%2520for%2520the%2520D1%2520mini%2520with%2520a%2520micro%2520USB%2520gland%2520hole.))

## FAQ

### Is a 3D printed enclosure really waterproof?

Rain-proof, yes, with a gasket, a gland and PETG or ASA printed with four perimeters. Not submersible: layer lines wick water under pressure. For IP65-style use, seal the seams with a thin coat of epoxy or use a commercial box and print only the insert.

### Why put a hole in a waterproof box?

A 2 mm weep hole at the lowest point lets condensation drain instead of pooling on the board. Commercial outdoor boxes have one too.

### Which filament for outdoors?

PETG for most cases, ASA if it sits in direct sun for years. PLA softens above 55 °C, which a dark box in summer sun reaches.

## About SpeakCAD

SpeakCAD is the most intuitive CAD for 3D printing, made for people who own a 3D printer and need a part that fits something they have: tap a face and type a size to shape it with simple tools, or describe it to the AI, on your phone or computer, and download a print-ready STL, 3MF or G-code sliced for your printer.

SpeakCAD works inside ChatGPT and Claude as a plugin (an MCP server): ask the assistant for a part with its measurements and SpeakCAD's own CAD AI designs it, shows it in 3D in the chat and hands over a print-ready STL, 3MF or G-code sliced for your printer.

- Live demo, no account: https://speakcad.com/demo
- In ChatGPT, Claude and other MCP clients: https://speakcad.com/chatgpt-plugin, https://speakcad.com/claude-connector, https://speakcad.com/mcp-server
- Pricing: https://speakcad.com/pricing
- FAQ: https://speakcad.com/faq
- Site index for AI assistants: https://speakcad.com/llms.txt
