top of page

Unattended Outdoor Imaging: A Practical Guide to Weatherproofing Raspberry Pi Cameras

Updated: Apr 9

The affordability and adaptability of Raspberry Pi cameras have unlocked numerous innovative applications, a prime example being their use in indoor plant phenotyping as part of the PlantCV project (DDPS Center). However, deploying these versatile cameras outdoors presents a unique set of challenges.


My own journey into the world of credit card-sized Linux single board computers (SBCs) began in 2015, thanks to an electronics engineer friend. He was then developing an IoT-enabled device, ingeniously combining a BeagleBone Black SBC with a USB microscope to monitor the fascinating world inside bee colonies and beehives. Initially, I followed suit and started with the BeagleBone, eventually transitioning to the Raspberry Pi. The reasons behind this switch are a story for another time, but I can attest to having had excellent experiences with both platforms. If your experience has been solely with the Raspberry Pi, I highly encourage you to explore the capabilities of BeagleBone boards as well!


Figure 1. Assembly and test setup for the low-cost imager designed for continuous unattended field monitoring in agricultural fields.
Figure 1. Assembly and test setup for the low-cost imager designed for continuous unattended field monitoring in agricultural fields.

A few years ago, a project required me to construct several multimodal (thermal and RGB) Raspberry Pi cameras (Fig. 1) and mount them on a center pivot irrigation system operating in a mint field. These imagers needed to withstand at least an entire growing season, approximately four months, and autonomously capture images throughout. While seemingly a straightforward task, I encountered several significant hurdles. Two of the most critical questions I had to address were:

  • How to effectively waterproof the cameras?

  • How to ensure a continuous power supply?


The imager housing I developed and tested across multiple projects proved to be remarkably robust and shock-resistant, all while remaining inexpensive to 3D print and assemble. This project dates back to 2016-2017, and I have since published several papers detailing its aspects. Despite this, I continue to encounter inquiries at conferences and seminars from individuals seeking solutions for deploying Raspberry Pi cameras in outdoor field conditions.


Therefore, in this article, I will address the first of these critical challenges, sharing the detailed design of the [almost] weatherproof field enclosure I developed for the imager, including its 'stl' 3D design files (available at the end of this article). I will delve into the second challenge, ensuring continuous power, in a subsequent article. For those eager to learn more immediately, I encourage you to explore the papers listed in the references section, as well as my white papers and research articles, which provide extensive information on the camera and its field applications.


Thermal-RGB Imager Design

While many Raspberry Pi camera setups utilize a single imaging sensor/module (either RGB or thermal), this particular project necessitated a multimodal imager. My strategy was to leverage RGB images to create masks through image processing, which could then be applied to the corresponding thermal images of the same target. Figure 2 illustrates the electronic components of the thermal-RGB imager I built.


The electronic hardware core is a Raspberry Pi SBC (Raspberry Pi Foundation), complemented by a radiometric thermal module with a shutter (FLIR Lepton® 2.5, FLIR Systems, Inc., Wilsonville, OR), an RGB Raspberry Pi camera module (V2, Raspberry Pi Foundation), a GPS module (Ultimate GPS Breakout, Adafruit Industries, New York City, NY), a 2-channel relay board (SunFounder, Shenzhen City, Guangdong Province, China), and a precise DC-DC step-up/down voltage converter (S18V20ALV, Pololu Robotics and Electronics, Las Vegas, NV).


The FLIR Lepton v.2.5 thermal module offers a resolution of 80 (horizontal) × 60 (vertical) pixels, a frame rate of 9 Hz, and a spectral response wavelength range of 8-14 µm. Its horizontal field of view (HFOV) is 51°. I utilized a breakout board (FLIR Systems, Inc., Wilsonville, OR) and the SPI communication protocol to acquire data from this module. The Raspberry Pi camera module boasts a resolution of 3280 × 2464 pixels, with an HFOV of 62.2° and a vertical field of view (VFOV) of 48.8°.


Figure 2. Electronic components of the thermal-RGB imager. The electronic hardware includes a single-board computer, thermal module (radiometric with shutter), RGB camera module, GPS module, and relay board.
Figure 2. Electronic components of the thermal-RGB imager. The electronic hardware includes a single-board computer, thermal module (radiometric with shutter), RGB camera module, GPS module, and relay board.

During initial experimentation with the thermal module, I observed occasional freezing after several hours of operation. To address this, I incorporated a relay board, enabling both automatic and manual resetting of the module. The GPS module provides an accuracy of ±1.8 m under ideal conditions and operates using the traditional latitude/longitude/altitude system. Importantly, the GPS module also provides a real-time clock (RTC) functionality to the Raspberry Pi.


To simplify field configuration and enable real-time monitoring, I developed a graphical user interface (GUI) using the Qt IDE (The Qt Company, Santa Clara, CA) and various C/C++ libraries, including OpenCV for computer vision tasks. Key features of the GUI include automatic real-time overlaying of RGB and thermal feeds, a manual capture mode (snapshot), programmable capturing time windows, and automatic interval shooting. I programmed the imagers to automatically capture images within a specified time window (10:00 AM – 2:00 PM) at defined intervals (1 minute) and to automatically shut down to conserve power.


Captured images were processed and stored on a 16-GB SD card. At each capture event, four images were recorded: 1) a thermal image in binary format, 2) a thermal false-color image in JPG format, 3) an RGB image in JPG format, and 4) an automatically aligned composite image of the RGB and thermal data in JPG format. GPS coordinates were also recorded separately in TXT format for image geotagging. With the aforementioned logging interval of 1 minute, the 16-GB SD card provided sufficient storage for approximately 45 days of continuous image recording.


Weatherproof Housing

The Raspberry Pi unit can generate a significant amount of heat depending on its CPU utilization, necessitating effective heat dissipation. Simultaneously, the enclosure must prevent the ingress of dust, humidity, and water. To design a suitable housing, I conducted a series of experiments with various custom-designed enclosures. The final enclosure design is depicted in Figure 3. It achieves a high degree of weather resistance, with the thermal and RGB module lenses being the most vulnerable points.


To mitigate this, I incorporated a conical frustum-shaped head to deflect raindrops away from the camera modules. A hole was included in the housing to accommodate cables and wires, which was then sealed using inexpensive and effective duct sealant. An alternative sealing option is 100% silicone sealant. The imager housing measures 20 cm in length, with the widest section having a diameter of 16 cm and the narrowest section a diameter of 9 cm. The center-to-center distance between the camera module lenses is 25 mm.


Figure 3. Thermal-RGB imager enclosure.
Figure 3. Thermal-RGB imager enclosure.

I designed the housing using Tinkercad (Autodesk, Inc., San Rafael, CA) and printed it using an Ultimaker 3D printer (Ultimaker, Geldermalsen, Netherlands) in our lab – although I would not necessarily recommend this specific 3D printer model! As shown in the top view of Figure 3, I attached an external GPS antenna and a bullseye level to the imager enclosure. When the imager is installed in a nadir (downward-facing) orientation, the conical head effectively protects the lenses from direct precipitation. While dust and fine water droplets carried by wind during irrigation events were a potential concern, field deployments over several months and numerous irrigation cycles demonstrated that this was not a significant issue.


Figure 4. All the electronics were attached to a compartment (printed in gray filament) except for the camera modules, which were screwed to the cap.
Figure 4. All the electronics were attached to a compartment (printed in gray filament) except for the camera modules, which were screwed to the cap.

The heat generated by the Raspberry Pi CPU tends to accumulate at the top of the housing, away from the sensitive electronics, allowing for gradual dissipation. I designed and printed an internal compartment (Fig. 4) to securely house the electronics, including the Raspberry Pi, within the enclosure. All electronic components were attached to this compartment, with the exception of the camera modules, which were directly screwed to the cap. The cap was then fastened to the main body of the enclosure using two small screws and sealed with 100% silicone sealant.


3D Design Files (stl format)

The zipped "stl" files for the 3D design are available here (Resources > 3D Designs > DurUntashLab_Thermal_RGB_Imager_Housing_WSU_2017.zip). You are welcome to use the design as is or modify it to suit your specific needs.



I strongly recommend printing the design using ABS filament. While PLA can also be used, it is crucial to avoid exposing the enclosure to direct sunlight or leaving it in hot environments like a car on a summer day, as this can lead to deformation or even melting. If you have a 3D printer capable of printing ABS filament, please use the following settings or adhere to the manufacturer's instructions for optimal results:

  • Material: ABS

  • Layer height: 0.25 mm or finer

  • Infill: 80%

  • Brim width: 8 mm

  • Print speed: 40 mm/s

  • Printing temperature: Varies by filament brand (220 °C, default)

  • Build plate temperature: 100 - 110 °C


Radiation Protection

Figure 5 illustrates how the imagers were installed in the field. Under typical outdoor use, prolonged exposure to sunlight can cause some degradation and yellowing of the enclosure material. However, this does not impact the functionality of the internal electronics in any way. To significantly extend the lifespan of your imager, especially in situations with unavoidable long-term sun exposure, I highly recommend applying a UV protectant to the enclosure before field deployment.


Figure 5. Thermal-RGB imager mounted on a center pivot irrigation machine.
Figure 5. Thermal-RGB imager mounted on a center pivot irrigation machine.
Figure 6. Sample thermal and RGB images of mint plants automatically captured by the thermal-RGB imager.
Figure 6. Sample thermal and RGB images of mint plants automatically captured by the thermal-RGB imager.

In Conclusion:

Successfully deploying Raspberry Pi cameras for continuous, unattended measurements in the field hinges on robust weatherproofing. The inexpensive 3D-printed enclosure design detailed in this article provides a practical and effective solution to protect the delicate electronics from the harsh outdoor environment.


By carefully considering material selection (ABS is recommended for its thermal stability) and implementing proper sealing techniques, researchers and enthusiasts can confidently deploy these versatile cameras for extended periods, unlocking a wealth of possibilities for environmental monitoring, agricultural research, and beyond.


While power management remains a critical aspect for truly autonomous operation (a topic for future discussion), this weatherproof enclosure represents a significant step towards reliable and long-term outdoor Raspberry Pi-based imaging deployments.


References

Osroosh, Y. et al., 2019. Detecting fruit surface wetness using a custom-built low-resolution thermal-RGB imager. Computers and Electronics in Agriculture, 157: 509-517.


Osroosh, Y. et al., 2018. Economical thermal-RGB imaging system for monitoring agricultural crops. Computers and Electronics in Agriculture, 147: 34–43.

Comments


bottom of page