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
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 and a vented temperature sensor housing as starting points.
Prompts to start from
Open one in the builder, change the numbers to yours, and the model renders in seconds. Keep adjusting in the chat before you print.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.
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.
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.
Questions
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.
A 2 mm weep hole at the lowest point lets condensation drain instead of pooling on the board. Commercial outdoor boxes have one too.
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.
