All Sky Camera

posted in: Astronomy, DIY, Electronic, Photography | 34

During winter, when the sky is clear, we can often witness northern lights above Whitehorse, YT. I wanted to capture these aurora events and share them with family and friends so I decided to create a camera that would live stream a view the sky on the internet.




I borrowed the idea from AuroraMax but I didn’t want to spend too much money in the construction so I chose to use a small USB camera instead of a large and expensive DSLR. I was inspired by Martin Lewis all sky camera which he built using an ASI120 astronomy camera. This camera uses USB to communicate with a computer. The maximum length for USB 2.0 cables is around 5m. This means that your camera can’t be more than 5 meters away from your computer. This is somewhat limiting when you want to put a camera on a roof. Instead, I decided to bring the computer inside the camera enclosure by using a small but fairly powerful computer. i.e. a Raspberry Pi 2. I added a USB wifi dongle to transfer images from the computer to the wireless router.




The enclosure of the camera consists of a 4″ ABS pipe with 1 end cap and 1 threaded end cap. A hole is cut in the top one to accommodate the lens and an acrylic dome is screwed over the lens. The bottom cap can be open to access the computer and camera.

Only a main power cable comes out of the camera. The maximum distance of the device is only dictated by the range of your wifi.




The camera starts at civil sunset, captures a 5second exposure image every 10 seconds and uploads it to a page on this website. It stops the capture at civil sunrise. After that, it generates a time lapse video of the night and uploads it as well.

This is an example of what a time lapse looks like.



34 Responses

  1. Randy Flynn

    Hello Thomas,
    This is a very impressive build! I wish I had saw this before I started my build although I saw some similar. I too am using the ASI224mc with the stock fish-eye lens that cam with the camera. I have used a pvc weatherproof enclosure box from Lowes with an added acrylic dome, a thermostatically controlled brush-less fan and heater. At the moment it is usb wired to a desktop just inside my roll off roof observatory. I am having to use a program called HANDYAvi for camera control which works pretty well but I don’t seem to get quiet the clarity that you are, due to different codecs possibly. I would be interested to discuss your project more if you like. I have been in talks with CAMS and SkySentinel, both NASA network meteor monitoring projects. Currently they use CCTV cameras but seem to be interested in the progress of the ASI cameras. I would just forwarded information about swedish and croatian team that are using the ASI cameras with raspberry Pi’s much like yours. So my second build will hopefully be based on that since it will allow the collection of scientific data besides just imaging. Would you be interested in collaboration as I attempt to move forward with the CAMS and Skysentineal teams.

  2. Bryan

    Im wondering if this projects software can be made to work with imaging source cameras? or other ASI cameras?

    • Thomas

      Hi Bryan,
      In theory, this could work with anything producing an image. The only code that is specific to ZWO cameras is in capture.cpp. It uses ZWO’s function calls to talk to the camera but other manufacturers provide their own SDK so we could have a capture_qsi.cpp, capture_zwo.cpp, capture_imaging_source.cpp, etc.
      The only problem is that I only own a ZWO camera so I can’t test the software for the other cameras.

      • Bryan

        Interesting, thanks for the quick reply. I assume other ASI cameras can be added as well, I only saw a couple models when I looked in github.

        Ill try to play with it and my ASI1600MM (not that I would use that camera for an all sky!). Very interesting project, thanks for all your hard work!

  3. Robin


    I too have an All Sky Camera with an imaging source (DFK) camera, but run software on a PC to capture and upload my images. I have a ASI120MM, so might try that on a PI. The only PI I have here is a model 1 B, will that work or do I need a PI2?



    • Thomas

      Hi Robin,

      The software works on armv6 and armv7 architectures so you’ll need at least a Pi2. It “may” work on a Pi1 but I don’t have one at home so I can’t confirm it would compile properly.
      Let me know if you run into problems.


  4. Sabrina Fells

    Wow! That’s just phenomenal. What do you suggest a beginner in skycam start with?

    • Thomas

      Hi Sabrina,

      Do you mean in terms of equipment or targets to look for?
      You can easily use the camera to monitor a location (observatory for example). The keogram and startrails features of the software will give you a quick way to detect cloud cover and meteors.


  5. Andrea Massimo Carminati

    hi, where i can find the picture and timelapse after night without setting up an ftp ? they will be saved in a folder? tnx

    • Thomas

      Hi Andrea,

      The pictures and timelapse are stored on the Raspberry Pi. The folder is located at /home/pi/allsky/images/
      You can also see them using the GUI under the images tab.

  6. Andrea Massimo Carminati

    ok thank you, but there is someting to do for enable the picture saving? i leave the camera out all night but there isnt any file in the images folder

    • Thomas

      No there’s nothing to do to enable the picture saving as long as your GPS coordinates are correct. The system should calculate when night starts and then start the saving process at the same time. Saving stops at sunrise.

  7. Camille COLOMB

    Hello, I must first congratulate you and thank you for the work done and sharing.
    I am an astrophotographer in France and realized last week your Allsky camera.
    However I will need help once again, how to create the site visible from anywhere.
    I must specify that I am a beginner in Raspberry …. etc ..
    If you had the agility to guide me it would be great !!

    but what you have done is already huge !!
    so thank you


    • Thomas

      Hi Camille!

      I think this is what you’re looking for:
      Let me know if you have any questions.
      Also, very nice work on the Strock-250. It reminds me of the one I built a while ago.
      And superb photos of the galaxies. M51, M101 and NGC4565 are my favourite targets. I haven’t really started serious astrophoto but it’s nice to see what can be done!

      Bonne journee,


      • Camille

        Hello Thomas,

        Thank you for your passage on my site !!
        it is true that the strock 250 is a marvel !! to be able to observe the universe with an instrument made of these hands is great !!
        Well I really have a lot of questions about your allsky !!
        I came across your page:
         and what I would like to have, and if in addition I could add a small station eteo like Mweather it would be top and even my AAG cloudwatcher !!
        But, and there is always a but !!! I am unable to do this on my own, I saw your page ( but I am unable to do something!
        would you be leaving to guide me?

        thank you very much for everything you have done !!


        • Thomas

          Hi Camille,

          All you have to do with the allsky-website project is to download it and upload the files to your server. You can create an “allsky” directory and put everything in there. You’ll have to edit config.js to match your location.

          Then you can edit scripts/ on the raspberry pi to make the upload happen. That should be all you need to do to get it to work.


          • camille

            Hello Thomas, it seems so simple !! but for me it is not necessarily.
            Sorry for the inconvenience.
            onc i have to take another raspberry to make a server, or i have to do it on the raspi of the allsky?
            if I have to mount another RPI what kind of server? a recommended tutorial?
            you can answer on my mail if you prefer
            thank you

  8. Daniel

    Hello Thomas
    Thank you very much for the software
    It works great on a RASPBERRY PI 3B and an ASI224
    Is it possible to do a time lap in manual
    Have a nice day

    • Thomas

      Hi Daniel,

      Yes, you can generate the timelapse manually. In the terminal, navigate to the allsky directory and type: ./scripts/timelapse 20190320

  9. Ian Hepworth

    This looks to be the gold standard of allsky cameras, Im new to pi and due to budget restrictions I dont have the funds for an ZWO camera.
    Just about to set up a pi3B+ with a version 2 noir camera with a fisheye lens as a poor mans alternative would your code work with that?
    Im also new to the world of pi so it might be a silly question


    • Thomas

      Hi Ian, the code is meant to work with a ZWO camera but someone re-wrote part of the code to make it work with a raspberry pi camera. I haven’t tested it but you can give it a try. After installation, you’ll need to replace the file capture.cpp by this one:

      Then you’ll have to compile it: make capture
      It should work (I haven’t personally tested it though) but there are some limitations. You won’t be able to use all the controls available in the software (c.f. the comments at the top of capture.cpp here

  10. Werner Klinger

    Hello Thomas
    i try to update a old meteor camera from the german DLR by replacing the analogue camera with an asi 120 mc and your very useful software. It’s a huge tripod with the camera and a shutter in a casing on top. On the bottom-plate lies a parabolic mirror, accurately centered, so we can use the captured images for different measurements, i. e. height an speed of meteors. The first few tests has been successful. Our astronomical club will install it on the top of a highschool, when i finished my work.
    I just tried to put the dark-frame substraction into the service, but no “dark.png” appears in /allsky.
    Do i have to do the procedure during the night, when the automatic session is running, or can i do it the day over? It would be necessary, because the hotpixels make it difficult to evaluate the picture when it has captured a meteor.

    With kind regards,

    • Thomas

      Hi Werner,
      That project sounds fantastic. For the dark frame, I probably didn’t document it very well but it only works at night. However, you can trick the software by setting your longitude temporarily to a different value (somewhere on earth where it’s dark). The allsky software will then start in night mode and you can enable the dark frame capture (with a cap on the lens). Once you’ve captured a dark, you can switch your longitude back and it should start using the dark frame.

      • Werner Klinger

        Hello Thomas,
        a few weeks of testing are over and all is working fine. I added “the machine” in the “I made it”-Section on Instructables. Sorry for the late reply.
        I take the darkframe now during the night. It makes no sense to trick around, because of the higher temperature of the sensor during the day. Depending on the weather conditions (average temperature during the night) it will be useful to take the dark frame a few hours after starting. Maybe i collect different darks for various temperatures and use them when the conditions are changing.
        At the moment it looks like that each 5 degrees Celsius (plus or minus) an adjustment is necessary to minimize the color noise of the camera.


  11. stefaco

    Hello Thomas,

    I’m running about few February an no online version of all sky and it s very beautiful, thank you very much for this job, i think publish to online very soon ..

    But before, i would like to solve a trouble : about this last 15 days . at the end of each night script for create timeline,startrails and keograms are not generate everyday (1/5 days), .. do you think it’s software or hardware trouble (raps3+T7cam “clone zwo120”)

    There is somewhere a log to to see why this trouble arrive?

    Thanks in advance


    • Thomas

      Hi Stef,
      I haven’t used a T7 camera so I can’t tell for sure if it’s coming from the hardware but you can see if there were some errors by running this in a terminal:

      service allsky status

      It may have more information there.

  12. Paul

    This has been a really great project. I have my version up and running but want to know how you handle thermal control? I am using an 8″x8″x5″ IP65 junction box I bought through Amazon for $21. When running it during the day, the ASI224 was running at above 60C. This is above storage temperature let alone operating temperature. My solution was to add two 12VDC fans, which required some holes in my sealed, weather-tight junction box. They are controlled through relays so I modified the code a little bit to add some relay logic. It does keep the sensor temperature way down. Temperature is consistently between 30C and 35C. Since the fans do not run continuously, the components can act like a heater at night providing dew control. I have yet to see how things will survive the winter.

    So what do others do to keep their system cool?


    • Thomas

      Hi Paul, thanks for the description of the modifications you made to keep the camera running cool. Camera owners have all their personal hacks to protect it from over-heating. I would suggest to take a look at the bottom of that page before the comments section. You’ll see a list of builds from the community.
      I’ll add your camera to the map.

  13. Rob

    Hi Thomas! Looking forward to building this project in the coming months. I am comfortable with the hardware and the programming, but I’ve never set up a website from a home server before. Where would you recommend I start to get a site like yours up and running? Do you use WAMP Server or something similar? Any help is appreciated! Where would I copy your Allsky website files to? Thanks and let me know!

    Rob – SLC, UT

    • Thomas

      Hey Rob,
      For a website on a home network, you can use LAMP or WAMP for sure. Just drop the content of in the public_html or www folder depending on your server configuration.
      On the camera side, you’ll need to modify scripts/ to point the host to your home computer IP.

      • Rob

        Right on! Thanks! I discovered that using a wordpress site hosted by bluehost actually makes the most sense for me. However, I cannot seem to figure out where to dump the files on my host’s directory to make the page appear correctly at “” without using the main site’s theme. Can you point me in the right direction? For context, my main theme is at the location “public_html/wp-content/themes/”. Thanks again for your help!

      • Rob

        Nevermind! Just figured it out after 30 seconds of extra thought. Thanks again! I’ll share my build once I’ve completed the hardware.

Leave a Reply