The old pig camera is due for a rebuild. I went with the Pice outdoor case for the new one, but it’s interesting to see how the old one stood up to the weather. It was still operating when I decommissioned it because I needed to scavenge some of the network parts for the new one. In particular I now use a central WiFi/Mobile node to cover the whole farm, and use Wifi to upload the pictures for each camera via that node.
The original one ran the Mifi node and the Pi all the time, which was hard on battery power. Hence the rebuild, but if the case held up over a season I may as well use it rather than splash out for a new Pice…. The original case was larger than it needed to be, but I can now use this space to put the light sensor and 12V to 5V DC-DC converter inside it.
So how did it stand up to the ravages of the elements. When it was new it looked like this
and the innards looked like this
So from the outside it now looks like this
Which isn’t bad. It vindicates one of the things i did, which was to use plastic screws for mounting. Unfortunately the camera needed M2 screws which were steel, and these rusted. The sun bleached the tape, but the box itself stood up to the light well.
The cheap Chinese DIN socket is starting to rust
I had fitted this on the underneath of the case. There are two philosophies when it comes to trying to run electronics outside. One is to go IP65 all the way and keep water out, which means waterproof enclosures, Dri-Plugs for power etc – you’re looking at about £20 to get the power through the case and maybe another £20 for the case itself. Farm hacks don’t really need that sort of ruggedness, which brings me ot the other philosophy
Accept water is going to get in. Mount all connectors on the bottom so it can drain out. I actually picked this up from the PICE guys – they mount the raspberry Pi on the lid of the case, so water could be standing on the bottom half and it would be okay.
As it was no water seems to have penetrated, no creepy-crawlies seem to have got in. The latter are a pain with electronics outside- they seem to be attracted to the heat, or maybe the power itself. It certainly helps to lift the device into the air, or simply put it on a stick a metre or so high, compared with ground mounting. But this looks clean, there’s a little bit of evidence ingress on the seam, and the PVC tape degraded in the UV so this may be worth some thought. I will re-use this box, mounting the microcontroller timer and the light sensor on a board set into the rails, so I don’t have to drill the box for mounting.
However, one thing has been impaired, and that is the lens of the camera, which gives a hazy effect – it was clear and not foggy when this picture was taken
Normally a CCTV camera is behind a piece of glass to keep the elements out and now i know why. Cleaning the lens with IPA didn’t help. I am tempted to glue a piece of microscope coverslide over the tiny lens in future this would have the optical quality and would be cleanable/replaceable.
The replacement was up for a couple of weeks in a PICE that comes with a rubber gaiter which seems to show the cause of the problem. Bearing in mind this was 2m up in the air, these watermarks show there’s a lot more to rain than water, even at camera height!
Other ways to handle the degradation of the camera lens
Another idea is using a dummy CCTV case. The trouble with that is it will stop the wifi getting out properly, I’m looking for a 250m range, and it will be a struggle to get the Pi in and the control board. There’s no real guarantee the glass is any good, either. A way round the wifi would be to take the USB lead out to a separate plastic box big enough to take the control board and a long-range WiFi dongle – that would let me backfeed the Pi up the USB cable, so I’d only have one cable hole to waterproof on the Pi.
Alternatively I could regard the Pi camera as a regular replacement unit. It’s a little bit dear at over £20, and a pain. I haven’t found a source of replacement lenses, but people sell adapters from the Pi to M12 standard CCTV lenses, the mounting holes of the pi are 21mm apart. One way would be to remove the damaged stock lens and switch it for a M12 lens, these are easily had. Regular CCTV lenses are bigger, so they are easier to clean, and made of glass usually which should be good, although I don’t have too many complaints about the image quality of the stock Pi lens. The nice thing about using M12 lenses is a range of focal lengths is available. What makes the Pi score is the high resolution of the image – on something the size of a farm that’s the only chance to get to see what’s going on.
Regular analogue CCTV is just too low-res as are low-tech 640×480 webcams.