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.
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 makexyz.com 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.
- Parts from McMaster.com
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 tinydeal.com (HLD-242646) or dx.com (SKU: 10640)
- Swivel mount from Videosecu with 1/4 inch threads
Here is the timelapse video recorded with this camera.