Raspberry Pi 4 Based AllSky Cameras

Version 1 – PVC pipe & fittings

A couple of months back, I put together an all sky camera system for the Martz-Kohl Observatory near Jamestown, in Western New York. An all sky camera provides a (near) 180-degree fisheye view of the sky. This project was a joint effort with other members of the observatory. One member supplied parts for the system enclosure while another donated a Raspberry Pi 4B single board computer and ZWO ASI224MC astro-camera and lens. Others donated time and expertise for assembling and mounting the system on top of the observatory. There were definite lesons learned as the original assembly leaked under severe weather. The fight with dew and frost is ongoing. It will take some effort and thought to automate a method of keeping the dome clear. For now, an occasional cleaning of the dome’s’s exterior keeps everything working 🙂

Version 2 – sealed enclosure

SO, with lessons learned, I built a version 2 all sky camera system! As opposed to the PVC pipe enclosure, I went with a waterproof box, similar to what other DIY folks have used. I used parts that I had lying around: a Raspberry Pi 4B, R-Pi HQ camera, an Argon Fan HAT and a USB 3 SSD that I was no longer using. I purchased a lens, dome, USB C cable mount, and various hardware and sealants.

On both systems, I use the Allsky software which is open source and available on github.

enlarge / full screen for best viewing

A complete parts list of the new system is below. The particular enclosure I purchased came with a breadboard with perfectly spaced holes that fit the Raspberry Pi and HQ camera mounting holes. I used a variety of spacers, screws and nuts to attach things to the board. I was fortunate to find a nice lens on ebay- a Fujinon Fisheye Lens: CF2.7HA-L1 C-Mount, f1.8, 2.7mm. This does not cover an entire 180 degrees on the R-Pi but is close at about 150 degrees. I added the Argon Fan HAT to the Pi, both to keep the Pi cool in summer heat and also to try to keep dew from forming on the dome. Time will tell if this works or if I’ll need to add some kind of additional heating element. This system is located in Northern California and does not experience as severe weather as the system in Western New York.

A few lessons that I learned from from an experienced maker: If using silicone sealant, make sure you put it on under pressure. I.e. put the sealant on the dome and mounting surface and then mount and tighten screws to create a good waterproof seal. Don’t just add sealant after mounting the dome. If you are using anything threaded to assemble a waterproof system, add silicone grease to threads and seals. This will help keep things waterproof and enable you to remove/unscrew as needed. If you are going for an enclosed system (as opposed to one with vents), use as many silica gel desiccant packets that will fit AND make sure you can replace/recharge in the future.

Rather than doing a step-by-step tutorial on how to build, I am showing various pictures of the process. Different folks will start from different experiences and will have a variety of tools and parts. I’m happy to answer questions in the comments section…

Parts list:

MAKERELE Waterproof Electronic DIY Projects Cable Enclosure 6.89”x6.89”x3.94” (175x175x100mm)
https://smile.amazon.com/dp/B08PB4N3SK
$23.00

Raspberry Pi 4B w/ 4GB RAM
https://www.adafruit.com/product/4296
$55.00

Raspberry Pi High Quality HQ Camera
https://www.adafruit.com/product/4561
$50.00

Argon Fan HAT for Raspberry Pi 4
https://smile.amazon.com/dp/B07Y9LFP1J
$13.00

OBVIS USB Type C 3.1 Male to Female Flush Mount Cable Waterproof Kit
https://smile.amazon.com/dp/B09HWSFRP1
$8.00

MCMASKE 450PCS M2.5 Nylon Assortment Kit (screws, nuts, standoffs)
https://smile.amazon.com/dp/B0B5LTQXX8
$15.00

USB C Adapters – 5 Pack: Up&Down, Middle Bend, Side Bend, 90 Degree Right Angle
https://smile.amazon.com/gp/product/B0B48911J6
$15.00

Silicone Waterproof Sealant (tube)
https://smile.amazon.com/dp/B0002BBX3U
$6.50

Silicone grease SG02, USDA rated H1 food grade lubricant (tube)
https://smile.amazon.com/dp/B08QFQ8LFR
$10.00

Wisedry 50 Gram [10 Pack] Silica Gel Desiccant Packets
https://smile.amazon.com/dp/B07TCGPZXK
$17.00

Trolleyshop Diameter 3.15inch/80mm w/ 4 Holes Acrylic Flange Plastic Hemisphere
https://smile.amazon.com/dp/B07L6FBMXF
$14.00
OR
Trolleyshop Diameter 3.94 inch/100MM w/ 4 Holes Acrylic Dome
https://smile.amazon.com/F-ber-Diameter-Acrylic-Replacement-Security/dp/B07L6GLTNP
$15.50

Lens options:

Arducam 120 Degree Ultra Wide Angle CS Lens (3.2mm) for Raspberry Pi HQ Camera
https://smile.amazon.com/gp/product/B08GLYR572
$35.00

Fujinon Fisheye Lens-185 Degree-Model: CF2.7HA-L1 C-Mount, f1.8, 2.7mm (eBay)
https://www.ebay.com/b/C-Mount-Camera-Lenses/3323/bn_15898649
about $100.00

Focusafe 5 Megapixel CS Mount Fisheye Lens f2, 1.55mm (AliExpress, China)
https://www.aliexpress.us/item/2251832726956909.html
about $75.00

AllSky Optics ltd – 180-degree FOV 1/2” 1.55mm f2 CS mount AllSky camera lens (UK)
https://www.allskyoptics.com/store
about $110.00

enlarge / full screen for best viewing

8 thoughts on “Raspberry Pi 4 Based AllSky Cameras”

    1. You really can’t focus the lens when inside the enclosure. In my case the particular lens I used (fish eye) does not have a focus ring. I used Raspbian camera utilities (libcamera-still) to focus on clouds using the preview mode and viewing on the monitor. I needed to use the HQ camera backplane adjustment to focus. I then locked the focus screw.

  1. Do you have a solution to the overheating? I built a very similar unit and the camera sensor runs so hot, I had to turn off Daytime use, Then to further reduce the temp, I rebuilt the unit with 2 enclosures, one for the camera and one for the Pi4 with 2 small conduits connecting them. it still runs very warm and I worry about the camera. For example it is currently only 30F outdoors and the sensor is 52F, during the day it can reach much higher temps if running.

    1. I am monitoring the CPU and GPU temperatures. I do have a temperature controlled fan on the R-Pi but I’m not yet sure how much that will help in high external temperatures. How are you getting the R-Pi HQ Camera sensor temperature?

  2. Graham Errington

    I’ve recently built my first Allsky camera, and like yours it’s in a project box so I’ve been thinking about how I mount it.
    I never thought about making a small wooden base and using bungee cords to secure it, such a simple idea, I’m glad I came across your site.

  3. Hi. This is all amazing work. One question. The external hookup between the power cable and the connector. Isn’t that an issue with the weather? Thanks!

    1. The plug is weatherproof at the box AND I use a generous amount of Silicone grease (SG02, USDA rated H1 food grade lubricant) all around the plug AFTER inserting the connector.

Leave a Comment

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

Scroll to Top