How I Designed a Compact Weatherproof Raspberry Pi Camera Case

Motivated by the video, Militarizing Your Backyard with Python, I was tinkering with Raspberry Pi for Squirrel recognition to protect my garden bustling with sweet peas and tomatoes. As a step towards the goal, I started first programming Raspberry Pi A+ with OpenCV and then emailing me the face of any person intruding in my backyard. However I found no suitable Pi case in the market which is compact, weatherproof and has elegant look. Fake security camera case sold on Amazon was quite cheap but broke easily. It made me to think towards designing a compact case which can be used outside to monitor the backyard garden and get alerts.


I sat down and sketched the general shape of case on back of a scratch paper. Here is how my sketch looked. I chose to stick with Square shape, though Pi A+ is a rectangular shape.


Sizing the Case

With no experience in designing plastic parts meant watching tutorials from YouTube and learning from the iterations. It took one month for me to become familiar with tools. I broke down the design work several intermediate goals, beginning with obtaining the dimensions of Pi A+, Pi Camera, WiFi adapter and micro USB power cord. Vernier with LCD display manufactured by General Tools was very handy for this work. Ubiquitously available CAD models of Pi and Pi camera also helped to verify the clearances in the design by importing them and assembling with the designed case. Many thanks to the effort by several community members of GrabCAD.


Next step was to size and fit all the parts in the given space. Mounting Pi A+ with SD card and WiFi adapter in the case was easy. Mounting the Pi camera above Pi in as small as possible was a little difficult. I chose to mount camera directly on the top case since the data cable of Pi is flexible.


Weatherproofing method of cellphone or electronic case is pretty standard and based on using a weatherproof seal around the case. It was not difficult to split the case into two parts and then add the groove for holding the seal. Similarly seal of the glass is hold together by the seal holder attached to the case. It compresses the seal and hold it in the place.

Designing of screw bosses was a totally new area for me. I could not find any reliable information source and resorted to plastic part design guidelines from several plastic manufactures and handbooks. I am providing the details of the one from the book, Injection Mold Design Engineering by Davide Kazmer. Suggested size of d was 88% of D.


I used FDM method for 3D printing in ABS plastic due to limitations of escape holes of SLS printing. This is how the camera looks after final design, 3D printing and assembly.


Weatherproofing Test

I tested camera in rain for more than 2 hours and no water entered in it. Here is the picture of it in rain.


After the test in thunderstorm, I opened the camera to see no water in case.


3D Model and BOM

You can view the 3D model and 3D print it from Pinshape. If you do not have the 3D printer then try finding a 3D printer on in your area and use it to print.

Models also available for new versions of Pi3 as described in this recent post and can be downloaded from Pinshape links, Pi 3 and ZeroW.

Camera Parts

  • Parts from
    4-40 Thread, 3/4″ Phillips flat head, total 4 (91771A113) for case
    4-40 Thread, 3/16″, total 4 (91772A105) for Pi
    M2 Size, 5MM, total 4 (92000A012) for Pi camera
    M1.6 Size, 4MM, total 4 (92000A002) for seal
    O-Ring, 13mm id, 1.5mm (5233T39) for seal
    O-Ring, 1.5mm, 1ft length (1187N11) for case and Shrink wrap (6855K14) for USB cable
  • Glass piece 17.9mm x 1.2mm, from (HLD-242646) or (SKU: 10640)
  • Glass piece 18mmx 1.5mm from, since 17.9 mm is not available.
  • Swivel mount from Videosecu with 1/4 inch threads

Here is the timelapse video recorded with this camera.


68 thoughts on “How I Designed a Compact Weatherproof Raspberry Pi Camera Case”

    1. From experience with identical boxes for amateur radio connections, what will be needed is a breathing hole at the lowest point of the box. Those boxes are not 100% rainproof under extreme conditions (coast, hills, etc). So the breathing hole that allows condensation out will also occasionally act to prevent rain buildup in the box.

  1. Hello!
    Nice work!

    Did you ever consider getting an off the shelf IP67 rated solution for your power cable? for instance, look up ‘Cable Glands’ or ‘Clamping Glands’. Once installed you can basically tighten them around the cable by unscrewing it. You can then apply some silicone to it just to be sure. It would give it that nice industrial look too. We use these (the plastic ones) on junction boxes for outdoor electrical installations all the time.

    1. Thank you for the feedback. I did not search for cable glands and looking them up now on McMaster. I will get familiar with them and use it in next version. I searched for waterproof usb cables, but could not find suitable one.

  2. Very cool article, would it be possible to download from somewhere the STL files? I’m just learning to design things and this would help somehow.

  3. Can you post the STL on Pinshape so it can be downloaded and printed? I have a 3d printer already, but it’s not supported via the Streaming method.

  4. Very nice case! Are you planning on selling those?
    I don’t have 3D printer, so I wanted to use service but the only option they have is to upload STL files, not stream them from pinshare. Is there any way to get STL files from you?

    1. Thank you for the feedback. You can contact your local 3D printer before ordering, through mailing system on They are mostly makers and work freely with streams from Pinshape. We are working on next version based on feedback and plan to sell them.

      1. How do you mail them,?
        Can’t find option
        I am in Australia and jave had no luck contacting anyone that can print streamed stl files
        Amy idea on where to look
        Plenty that will go stl

        Cheers. Great work
        Been looking for a case like this for a long tome

  5. What’s the point in blogging about this when your not going to share the STL’s for the other makers out there? If you don’t want to share the STL’s then offer them up for sale here on your blog!

  6. Is there an updated version available that would fit the rpi2? I love this design, but am fairly certain that rpi2 won’t fit. thanks!

  7. pinshape is throwing an error saying “Sorry, purchasing no longer available”.. Is it possible to get this uploaded somewhere else that actually works?

      1. Oh that’s a shame they shut it down. Thanks for the quick reply and re-up! Would you be interested in working on a new version for the recently released version of the Raspberry Pi?

  8. I could easily modify this to fit to next version. However people are reporting thermal issues under certain conditions for new version. I could still release it, if there is large interest. So far only couple of people asked for it.

    1. I’d definitely be interested. Hmm yeah thermal issues could be interesting to solve given it’s weatherproof purpose.

    2. Does the model you are selling come with all the construction history? I’d like to modify it slightly to fit my purposes (fitting it to a pole and adding a hole for LAN connection)

      1. Sure, I can definitely try that. Would you be able to send me an email so we can organise purchasing the CAD model from you?

      1. Damn i thought you would try to shrink the case ;-D Maybe in the next Months for a redesign? Is the ABS plastic ok for using it outside with snow and like -20°?

  9. Hi ,
    Great project you have. I have purchased your files and have tried the Raspberry A model. Write me an email if you are interested in designing a box for Raspberry Pi 3 Model B. I could provide funding for. This has to be an immediate project thou. The IP would still be yours (or public).

    1. I tested one infrared module, Bright Pi. I did not continue to create space for including it further due to some reasons (complexity to assemble, brightness, heat etc.). Which infrared module you plan to use? Many users feel that A+ is better with camera due to low power consumption.

  10. Hello,
    I purchased the stl file of this case from 3DExport and printed it. It’s really great work and it perfectly fits my needs. There seems to be something missing in the part holding the camera (Top-box-mb.stl), though. The photos above show four screws holding the camera in position but in the stl-file there are only two mounting posts. Is that on purpose for some reason or should there be two more?

    1. First install rubber seal of glass, then glass, then seal-mb part into top box with four screws. As seen in this picture.

      Camera is indeed mounted with four screws. Two screw hubs are on seal and other two hubs are in top box. I hope that is clear or let me know.

  11. Also interested in the Pi 3 case. Heat would be a concern given my applications CPU usage. Not sure how that would be handled. Would also need a spot for a USB-based cellular module.

    1. I will be able to spend some time this spring. Again heat is main concern and I may need to test it. I was waiting for some fix from community or for it before making new case.

  12. Love the case, can you make a specific case for a dog tracker I am working on? Most of the Chinese junk is not water resistant, I am interested in a design that can be opened and closed to access the micro-USB for recharging. Let me know if you are interested.

  13. hi i was just wondering, can the design be changed to fit other sizes of raspberry pi? I am need of this but i have a raspberry pi 3.

  14. Hi,

    Would you be willing to modify your Zero Pi enclosure? I am wanting to use a cellular USB modem and it doesn’t look like I will have enough room. I’m willing to pay.

    Thank you,

    Mike C.

  15. Very nice!

    How well has this held up to UV exposure over the years?

    I’d be tempted angle the bottom of the case towards a small hole in the bottom of the back (away form the cable exit), just in case any water does ingress.

  16. Hi, this looks like an amazing product, I would love to know if you can design such a product only for the Raspberry pi 4 Model B ?
    Thank you

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s