Almost two years ago, I added some light and UV sensors to my weather station project. Here are the pictures I took at the time, showing the light level sensor:
is a matter of choosing a proper box, with UV stabilised material.
is harder. Due to temperature changes the air pressure inside the box changes, sometimes some air will be pushed out, at other times air is sucked in - often with lots of moisture, maybe even rain water. In your case mostly around the wire (wire glands can help improve this), but even the best sealed box may leak over time.
My favourite solution for keeping stuff dry is the inverted bucket design. A few holes in the bottom of the container, leave electronics powered on all the time, the waste heat keeps everything nice and dry. Moisture can't build up thanks to the openings in the bottom.
May also work for battery powered projects that are asleep most of the time.
Better grade of fasteners, use Stainless Steel and put some sort of lubricant on the threads - aost hardware stores now have St.St. fasteners - or go to a marine supply store if you live near one
Paint the enclosure to help protect from uv
get a small piece of glass from a glass store - I would probably fasten the glass ovev the hole for the sensor window with a combination of 1/16 inch double sided sticky tape designed for mounting windows - then use some UV resistant bedding compound both inside and outside of the tape and on the outside edge of the glass window glop the bedding compound over the top of the glass (unless you are into 3Dprinting and want to make a custom frame) - make sure everything is extra clean
Coat the boards with a conformal coating or maybe just paint epoxy over the boards (except for the sensor) (but for sure up to the edge of the sensor and even under it)
I have a light sensor mounted in an upside down jam jar. The lid of the jar is mounted on a bracket on the wall with the jar screwed into it. The cable comes through a small hole in the lid. I suggest not trying to seal the container but leave enough of a gap at the bottom to let any moisture drain out and to let the air pressure equalise.
Thanks, Leo. I guess some beginners reading this thread might not immediately figure that out themselves.
Question is, where to get a similar box with UV resistant window? As you point out in a later post, glass blocks a lot of UV, so that's not ideal. Which commonly available materials are UV resistant but also UV transparent? I've heard that mica is a good choice, but where can I find a small project box with a mica window? I don't want to spend a fortune, all the other components are inexpensive.
The other question is, whether to try to seal moisture out, or accept that it will get in and allow it to drain/evaporate.
Paul_KD7HB:
Your box is designed for a rubber gasket to go between the lid and the box. I dob't see one in either the old picture or the new picture.
It was and is there, Paul. Hard to see, but you can see it in the second picture I posted. Its some soft white stretchy plastic material that came with the project box. There seemed to be too much of it, so I pushed it into the slot all the way around and finally cut it to length plus a couple of mm so that the two ends were forced against each other in the slot. It still looks pretty good.
The project box was purchased on eBay for very little money and was described as "weatherproof". I was disappointed that the screws were not stainless, but not surprised, given the price.
Not sure what I wanted to measure to be honest. It seemed an interesting thing to try out, as the sensors were available for easy use with Arduino and inexpensive. I suppose I add hoped to compare the UV measurements to the light intensity measurements from the bh1750 sensor and see what that could tell me about what was going on in the sky. But the two readings seemed to stick to pretty much the same ratio...
There is lots of variation in polycarbonate plastics (some are trademarked LEXAN), and some feature additional UV protection, with coatings on one or both sides.
I've used SUNTUF, which blocks everything shorter than 400 nm and lasts for decades in the sun. Utterly amazing material, nearly bulletproof as well.
I guess I could use an ordinary (non transparent) box, drill a suitable diameter hole in the lid for the dome to fit into and seal around it with weatherproof flexible sealant.
This does not solve my problems with the UV sensor, of course. But at least I can get a light/lux sensor working again. Will have to measure & calibrate for the effect of the dome on light readings.
I tested the sensors shown at the top of the thread. The veml6070 UV sensor seems fine. The bh1750 lux sensor appears to be dead. But maybe it's just it's on-board regulator, so I will try powering it directly with 3.3V.