Secondary Menu

Wireless All Sky Camera

About: Most of the things I build usually relate to either astronomy, physics or woodworking in general.
More About ThomasJ1 »

An all sky camera is a device designed to take pictures of the entire sky over a certain amount of time, usually to monitor meteor showers or other astronomical phenomena.

I built mine to monitor the northern lights. I live in the Yukon and we sometimes get beautiful aurora displays during the night. However, I also have a day time job and I need my 8 hours of sleep. I created this camera to record a movie of the entire night. That way, I can replay the movie in the morning and never miss any aurora night.

Step 1: Requirements and Materials

My requirements for this camera are the following:

needs to photograph most of the sky

needs high sensitivity to low light

should be weather proof

no wires should run to the house

needs to be autonomous

needs to create a movie from pictures and upload it to the internet

needs to start at dusk and stop at dawn

After thinking about it for a while, I decided that the device should include its own computer and send the pictures using wifi. As for the camera, I decided to use an astronomy camera that would be small enough and was powered over USB.

I thought about adding a dew heater but after a few month of testing, I never got any frost on the acrylic dome. This is possibly due to the heat produced by the raspberry pi itself.

Step 2: Wiring

In this instructable, I will assume that you already have raspbian installed on the SD card.

The wiring is relatively easy. Plug the USB cable to the camera on one side and the raspberry pi on the other. Plug the wireless dongle into one of the 3 remaining USB ports of the pi. Insert the micro SD card in its slot and plug the raspberry pi to its 5V adapter.

In order to keep things tidy, you can fix your camera and computer onto a plywood board like I did on the picture.

Step 3: Build the Enclosure

The enclosure is made of a 4" ABS pipe, a flat end cap and a threaded end cap with its lid.

The flat cap goes on top and is drilled to the diameter of the camera. The threaded cap goes at the bottom and a hole (for the extension cord) is drilled in the centre of the lid.

The acrylic dome can be fixed onto the top end using weather proof silicone. I used an acrylic ring but it makes things more complex than they need to be.

You can now fix the enclosure onto your deck, your roof or any other location with a good view of the sky.

Step 4: Software

Update: If you need to change the way the capture works, you might have to make changes to the C++ source and compile it on your Raspberry PI. To do this, follow PeterD192's detailed instructions in the comments.

Update 2 (Nov 11th 2016): I have set up a GitHub page with an install script to make things easier for everyone: https://github.com/thomasjacquin/allsky If you use it, you shouldn't have to use any of the following instructions.

Original Instructions:

In order to capture images with the camera, we need to run a program in the terminal. ZWO provides an SDK in order for developers to communicate with the camera. Using this SDK, I modified one of their C++ example and compiled it for the raspberry pi. Here's a list of dependencies that need to be installed in order to get the program running.

OpenCV to capture the image of the sky (You can get a compiled version here)

Sunwait to calculate the civil twilight of your location. There is a compiled version in the archive. Make sure you copy it to your path: sudo cp ~/allsky/sunwait /usr/local/bin

To make things easy, I have attached an archive. Extract it at /home/pi/allsky.

From the lib folder, you will need to run this in order to use the camera without being root:sudo install asi.rules /lib/udev/rules.d

You will also need to add libASICamera2.so to your library: sudo cp ~/allsky/lib/armv7/libASICamera2* /usr/local/lib

Another thing you will need to do in order to automate everything is to run the main program on startup of the pi. You can open ~/.config/lxsession/LXDE-pi/autostart and add this line:@xterm -hold -e ~/allsky/allsky.sh

Remember to set your wifi connection in order for the pi to upload videos.

allsky.sh contains all the parameters you might want to play with: GPS coordinate, white balance, exposure and gain.

Attachments

Step 5: Collect Images

Now that the raspberry pi is ready, you can plug your all sky camera. The startup script should call allsky.sh which in turn calls the binary file named "capture". It will determine if it's day time or night time. In case it's night time, the capture will start and take a picture every 5 seconds (or whatever value you set in allsky.sh). At the end of the night, the capture will stop and avconv will stitch them together and upload a video to your website using FTP.

Step 6: Watch Your Time Lapse Videos

The video produced by avconv should weigh between 30 and 50 mb depending on the length of the night (here in the Yukon, we can get from 18 hours to 0 hours of night time) and should be viewable on any web browser.

In the event that you find something interesting in the video, you can access the individual images on the raspberry pi. They will be in a folder named after yesterday's date.

Here's a page showing my own videos with almost all night archived starting January 18th 2016. Some have beautiful northern light, others have clouds, snow or rain.

Make it Glow Contest 2018

Plastics Contest

Optics Contest

561 Discussions

Hi My liveview image is severely cropped and off-centre. I've purchased exactly the same equipment as you (ASI224MC and Arecont 1.55mm) but yours are only cropped slightly on the botton/top - what am I missing? Andy

Update: Based on the size of the projected image, I calculate I need to decrease the back-focus by 3mm to get the entire image onto the sensor. Any advice on doing that?

I'm 30 miles from South Bend, Indiana. About 90 miles from Chicago. So DEW forms very readily on my SCT and MCT scopes and I need DEW heaters and/or DEW shields. Not so much on mt Refractor, RC and Newtonian.

My Allsky does not always automatically generate a timelapse. The pictures are there, however no time lapse. it will generate a startrails. Is there a way to force it to create a timelapse? I have a 64GB SSD card installed and I usually have no more than 10 nights on there at the most before I delete. I was thinking it was disk space but I do not believe it was the issue.

One user reported using it successfully with 40W solar panels and a 16Ah battery. He said the Pi3 + camera was using 2W of power (5V at 0.4 amp). In theory a 26.8 Ah battery could last 67 hours (almost 3 days) but you have to take in account tasks that take more CPU power (image processing, timelapse, upload) and outside temperature. The cold could cut the battery capacity in half easily. (That's still enough to last the whole night).

Please update us if you set up a battery operated system with success!

Hi Juan, not yet, I did focus on daytime and auto-exposure in v0.6.Meteor detection will require some more intense computing power from the Pi so I will need to think a bit more about how to optimize the analysis prior to implementation.

I am getting night exposures with too short of a delay in between. I have autoexposure set to 0, exposure and maxexposure set to 12000 (12 sec), delay set to 8000 (8 sec). Yet I get 5 frames per minute? In capture.cpp line 311 you have exposure default set at 5000000 as time in us, should be in ms (this is just the default so I don't see how it effects above). There are no printf statements to show how long the delay is when asiAutoExposure = 0 at line 622. I tried autoexp at night, but I was not happy with the results, but just starting to work with the new version. thanks, Ron

For some reason, ZWO's library uses microseconds for exposure and milliseconds for maxexposure so 5000000 is actually correct (5sec). I just decided to make abstraction of the difference and present the user with only one unit: ms.

Regarding the delay, I will take a look, I have been running with autoexposure enabled lately so I may have missed a bug with the time between exposures. I will try your settings for next night.

Based on your feedback it sounds like the delay is not applied. I will add some logging there. Thanks

it is getting to line 622 in capture to sleep delay*1000 microseconds, I tried printing the time before the delay and after the delay and I get a segmentation fault every time. If I print the time after the delay it is only the exposure time difference from the image time, no delay. NOTE: Ctrl-C does not stop the program, I have to do it twice? Is there something about video mode capture that interupts the delay? I think you need to use video mode to get autoexposure, But I don't think I want video mode if I am using manual exposure. still playing around. Ron