Constructing a Simple Outdoor Enclosure

Though I’m a bit late getting this post out as a followup to last year’s Detecting Lightning with a Raspberry Pi, the topic of project enclosures never really gets old. Especially cost effective and readily available ones. These days there are a plethora of board specific cases and enclosures available online for things like Raspberry Pi, Arduino, BeagleBone, etc.,  but local options are often quite limited. Add weather and UV resistance into the mix and you’re either looking at ordering something online or building it yourself. This post describes my attempt at the latter.

My goal with this project was to build a generic weather-resistant enclosure that could work for a variety of situations. Knowing that most projects usually end up dismantled or tucked away on a shelf, I wanted something that could easily be reused or re-purposed with readily available parts. For this I headed over to the nearest home supply store to lurk in the electrical aisles for a while.

Since the AS3935 detects lightning by listening for its electromagnetic signature, metallic options were ruled out as they would act as a Faraday cage. Fortunately most hardware and home supply stores offer a wide selection of non-metallic boxes, conduit, adapters, and fittings. I also needed some way to get power into the enclosure and wanted to avoid having to use cable glands with a spliced cord. Ideally it would be nice to be able to use any off-the-shelf extension cord as is so that it could be easily removed or replaced as needed. Fortunately this problem is easily solved as weather-resistant outlet covers fit the bill perfectly.

This PVC enclosure and outdoor outlet cover has potential.

The foam-in-place gasket on the Carlon junction boxes.


The PVC junction boxes seemed like an ideal solution since they’re made for electrical work and are already weatherized. They are listed as NEMA 6P rated which is supposed to:

…provide a degree of protection with respect to harmful effects on the equipment due to the ingress of water (hose directed water and the entry of water during prolonged submersion at a limited depth)…” NEMA Enclosure Types.

Unfortunately in practice inconsistencies in the foam-in-place gasket caused a small amount of water to seep in around the screws. However this was easily remedied by placing some #60 o-rings on the cover screws.

#60 o-rings on the cover screws stopped any water pooled on the lid from seeping in.

To attach the outlet cover I drilled a 2″ hole in the middle of one of the enclosure faces as well as two small pilot holes for the mount screws. The outlet cover comes with a soft foam gasket on the back to help prevent water entry, but I went ahead and applied some clear silicone around the outside to make sure it was sealed.

Cover mounted with spacer visible from inside.

The outlet cover attached with an extension cord ran through it.

At this point it will function fine as a general purpose project enclosure.  For that particular project though I was interested in a way to possibly mount sensors away from the main part of the enclosure. My initial motivation was that I worried about how RF noise from the RaspberryPi and power supply/cables might affect the AS3935 – though that proved not to be an issue. I also wanted to be able to gather additional weather data such as temperature, humidity, and pressure; and so I went about constructing an external sensor pod of sorts.

For that I used another outlet cover, a 1-gang PVC switch box with two downward facing conduit holes (the extra one to provide ventilation), a piece of 3/4″ 90˚ conduit, a couple adapters, and a #15 o-ring. The switch box, conduit elbow, and male adapter were glued together with some PVC cement. This was mounted to the main enclosure via a 1″ hole drilled into the side and secured by threading on the female adapter from inside the box. An o-ring over the male adapter on the outside of the enclosure keeps water from entering here. The outlet cover mounts to the switch box with the included screws and a bit of clear silicone around the outside makes sure it is sealed.

Outlet cover mounted to switch box to form the external sensor pod.

Sensor pod put together but disconnected from the main enclosure.

The sensor pod does make the unit a bit top-heavy, but attaching the mounting tabs that come with the junction box as feet will stabilize it just fine. I ended up really liking the Hubbell TayMac outlet covers. The space provided to access the sensors is a little tight, but other than that they work great. The front cover can also expand outwards if you need a bit more space. Though not used in this project, the clear window could possibly come in handy for others.

Cover expanded out partially.


Outlet cover fully expanded.

Looking through the window in the cover as well as an unobstructed view for comparison.

Closeup through the window of the outlet cover to try and show the clarity.

Overall I am quite happy with the outcome. Last year it sat outdoors for a couple months and made it through quite a few bad storms with no water infiltration. Air circulation could be better, but when not in direct sunlight temperature readings in the sensor pod were pretty accurate. I monitored temperatures in the main box with a DS18B20 sensor to make sure it would be safe for a Li-ion battery backup and even in direct sunlight it stayed within specs. Had I continued on the weather station project I probably would have replaced this sensor pod with one with a proper solar radiation shield, but that would be easy since it’s not permanently attached to the box.

The various parts

Parts (main enclosure) Price
Carlon E989N 8″x8″x4″ PVC junction box $22.64
Hubbell TayMac ML450G 1-Gang Outlet Cover $7.97
Danco 96774 #60 O-Rings (pack of 10) $2.27
Parts (sensor pod) Price
Hubbell TayMac ML450G 1-gang outlet cover $7.97
Carlon E982EFN 1-Gang 19 cu. in. switch box $5.33
Carlon UB9AE 3/4 in. 90˚ Sch. 80 PVC elbow $2.06
Carlon E943E 3/4 in. PVC threaded male adapter $0.34
Carlon E942E 3/4 in. PVC threaded female adpater $0.37
Danco 96732 #15 O-Rings (pack of 10) $2.27



  1. Don in Atlanta on June 13, 2016 at 9:03 pm

    I have to connect a large plug for the(water pump of a fountain to an extension cord. This is a great solution! I already use the expandable outlet cover on a wall outlet that is not covered by an overhang for Xmas lights. Attaching another to the box to cover the other plugs will work great. Thanks so much for posting this solution.

  2. Lou Palladino on September 24, 2017 at 11:08 am

    While doing some research on custom-made, outdoor enclosures, I found this article. Fantastic! Thank you.

Leave a Comment