a Raspberry Pi camera after a season outdoors in the British weather

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

best not let the IEE see that else they'll revoke C.Eng for disgraceful and outrageous bodgery of the first order ;)

and the innards looked like this

the Pi gets big fast when you hang enough onto it to make it useful
the Pi gets big fast when you hang enough onto it to make it useful

So from the outside it now looks like this

Raspberry Pi camera after a year in the open
Raspberry Pi camera after a season in the open. The messy carving of the rain-shield started out that way

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

1410_din_DSCN2527

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.

No evidence of water, no creepy-crawlies - great
No evidence of water, no creepy-crawlies – great

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

Flare on the camera lens after a year in the open
Flare on the camera lens after a season in the open

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.

Update-

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!

Rain is a bit more than rain - even 2m in the air!
Rain is a bit more than rain – even 2m in the air!

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.

 

7 thoughts on “a Raspberry Pi camera after a season outdoors in the British weather”

  1. Howdy! I am looking to do something very similar in application (weatherized outdoor container for a camera) and noted the range you are getting. Can you tell me what you are using to get a range of 250m? Long distance has been the stumbling block for me.

    I should also state that I am the ‘idea’ guy and not the tech guy, so you can keep things on a very high level as I would get lost in the weeds. I just want to know a piece / part / idea to suggest to get a range like you are reporting.

    Thank you kindly in advance!

    Craig Coffman

    1. @Craig the signal path was over a field, so no obstructions. At the camera end I used this and at the receive end I used a standard access point fitted with a modest gain TL-ANT2409A patch antenna mounted on a short wooden post on a shed about 10ft above ground. You may get some range improvement using a TL-ANT2409A on both ends if you can orient them towards each other. Initially I did muck around with Chinese Yagi antenna but the quality is variable and water destroys them after a few months.

      For this sort of application you don’t get any advantage using the two/three antenna diversity reception sort of access point commonly used now; it’s an open field and line of sight rather than indoors multipath.

  2. I found your article very interesting.
    My own experience is with wildlife camera traps based on the raspberry pi to study the urban wildlife around my home. Lenses get dirty and so far I’ve cleaned them with a small sable brush dipped in SLR lens cleaning fluid and a fragment of lens tissue drawn to a point. This seems to work fairly well, but I’ve fitted a 1 cm square slip of microscope slide to a couple. It of course gets dirty but easier to clean; noted however that even indoors dirt still sticks, so regular cleaning is essential. It is best to mount the protective glass as close to the rpi lens as possible.
    Like yourself I worried about rain getting in. But the only thing that has suffered was a 12v AA battery pack which went rusty ( a Maplin 10 cell plastic holder w/press stud connections – still available from Amazon ). The pack powers over night but not much longer. A 12v 12AHr lead acid battery provides power for several days when required, but is bulky of course. Voltage convertor/stabilisers outputting 5v(rpi) and 12v(IR lighting) from supplies up to 28v work well.
    My casings were initially carved out of Maplin project boxes with drainage holes in the bottom. The later ones are 3D printed out of PLA filament; it’s porous, but any ingress drains away and the electronics is suspended on a 3D printed support well away from the side of the casing. Enough I think.

    1. > so far I’ve cleaned them with a small sable brush dipped in SLR lens cleaning fluid and a fragment of lens tissue drawn to a point.

      That probably works if you get in there early. This problem caught me unawares. Looking at the lens with a microscope, I came to the conclusion the problem is some sort of fungal attack on the coating of the lens, presumably the same sort of thing that took down my Canon SLR lens

      Having said that, the microscope slide (with a small O ring to seat the camera on to it) was a 100% win for me, I haven’t lost any more lenses/Pi modules, and with no anti-reflection coating on the slide there’s nothing for the fungus to attack that doesn’t come off with cleaning. The price is a bit more flare when the sun falls on the camera.

      Your cameras are probably better off than mine if they’re powered 24/7 – mine would mist up in the early morning but clear after about an hour. Mine were only powered 5 mins out of every 30 and not at all overnight, so heat wouldn’t build up fast enough to clear condensation.

      Definitely a fan of the allow water out. I did try my best to seal one case, it took forever to clear condensation. It seems most plastics absorb some water – only PTFE doesn’t, and you aren’t going to be 3D printing that any time soon 😉 So we’re on a hiding to nothing trying to keep water out of a plastic case enough to avoid condensation in future.

Leave a Reply

Your email address will not be published. Required fields are marked *