PICE case and WiFi upgrade for the remote farm camera

The issues with the Raspberry Pi farm camera were of waterproofing and of iffy Wi-Fi range. Both of these are addressed in the new version. The PICE waterproof case from the guys at EdVenture marshals this motley collection of bits

Pre-PICE prototype
Pre-PICE prototype

into something a bit more organised. There’s no getting away from it, the PICE is quite expensive at about the same as the Pi itself, but it does solve a lot of the mechanical problems of trying to run a Pi outside with a camera. The landscape version is the one i needed, since the case is only water-resistant with the top horizontal – the Pi is mounted on that and even if water does get in it falls to the bottom away from the Pi. The previous version of the PICE took the picture in portrait mode with the case oriented for best water resistance, which isn’t so useful for our aims.

This is a good interim solution – it gets the cameras into a tighter configuration, and should let me pull back the main MiFi box back to a more central location to serve the rest of the cameras. As a result each camera will draw less power which is good. The Edimax EW7711 USB WiFi unit has a better performance than the USB nano-dongle – the reason is obvious when you look at the size of the aerial of the nano

size really does matter in some applications, and and aerial much less than 1/4 wavelength is going to struggle to get the signal out
size really does matter in some applications, and and aerial much less than 1/4 wavelength is going to struggle to get the signal out

although it’s 2.4GHz the wavelength is still 13cm; you still need to get enough metal in the sky to get the 300m path length to work, unless you can mesh.

Holy moly, Batman? Mesh Networking?

I can raise the wifi aerial, and wifi should be good for a typical 300m range if it’s LOS. This is still classic IPV4 to an access point, but there is are interesting developments in mesh networking that would be ideal for my usage. How about BATMAN for instance – seems promising. Could use a RPi Batman network to the shed, which would get the files and then upload via the long-range link. This would save a lot of the hurt that running a RPi AP seems to be associated with.

Need an undervolt cutoff – a micro to control the micro

Power management is crap on the Pi. You run a system halt but the power doesn’t drop that much, you just get not to trash the SD card if you pull the power 😉 I need something to power-manage the Pi to protect the battery. I need an undervolt cutoff. Although I initially went with the traditional NE555 version, to protect the battery, what I’d really like would be a way to –

  1. detect the voltage of the battery and report it back over the LLAP network
  2. use the PIC micro doing that to flag up the power is going to go down in a couple of minutes, so the PI could shut down cleanly
  3. then isolate the power, upstream of the 12V to 5V converter
  4. maybe detect the ambient light level, and shut down the Pi overnight to save power
  5. listen on the RF network, and send a signal to the Pi to take a picture. Would need to change takepic to make sure there wasn’t a version running already in that case. A lock file would do.

5 is one of those nice to have but would be hard to implement, compared to the others. To do it I either need to run the radio all the time, at its 20+ mA, or develop a protocol so it say ready and a client sends a cued message. Maybe drop that for the moment.

saving the SD card

the regular writing of the camera image to the SD card was moved to the existing Pi ram file system on /run/shm/ There’s no need for this to be in permanent storage as it’s uploaded to the web anyway.

6 thoughts on “PICE case and WiFi upgrade for the remote farm camera”

  1. I only just found your blog after struggling with the same weathering challenges, I live in Central Florida and the humidity is a challenge, even with the cctv case I discover the weakened wifi an issue. Additionally in Florida, weathering the pi completely meant eventual heat issues in the summertime…ventiliating in any way means inviting moisture. I’ve had *limited* luck with a slightly ventilated case and keep a silica pouch in the casing (I stock pile them when I find them in various shipping packages).

    I’m currently trying to rebuild a remote “squirrel feeder cam” – my recent attempts last year were a mixed bag: the Pi held up ok, but moisture still somehow found the delicate contacts of the Pi Cam, over time. I’ll be interested in your future adventures, and thank you for posting your challenges and results!

    1. I’ve never been able to entirely seal a camera yet – if you have enough power the way I’ve seen people tackle humidity with CCTV cams is to use a heating resistor near the lens, which nails humidity and indeed ice, and works okay with a case vented underneath.

      Something else to watch for is the Pi lens degrades outdoors in the UK and I guess this might be aggravated in the Florida heat and humidity – putting it behind glass helps with that. On misty mornings the glass steams up first thing but it clears over a couple of hours.

      I haven’t lost one to corrosion of the contacts however! I have two of these and they have been in daily service. My only hardware failure to date was that crazed lens, and my long-distance WiFi link (~400m) has lost too much link budget in the misty Autumn air, I guess the 2.4GHz is always going to be subject to water vapour absorption.

Leave a Reply

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