Weatherproof Sensor enclosure

I have built a few sensors using ESP32 controllers and I wanted to put a couple of these outside.

Just want to power the ESP32 via micro USB (most seem to be 3mm cable) and have two ds18b20 sensor cables come out (I think these were 5mm).

I cannot seem to find any suitable enclosures; I can only find electrical junction boxes with M20 glands which have a minimum wire size of 6mm+ or the sonoff box where the glands are too small to get a USB connector through but still wants a thicker wire (and I am not convinced about its IP65 claim)

Am I just looking in the wrong place, searching for the wrong thing or is there nothing out there?

You can get any waterproof box you want and then punch out (or drill with a uni-bit) about an 1" for USB Bulkhead fitting. This would maintain water integrity and if you are concerned about the connections on the external portion of the bulkhead pass-thru then just put some silicon caulk on the USB cable after you plug it in.

There are many types of bulkhead pass-thru, I just linked to the first on in the search for an example. I use these routinely and the only issue is that you want to precrimp down the USB connections so that the cables don’t come loose; but I use them in moving situations. Once there is adequate tension there is not any issue.

I’ve used the ds18b20 sensors with the smallest M20 glands and they fit snugly. Definitely will keep things waterproof.

If you convert the project to be powered off the ESP32 power pins rather than USB it will give you more options for power cables to run.

Then you can use a weather-protected plug like this:

My use was a pool temp controller for my solar heater, and it had no issues being near water.

I have bad experiences doing this and always end up cracking the box :yum:. I hadn’t actually thought about having the socket on the outside of the box but that could work.

Good idea. Would be simple enough just that I had a micro usb cable already of roughly the right length. I guess part of the issue is that a USB adapter is easiest (and fits nicely in the outside plug) so still have the issue with thin cables (they are generally thinner than the ds18b20 wires).

What adapter are you using to actually supply the power?

Do you have a link to that plug?

Barrel Connector

1 Like