A splash-proof 3D-printed enclosure that still opens: where it leaks and how to test it
By Sina Esfahani, OmniTechs · Published 30 November 2026
Water gets into a printed box with a lid in three places: through the printed wall, through the seam between lid and base, and through the holes for cables and buttons. Treat them as three separate problems. Print the wall dense, put a real gasket in a groove under a stiff lid, and seal each cable with a gland. Then test the box empty and unpowered, with dry paper inside, so the wet spots show which path leaked.
A home splash test tells you whether your design works. It does not give the box an IP rating: IPX4 ("protected against splashing water from any direction") can only be claimed after a test to IEC 60529. Anything on mains voltage does not belong in a home-made printed box.
Build and test it in this order:
Decide what water the box will meet: splashes and rain, hose jets, or immersion.
Print the walls dense: at least 4 perimeters in PLA or PETG, 2 to 3 mm thick.
Put a bought O-ring or foam cord in a groove, squeezed as its maker specifies.
Make the lid stiff, let it land on a hard stop, and screw it down evenly.
Fit a cable gland sized to your cable, with a sealing washer against the wall.
Add an overlapping lip so water runs off the seam.
Splash-test the empty, unpowered box with paper strips inside and map the wet spots.
What IP codes mean, and why a printed box cannot simply claim one
The IP code (Ingress Protection) is defined in IEC 60529. The first digit covers solid objects and dust (0 to 6), the second covers water (0 to 8). An X means that digit was not specified, so IPX4 says nothing about dust.
The water digit of the IP code (IEC 60529)
| Digit | Brief description | What the test does |
|---|---|---|
| 3 | Spraying water | Spray up to 60° either side of vertical |
| 4 | Splashing water | From any direction: 10 min with an oscillating tube, or a hand nozzle at 10 l/min |
| 5 | Water jets | 6.3 mm nozzle, 12.5 l/min, from 2.5 to 3 m |
| 6 | Powerful water jets | 12.5 mm nozzle, 100 l/min, from 2.5 to 3 m |
| 7 | Temporary immersion | 30 min, lowest point 1 m deep (boxes under 850 mm tall) |
| 8 | Continuous immersion | Agreed between maker and user, harsher than 7 |
Three details matter for a printed box:
IPX4 is a defined test. With the hand nozzle, the shield is removed and the box is sprayed from all practicable directions for 1 minute per square metre of surface, at least 5 minutes.
A little water may enter and still pass. It must not stop the equipment working or make it unsafe, reach live parts, or collect near the cable end. The product's own standard sets the amount.
IPX7 does not include IPX5 or IPX6. Up to 6, a higher digit includes the lower ones. A box marked only IPX7 is not considered suitable for water jets unless it is dual-coded, such as IPX6/IPX7.
These are type tests on a clean, new sample. For your own box, write "designed to keep out splashes, tested at home", not an IP number.
Find the leak path: wall, seam or entry
What the wet spots tell you
| Where the paper is wet | Likely path | What to change |
|---|---|---|
| One or two places along the seam | Lid flexes there, so the seal is loose | Stiffer lid, screw near that spot, hard stop |
| All along the seam | Too little squeeze or the wrong seal | Recheck groove depth; thicker cord |
| Around a cable | Cable outside the clamping range, or no washer | Smaller gland range, washer, flat landing |
| Spots on a wall, a seam line or a corner | Porous wall | More perimeters, more flow, or a coating |
Make the walls dense
A printed wall is not solid plastic. In Prusa's tests, water came through mainly at the seams and where perimeters meet solid infill, not between layers. Walls of 0.9 to 1.8 mm leaked noticeably; 2 to 3 mm usually held. Start with:
4 to 6 perimeters (Prusa's minimum for PLA and PETG is 4);
0.15 mm layers or lower on a 0.4 mm nozzle, because thicker layers leaked more;
a nozzle 5 to 10 °C hotter for better layer bonding, and at least 5 bottom layers (Prusa);
dry filament: moisture leaves bubbles that can open a path for water.
More flow (105 to 110%) also closes gaps but costs accuracy, which a fitting lid needs. One experienced Stack Exchange answer blames inconsistent extrusion and wet filament rather than gaps between layers; both views lead to the same fix. If layers visibly split, see poor layer adhesion.
If a wall still weeps, coat the inside, not the sealing faces. Prusa found epoxy works, but thin walls may crack under it, and it needs gloves and a respirator. The guide on PLA and PETG in water has the full watertight settings and coatings.
Design the lid seal
A seal works when it is squeezed by the right amount, evenly, all the way round.
Choose the seal
Seal options for a printed lid
| Seal | Good for | Watch out for |
|---|---|---|
| Bought O-ring in a groove | Best seal; most reliable in Prusa's tests | Groove depth must be right to about 0.1 mm |
| Closed-cell foam cord or strip | Rough printed faces, slightly uneven lids | Flattens over time; replace it |
| Sealant cured in the groove | Odd shapes; lid can still open | Let it cure fully before closing |
| Overlapping lip, no gasket | Light splashes and rain from above | Splashes from below still get in |
| Printed TPU gasket | Quick prototypes only | Printed gaskets failed in Prusa's tests |
Size the groove
Squeeze is how much the seal is compressed, as a share of its thickness. Groove fill is how much of the groove it occupies.
O-ring as a face seal: 20 to 30% squeeze, about 75% fill, 0 to 5% stretch (Marco Rubber). The free space is needed because the ring widens as it is squeezed.
Solid rubber cord: 20 to 25% squeeze (Stockwell Elastomerics).
Foam or sponge: follow its datasheet. Stockwell gives 50 to 60%; Rogers gives 25 to 35% as a general target.
The face the seal presses on matters too. Marco Rubber asks for 32 µin Ra (about 0.8 µm) to seal liquids, far smoother than a printed side wall. Put that face on the bed side or on a top surface with ironing (Prusa), never across the layer lines of a vertical wall.
Keep the lid stiff
A lid that bends lets the seal go loose where it bends most, usually between screws. A firm gasket makes this worse: Rogers warns that a gasket that needs too much force to compress can make a panel warp or stop it closing properly.
Let the lid land on a hard stop, so the groove depth, not the screw torque, sets the squeeze.
Use a soft gasket and a thicker or ribbed lid.
Put screws at the corners and close to the seal.
Use inserts for a lid that is opened often; see threads, nuts and inserts in prints.
Before any water test, draw a chalk line on the seal, close and reopen the lid, and look for gaps in the line on the mating face.
Seal every opening: cable glands, buttons, drains
The gland maker RST names two weak points: between cable and seal insert, and between the gland's thread and the enclosure.
Match the clamping range. Every gland states one, for example 6 to 12 mm. RST recommends a cable in the middle to upper part of it.
Seal the gland to the wall with its O-ring, flat washer or moulded lip; RST advises adding one if the gland has none.
Print a flat, smooth pad around the hole for the washer.
Tighten to the stated torque. LAPP tests its glands on a test plate at that torque, with a mandrel instead of a cable. The rating on the packet is the gland's own and does not transfer to your printed wall.
Point glands and connectors down or sideways, never straight up. For buttons, a flexible membrane or a magnet working through a solid wall avoids a hole; Prusa found magnetic switches through the wall worked almost every time. IEC 60529 allows drain holes if water that enters drains away without harm, but a drain is a design choice, not a fix for an unknown leak.
Test it at home: an empty, unpowered splash test
This checks your design. It is not an IP test.
You need: the empty box with no electronics or battery, kitchen paper strips, an offcut of the real cable through each gland, a shower head or hose with a sprinkle setting, a 10-litre bucket and a stopwatch.
Lay dry paper strips inside along the seam, at each gland and in the bottom corners. Photograph them.
Close the lid exactly as in use: same screws, same order, same tightness.
Time how long the hose takes to fill the bucket. 60 seconds is 10 l/min, the flow of the IEC hand nozzle; your spray pattern will still differ from the standard device.
Put the box on a rack so it is not shielded from below. Spray it from all sides, above and below, for at least 5 minutes, with extra time on the seam, glands and corners.
Dry the outside, then open it with the seam facing down so outside water cannot drip in.
Mark every wet spot on your photo and use the diagnosis table.
Repeat in the real mounting position after opening and closing the lid five times: a seal that only works once will not work in use. Change one thing per test, or you will not know what helped. The test passes when every strip stays dry; for a box that protects electronics, a damp spot is a fail. This test lab's video shows what a laboratory IPX4 test looks like:
Worked example: a box for a battery-powered garden sensor (hypothetical)
The figures are invented to show the method; use your own measurements and your seal's datasheet.
Box: PETG, 100 × 70 × 40 mm, 5 perimeters, 0.15 mm layers, lid on a hard-stop rim.
Groove depth: a 2.5 mm O-ring at 20 to 30% squeeze needs 1.75 to 2.00 mm. Choose 1.9 mm (24%). Printed at 1.8 mm it becomes 28%, at 2.0 mm 20%: every 0.1 mm moves the squeeze by 4 points, so measure the groove with a calliper's depth rod.
Groove width: the ring's cross-section is 4.91 mm². At 1.9 × 3.4 mm the fill is 76%.
Ring size: the groove's inner wall is 270 mm long; 270 ÷ π = 85.9 mm, so an 82 mm inside diameter stretches the ring 4.8%.
Cable: 5 mm, in a gland with a 3 to 6.5 mm range, with its washer on a flat pad.
Test time: the surface is 0.028 m², under 2 seconds at 1 min/m², so the 5-minute minimum applies.
If the paper gets wet midway along a long side, suspect lid flex and add a screw or ribs before touching the groove.
Contrasting case: the same box for a 230 V timer by an outdoor socket. Do not print it: buy an enclosure whose maker states an IP rating for that use, and have a qualified electrician install it.
When a printed box is not enough
Mains voltage: no. Equipment for 50 to 1000 V AC falls under the EU Low Voltage Directive, and in Great Britain under the Electrical Equipment (Safety) Regulations 2016. Its manufacturer must assess conformity before it is sold. A home-printed box has had no such assessment, and a leak can reach live parts.
Batteries and low-voltage electronics: a leak mainly risks the device. Test empty first, then check inside regularly for water marks or corrosion.
Hose jets, pressure washing, immersion: IPX5 to IPX8 are a different design problem; buy a rated enclosure.
Anything people rely on for safety: use a certified enclosure.
Sun: PETG slowly weakens under UV; compare filament for outdoor use.
Related guides and next step
Tolerances and clearance helps you size a lid that closes on its stop without binding, and assessing a 3D-printed prototype helps you check the first print. If you want the box printed for you, the OmniTechs PETG page asks you to say the part must be watertight, so it is printed with more walls and higher infill. It makes no IP claim and states that PETG is not certified for safety-critical use, so the splash test stays your job.

